blob: cef9b6f2189fa29834c615195b097be41ae6f622 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200669CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000670OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700671LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700672target_os
673target_vendor
674target_cpu
675target
676LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_ERR
678LLVM_PROF_FILE
679LLVM_PROF_MERGER
680PGO_PROF_USE_FLAG
681PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700682DEF_MAKE_RULE
683DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000684ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000685LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100686MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000687INSTALL_DATA
688INSTALL_SCRIPT
689INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200690ac_ct_READELF
691READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000692ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200693ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000694AR
695RANLIB
696GNULD
697LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000698LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000699RUNSHARED
700INSTSONAME
701LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000702PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000703BLDLIBRARY
704DLLLIBRARY
705LDLIBRARY
706LIBRARY
707BUILDEXEEXT
708EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200709NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200710MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711PLATFORM_TRIPLET
712MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200713ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MAINCC
715CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700716SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717GREP
718CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000719OBJEXT
720EXEEXT
721ac_ct_CC
722CPPFLAGS
723LDFLAGS
724CFLAGS
725CC
726EXPORT_MACOSX_DEPLOYMENT_TARGET
727CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200728_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000729MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000730FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000731FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800732FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKALTINSTALLLAST
734FRAMEWORKALTINSTALLFIRST
735FRAMEWORKINSTALLLAST
736FRAMEWORKINSTALLFIRST
737PYTHONFRAMEWORKINSTALLDIR
738PYTHONFRAMEWORKPREFIX
739PYTHONFRAMEWORKDIR
740PYTHONFRAMEWORKIDENTIFIER
741PYTHONFRAMEWORK
742LIPO_32BIT_FLAGS
743ARCH_RUN_32BIT
744UNIVERSALSDK
745CONFIG_ARGS
746SOVERSION
747VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200748PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200749PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100750host_os
751host_vendor
752host_cpu
753host
754build_os
755build_vendor
756build_cpu
757build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500758HAS_GIT
759GITBRANCH
760GITTAG
761GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400762BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000763target_alias
764host_alias
765build_alias
766LIBS
767ECHO_T
768ECHO_N
769ECHO_C
770DEFS
771mandir
772localedir
773libdir
774psdir
775pdfdir
776dvidir
777htmldir
778infodir
779docdir
780oldincludedir
781includedir
Antoine Pitroua6a4dc82017-09-07 18:56:24 +0200782runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000783localstatedir
784sharedstatedir
785sysconfdir
786datadir
787datarootdir
788libexecdir
789sbindir
790bindir
791program_transform_name
792prefix
793exec_prefix
794PACKAGE_URL
795PACKAGE_BUGREPORT
796PACKAGE_STRING
797PACKAGE_VERSION
798PACKAGE_TARNAME
799PACKAGE_NAME
800PATH_SEPARATOR
801SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000802ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000803ac_user_opts='
804enable_option_checking
805enable_universalsdk
806with_universal_archs
807with_framework_name
808enable_framework
809with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600810with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_cxx_main
812with_suffix
813enable_shared
814enable_profiling
815with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200816with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000817enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700818with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100819with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100820with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_libs
822with_system_expat
823with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100824with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000825enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700826with_tcltk_includes
827with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000829enable_ipv6
830with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000832with_c_locale_coercion
833with_c_locale_warning
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_fpectl
837with_libm
838with_libc
839enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800841with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000842'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 ac_precious_vars='build_alias
844host_alias
845target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100846MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847CC
848CFLAGS
849LDFLAGS
850LIBS
851CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100852CPP
853PKG_CONFIG
854PKG_CONFIG_PATH
855PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859ac_init_help=
860ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000861ac_unrecognized_opts=
862ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# The variables have the same names as the options, with
864# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868no_recursion=
869prefix=NONE
870program_prefix=NONE
871program_suffix=NONE
872program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877x_includes=NONE
878x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880# Installation directory options.
881# These are left unexpanded so users can "make install exec_prefix=/foo"
882# and all the variables that are supposed to be based on exec_prefix
883# by default will actually change.
884# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886bindir='${exec_prefix}/bin'
887sbindir='${exec_prefix}/sbin'
888libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889datarootdir='${prefix}/share'
890datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891sysconfdir='${prefix}/etc'
892sharedstatedir='${prefix}/com'
893localstatedir='${prefix}/var'
Antoine Pitroua6a4dc82017-09-07 18:56:24 +0200894runstatedir='${localstatedir}/run'
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
Antoine Pitroua6a4dc82017-09-07 18:56:24 +02001147 -runstatedir | --runstatedir | --runstatedi | --runstated \
1148 | --runstate | --runstat | --runsta | --runst | --runs \
1149 | --run | --ru | --r)
1150 ac_prev=runstatedir ;;
1151 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1152 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1153 | --run=* | --ru=* | --r=*)
1154 runstatedir=$ac_optarg ;;
1155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1157 ac_prev=sbindir ;;
1158 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1159 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161
1162 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1163 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1164 | --sharedst | --shareds | --shared | --share | --shar \
1165 | --sha | --sh)
1166 ac_prev=sharedstatedir ;;
1167 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1168 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1169 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1170 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 -site | --site | --sit)
1174 ac_prev=site ;;
1175 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1179 ac_prev=srcdir ;;
1180 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1184 | --syscon | --sysco | --sysc | --sys | --sy)
1185 ac_prev=sysconfdir ;;
1186 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1187 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1196 verbose=yes ;;
1197
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 -version | --version | --versio | --versi | --vers | -V)
1199 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
1217 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001221 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt_orig=$ac_useropt
1223 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1224 case $ac_user_opts in
1225 *"
1226"with_$ac_useropt"
1227"*) ;;
1228 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1229 ac_unrecognized_sep=', ';;
1230 esac
1231 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233 --x)
1234 # Obsolete; use --with-x.
1235 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1238 | --x-incl | --x-inc | --x-in | --x-i)
1239 ac_prev=x_includes ;;
1240 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1241 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
1244 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1245 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1246 ac_prev=x_libraries ;;
1247 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1248 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1252Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253 ;;
1254
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 *=*)
1256 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1257 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 case $ac_envvar in #(
1259 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 export $ac_envvar ;;
1264
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001265 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001270 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 ;;
1272
1273 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274done
1275
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279fi
1280
Matthias Kloseb9621712010-04-24 17:59:49 +00001281if test -n "$ac_unrecognized_opts"; then
1282 case $enable_option_checking in
1283 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001285 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1286 esac
1287fi
1288
1289# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1291 datadir sysconfdir sharedstatedir localstatedir includedir \
1292 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +02001293 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001296 # Remove trailing slashes.
1297 case $ac_val in
1298 */ )
1299 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1300 eval $ac_var=\$ac_val;;
1301 esac
1302 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001303 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 [\\/$]* | ?:[\\/]* ) continue;;
1305 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001306 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001307 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001308done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# There might be people who depend on the old broken behavior: `$host'
1311# used to hold the argument of --host etc.
1312# FIXME: To remove some day.
1313build=$build_alias
1314host=$host_alias
1315target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317# FIXME: To remove some day.
1318if test "x$host_alias" != x; then
1319 if test "x$build_alias" = x; then
1320 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001321 elif test "x$build_alias" != "x$host_alias"; then
1322 cross_compiling=yes
1323 fi
1324fi
1325
1326ac_tool_prefix=
1327test -n "$host_alias" && ac_tool_prefix=$host_alias-
1328
1329test "$silent" = yes && exec 6>/dev/null
1330
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332ac_pwd=`pwd` && test -n "$ac_pwd" &&
1333ac_ls_di=`ls -di .` &&
1334ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338
1339
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340# Find the source files, if location was not specified.
1341if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001342 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 ac_confdir=`$as_dirname -- "$as_myself" ||
1345$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1346 X"$as_myself" : 'X\(//\)[^/]' \| \
1347 X"$as_myself" : 'X\(//\)$' \| \
1348 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1349$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)[^/].*/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)$/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\).*/{
1363 s//\1/
1364 q
1365 }
1366 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001367 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369 srcdir=..
1370 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371else
1372 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374if test ! -r "$srcdir/$ac_unique_file"; then
1375 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1379ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381 pwd)`
1382# When building in place, set srcdir=.
1383if test "$ac_abs_confdir" = "$ac_pwd"; then
1384 srcdir=.
1385fi
1386# Remove unnecessary trailing slashes from srcdir.
1387# Double slashes in file names in object file debugging info
1388# mess up M-x gdb in Emacs.
1389case $srcdir in
1390*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1391esac
1392for ac_var in $ac_precious_vars; do
1393 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_env_${ac_var}_value=\$${ac_var}
1395 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1396 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1397done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001398
Martin v. Löwis11437992002-04-12 09:54:03 +00001399#
1400# Report the --help message.
1401#
1402if test "$ac_init_help" = "long"; then
1403 # Omit some internal or obsolete options to make the list less imposing.
1404 # This message is too long to be a string in the A/UX 3.1 sh.
1405 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001406\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
1408Usage: $0 [OPTION]... [VAR=VALUE]...
1409
1410To assign environment variables (e.g., CC, CFLAGS...), specify them as
1411VAR=VALUE. See below for descriptions of some of the useful variables.
1412
1413Defaults for the options are specified in brackets.
1414
1415Configuration:
1416 -h, --help display this help and exit
1417 --help=short display options specific to this package
1418 --help=recursive display the short help of all the included packages
1419 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001420 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --cache-file=FILE cache test results in FILE [disabled]
1422 -C, --config-cache alias for \`--cache-file=config.cache'
1423 -n, --no-create do not create output files
1424 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1425
Martin v. Löwis11437992002-04-12 09:54:03 +00001426Installation directories:
1427 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431
1432By default, \`make install' will install all the files in
1433\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1434an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1435for instance \`--prefix=\$HOME'.
1436
1437For better control, use the options below.
1438
1439Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 --bindir=DIR user executables [EPREFIX/bin]
1441 --sbindir=DIR system admin executables [EPREFIX/sbin]
1442 --libexecdir=DIR program executables [EPREFIX/libexec]
1443 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1444 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1445 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Antoine Pitroua6a4dc82017-09-07 18:56:24 +02001446 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 --libdir=DIR object code libraries [EPREFIX/lib]
1448 --includedir=DIR C header files [PREFIX/include]
1449 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1450 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1451 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1452 --infodir=DIR info documentation [DATAROOTDIR/info]
1453 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1454 --mandir=DIR man documentation [DATAROOTDIR/man]
1455 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1456 --htmldir=DIR html documentation [DOCDIR]
1457 --dvidir=DIR dvi documentation [DOCDIR]
1458 --pdfdir=DIR pdf documentation [DOCDIR]
1459 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461
1462 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001463
1464System types:
1465 --build=BUILD configure for building on BUILD [guessed]
1466 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001467 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001468_ACEOF
1469fi
1470
1471if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001472 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001473 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 cat <<\_ACEOF
1476
1477Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1480 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001481 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001482 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-framework[=INSTALLDIR]
1484 Build (MacOSX|Darwin) framework
1485 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001486 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001487 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1488 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001489 --enable-loadable-sqlite-extensions
1490 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --enable-ipv6 Enable ipv6 (with ipv4) support
1492 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001493 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496Optional Packages:
1497 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1498 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001499 --with-universal-archs=ARCH
1500 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001501 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001502 --with-framework-name=FRAMEWORK
1503 specify an alternate name of the framework built
1504 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001506 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001507 --with-cxx-main=<compiler>
1508 compile main() and link python executable with C++
1509 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-suffix=.exe set executable suffix
1511 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001512 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001513 --with-lto Enable Link Time Optimization in any build. Disabled
1514 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001515 --with-hash-algorithm=[fnv|siphash24]
1516 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001517 --with-address-sanitizer
1518 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001520 --with-system-expat build pyexpat module using an installed expat
1521 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001522 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001523 --with-system-libmpdec build _decimal module using an installed libmpdec
1524 library
Ned Deilyd819b932013-09-06 01:07:05 -07001525 --with-tcltk-includes='-I...'
1526 override search for Tcl and Tk include files
1527 --with-tcltk-libs='-L...'
1528 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001529 --with-dbmliborder=db1:db2:...
1530 order to check db backends for dbm. Valid value is a
1531 colon separated string with the backend names
1532 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with(out)-doc-strings disable/enable documentation strings
1534 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001535 --with(out)-c-locale-coercion
1536 disable/enable C locale coercion to a UTF-8 based
1537 locale
1538 --with(out)-c-locale-warning
1539 disable/enable locale compatibility warning in the C
1540 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001541 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001542 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001543 --with-fpectl enable SIGFPE catching
1544 --with-libm=STRING math library
1545 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001546 --with(out)-computed-gotos
1547 Use computed gotos in evaluation loop (enabled by
1548 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001549 --with(out)-ensurepip=[=upgrade]
1550 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001562 PKG_CONFIG path to pkg-config utility
1563 PKG_CONFIG_PATH
1564 directories to add to pkg-config's search path
1565 PKG_CONFIG_LIBDIR
1566 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
1568Use these variables to override the choices made by `configure' or to help
1569it to find libraries and programs with nonstandard names/locations.
1570
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001571Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
1575
1576if test "$ac_init_help" = "recursive"; then
1577 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -d "$ac_dir" ||
1580 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 ac_builddir=.
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584case "$ac_dir" in
1585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $ac_top_builddir_sub in
1591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593 esac ;;
1594esac
1595ac_abs_top_builddir=$ac_pwd
1596ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597# for backward compatibility:
1598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001599
1600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$ac_top_builddir_sub
1604 ac_abs_top_srcdir=$ac_pwd ;;
1605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$srcdir
1608 ac_abs_top_srcdir=$srcdir ;;
1609 *) # Relative name.
1610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611 ac_top_srcdir=$ac_top_build_prefix$srcdir
1612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 cd "$ac_dir" || { ac_status=$?; continue; }
1617 # Check for guested configure.
1618 if test -f "$ac_srcdir/configure.gnu"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621 elif test -f "$ac_srcdir/configure"; then
1622 echo &&
1623 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001625 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 fi || ac_status=$?
1627 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 done
1629fi
1630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001632if $ac_init_version; then
1633 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001634python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001638This configure script is free software; the Free Software Foundation
1639gives unlimited permission to copy, distribute and modify it.
1640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001643
1644## ------------------------ ##
1645## Autoconf initialization. ##
1646## ------------------------ ##
1647
1648# ac_fn_c_try_compile LINENO
1649# --------------------------
1650# Try to compile conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 rm -f conftest.$ac_objext
1655 if { { ac_try="$ac_compile"
1656case "(($ac_try" in
1657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1658 *) ac_try_echo=$ac_try;;
1659esac
1660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1661$as_echo "$ac_try_echo"; } >&5
1662 (eval "$ac_compile") 2>conftest.err
1663 ac_status=$?
1664 if test -s conftest.err; then
1665 grep -v '^ *+' conftest.err >conftest.er1
1666 cat conftest.er1 >&5
1667 mv -f conftest.er1 conftest.err
1668 fi
1669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1670 test $ac_status = 0; } && {
1671 test -z "$ac_c_werror_flag" ||
1672 test ! -s conftest.err
1673 } && test -s conftest.$ac_objext; then :
1674 ac_retval=0
1675else
1676 $as_echo "$as_me: failed program was:" >&5
1677sed 's/^/| /' conftest.$ac_ext >&5
1678
1679 ac_retval=1
1680fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_compile
1685
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } > conftest.i && {
1708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
Matthias Kloseb9621712010-04-24 17:59:49 +00001723# ac_fn_c_try_link LINENO
1724# -----------------------
1725# Try to link conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_link ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext conftest$ac_exeext
1730 if { { ac_try="$ac_link"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_link") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_c_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest$ac_exeext && {
1749 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001750 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1760 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1761 # interfere with the next link command; also delete a directory that is
1762 # left behind by Apple's compiler. We do this before executing the actions.
1763 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 as_fn_set_status $ac_retval
1766
1767} # ac_fn_c_try_link
1768
Matthias Kloseb9621712010-04-24 17:59:49 +00001769# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1770# -------------------------------------------------------
1771# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1772# the include files in INCLUDES and setting the cache variable VAR
1773# accordingly.
1774ac_fn_c_check_header_mongrel ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786else
1787 # Is the header compilable?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1789$as_echo_n "checking $2 usability... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792$4
1793#include <$2>
1794_ACEOF
1795if ac_fn_c_try_compile "$LINENO"; then :
1796 ac_header_compiler=yes
1797else
1798 ac_header_compiler=no
1799fi
1800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1802$as_echo "$ac_header_compiler" >&6; }
1803
1804# Is the header present?
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1806$as_echo_n "checking $2 presence... " >&6; }
1807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_cpp "$LINENO"; then :
1812 ac_header_preproc=yes
1813else
1814 ac_header_preproc=no
1815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1818$as_echo "$ac_header_preproc" >&6; }
1819
1820# So? What about this header?
1821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1822 yes:no: )
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1824$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1826$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1827 ;;
1828 no:yes:* )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1830$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1832$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1834$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1836$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001839( $as_echo "## --------------------------------------- ##
1840## Report this to https://bugs.python.org/ ##
1841## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 ) | sed "s/^/$as_me: WARNING: /" >&2
1843 ;;
1844esac
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001847if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 eval "$3=\$ac_header_compiler"
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_mongrel
1859
1860# ac_fn_c_try_run LINENO
1861# ----------------------
1862# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1863# that executables *can* be run.
1864ac_fn_c_try_run ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 if { { ac_try="$ac_link"
1868case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_link") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1878 { { case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_try") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; }; }; then :
1888 ac_retval=0
1889else
1890 $as_echo "$as_me: program exited with status $ac_status" >&5
1891 $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894 ac_retval=$ac_status
1895fi
1896 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_run
1901
1902# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1903# -------------------------------------------------------
1904# Tests whether HEADER exists and can be compiled using the include files in
1905# INCLUDES, setting the cache variable VAR accordingly.
1906ac_fn_c_check_header_compile ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1910$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912 $as_echo_n "(cached) " >&6
1913else
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921else
1922 eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_check_header_compile
1932
Matthias Kloseb9621712010-04-24 17:59:49 +00001933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985} # ac_fn_c_check_type
1986
Matthias Kloseb9621712010-04-24 17:59:49 +00001987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002165 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002178if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002237# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2238# ---------------------------------------------
2239# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2240# accordingly.
2241ac_fn_c_check_decl ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 as_decl_name=`echo $2|sed 's/ *(.*//'`
2245 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2247$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2248if eval \${$3+:} false; then :
2249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257#ifndef $as_decl_name
2258#ifdef __cplusplus
2259 (void) $as_decl_use;
2260#else
2261 (void) $as_decl_name;
2262#endif
2263#endif
2264
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$3=yes"
2271else
2272 eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_c_check_decl
2282
Matthias Kloseb9621712010-04-24 17:59:49 +00002283# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2284# ----------------------------------------------------
2285# Tries to find if the field MEMBER exists in type AGGR, after including
2286# INCLUDES, setting cache variable VAR accordingly.
2287ac_fn_c_check_member ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2291$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002292if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$5
2298int
2299main ()
2300{
2301static $2 ac_aggr;
2302if (ac_aggr.$3)
2303return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$4=yes"
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (sizeof ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 eval "$4=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$4
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Ned Deily4829bc62016-09-12 17:29:04 -04002343It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002344generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# 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 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002602See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$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 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002693if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002694 # If we're building out-of-tree, we need to make sure the following
2695 # resources get picked up before their $srcdir counterparts.
2696 # Objects/ -> typeslots.inc
2697 # Include/ -> Python-ast.h, graminit.h
2698 # Python/ -> importlib.h
2699 # (A side effect of this is that these resources will automatically be
2700 # regenerated when building out-of-tree, regardless of whether or not
2701 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2702 # off.)
2703 BASECPPFLAGS="-IObjects -IInclude -IPython"
2704else
2705 BASECPPFLAGS=""
2706fi
2707
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708
2709
2710
2711
Victor Stinner9ed34a82017-05-02 22:35:58 +02002712if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002714# Extract the first word of "git", so it can be a program name with args.
2715set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2717$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719 $as_echo_n "(cached) " >&6
2720else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721 if test -n "$HAS_GIT"; then
2722 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723else
2724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2725for as_dir in $PATH
2726do
2727 IFS=$as_save_IFS
2728 test -z "$as_dir" && as_dir=.
2729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2733 break 2
2734 fi
2735done
2736 done
2737IFS=$as_save_IFS
2738
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002740fi
2741fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742HAS_GIT=$ac_cv_prog_HAS_GIT
2743if test -n "$HAS_GIT"; then
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2745$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2748$as_echo "no" >&6; }
2749fi
2750
2751
2752else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756then
Ned Deily554626a2017-03-20 23:41:52 -04002757 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2758 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761 GITVERSION=""
2762 GITTAG=""
2763 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
2765
2766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
2769
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002770ac_aux_dir=
2771for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2772 if test -f "$ac_dir/install-sh"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/install-sh -c"
2775 break
2776 elif test -f "$ac_dir/install.sh"; then
2777 ac_aux_dir=$ac_dir
2778 ac_install_sh="$ac_aux_dir/install.sh -c"
2779 break
2780 elif test -f "$ac_dir/shtool"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/shtool install -c"
2783 break
2784 fi
2785done
2786if test -z "$ac_aux_dir"; then
2787 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2788fi
2789
2790# These three variables are undocumented and unsupported,
2791# and are intended to be withdrawn in a future Autoconf release.
2792# They can cause serious problems if a builder's source tree is in a directory
2793# whose full name contains unusual characters.
2794ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2795ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2796ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2797
2798
2799# Make sure we can run config.sub.
2800$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2801 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2802
2803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2804$as_echo_n "checking build system type... " >&6; }
2805if ${ac_cv_build+:} false; then :
2806 $as_echo_n "(cached) " >&6
2807else
2808 ac_build_alias=$build_alias
2809test "x$ac_build_alias" = x &&
2810 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2811test "x$ac_build_alias" = x &&
2812 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2813ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2814 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2815
2816fi
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2818$as_echo "$ac_cv_build" >&6; }
2819case $ac_cv_build in
2820*-*-*) ;;
2821*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2822esac
2823build=$ac_cv_build
2824ac_save_IFS=$IFS; IFS='-'
2825set x $ac_cv_build
2826shift
2827build_cpu=$1
2828build_vendor=$2
2829shift; shift
2830# Remember, the first character of IFS is used to create $*,
2831# except with old shells:
2832build_os=$*
2833IFS=$ac_save_IFS
2834case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2835
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2838$as_echo_n "checking host system type... " >&6; }
2839if ${ac_cv_host+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 if test "x$host_alias" = x; then
2843 ac_cv_host=$ac_cv_build
2844else
2845 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2846 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2847fi
2848
2849fi
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2851$as_echo "$ac_cv_host" >&6; }
2852case $ac_cv_host in
2853*-*-*) ;;
2854*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2855esac
2856host=$ac_cv_host
2857ac_save_IFS=$IFS; IFS='-'
2858set x $ac_cv_host
2859shift
2860host_cpu=$1
2861host_vendor=$2
2862shift; shift
2863# Remember, the first character of IFS is used to create $*,
2864# except with old shells:
2865host_os=$*
2866IFS=$ac_save_IFS
2867case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2868
2869
2870
doko@python.orga10e4a92013-01-25 18:45:12 +01002871
2872
Ned Deilyfcbc2462014-08-22 13:32:49 -07002873# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2874rm -f pybuilddir.txt
2875
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002876for ac_prog in python$PACKAGE_VERSION python3 python
2877do
2878 # Extract the first word of "$ac_prog", so it can be a program name with args.
2879set dummy $ac_prog; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002883 $as_echo_n "(cached) " >&6
2884else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002885 if test -n "$PYTHON_FOR_REGEN"; then
2886 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2897 break 2
2898 fi
2899done
2900 done
2901IFS=$as_save_IFS
2902
2903fi
2904fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2906if test -n "$PYTHON_FOR_REGEN"; then
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2908$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
2912fi
2913
2914
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919
2920
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002921if test "$cross_compiling" = yes; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2923$as_echo_n "checking for python interpreter for cross build... " >&6; }
2924 if test -z "$PYTHON_FOR_BUILD"; then
2925 for interp in python$PACKAGE_VERSION python3 python; do
2926 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002927 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 +02002928 break
2929 fi
2930 interp=
2931 done
2932 if test x$interp = x; then
2933 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2936$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002937 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 +02002938 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002939elif test "$cross_compiling" = maybe; then
2940 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002941else
2942 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2943fi
2944
2945
Martin v. Löwis11437992002-04-12 09:54:03 +00002946
Benjamin Petersond23f8222009-04-05 19:13:16 +00002947if test "$prefix" != "/"; then
2948 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2949fi
2950
2951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
2953
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002954# We don't use PACKAGE_ variables, and they cause conflicts
2955# with other autoconf-based packages that include Python.h
2956grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2957rm confdefs.h
2958mv confdefs.h.new confdefs.h
2959
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002960
Ned Deily4829bc62016-09-12 17:29:04 -04002961VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002962
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002963# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002964
2965SOVERSION=1.0
2966
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002967# The later defininition of _XOPEN_SOURCE disables certain features
2968# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2969
Matthias Kloseb9621712010-04-24 17:59:49 +00002970$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971
2972
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002973# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2974# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2975# them.
2976
Matthias Kloseb9621712010-04-24 17:59:49 +00002977$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002978
2979
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2982# them.
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002985
2986
Martin v. Löwisd6320502004-08-12 13:45:08 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002988# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2989# them.
2990
Matthias Kloseb9621712010-04-24 17:59:49 +00002991$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992
2993
2994
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002995define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002996
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002997# Arguments passed to configure.
2998
2999CONFIG_ARGS="$ac_configure_args"
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3002$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003004if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003005 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003006 case $enableval in
3007 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003008 # Locate the best usable SDK, see Mac/README.txt for more
3009 # information
3010 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003011 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003012 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003013 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3014 if test ! -d "${enableval}"
3015 then
3016 enableval=/
3017 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003018 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 ;;
3020 esac
3021 case $enableval in
3022 no)
3023 UNIVERSALSDK=
3024 enable_universalsdk=
3025 ;;
3026 *)
3027 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 if test ! -d "${UNIVERSALSDK}"
3029 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003030 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032 ;;
3033 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003034
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036else
3037
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043if test -n "${UNIVERSALSDK}"
3044then
Matthias Kloseb9621712010-04-24 17:59:49 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3046$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047else
Matthias Kloseb9621712010-04-24 17:59:49 +00003048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3049$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003052
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003053
Ned Deily87adb6e2013-10-18 21:09:56 -07003054ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003055
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056# For backward compatibility reasons we prefer to select '32-bit' if available,
3057# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003058UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059if test "`uname -s`" = "Darwin"
3060then
3061 if test -n "${UNIVERSALSDK}"
3062 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003063 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064 then
3065 UNIVERSAL_ARCHS="intel"
3066 fi
3067 fi
3068fi
3069
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003070
Matthias Kloseb9621712010-04-24 17:59:49 +00003071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3072$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073
3074# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003075if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077 UNIVERSAL_ARCHS="$withval"
3078
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079fi
3080
Ned Deily87adb6e2013-10-18 21:09:56 -07003081if test -n "${UNIVERSALSDK}"
3082then
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3084$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3085else
3086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3087$as_echo "no" >&6; }
3088fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003090
3091# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003092if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003093 withval=$with_framework_name;
3094 PYTHONFRAMEWORK=${withval}
3095 PYTHONFRAMEWORKDIR=${withval}.framework
3096 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3097
3098else
3099
3100 PYTHONFRAMEWORK=Python
3101 PYTHONFRAMEWORKDIR=Python.framework
3102 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3103
3104fi
3105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003107if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003109 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003110 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003111 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003112 esac
3113 case $enableval in
3114 no)
3115 PYTHONFRAMEWORK=
3116 PYTHONFRAMEWORKDIR=no-framework
3117 PYTHONFRAMEWORKPREFIX=
3118 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119 FRAMEWORKINSTALLFIRST=
3120 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003121 FRAMEWORKALTINSTALLFIRST=
3122 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003123 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003124 if test "x${prefix}" = "xNONE"; then
3125 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3126 else
3127 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3128 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003129 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003130 ;;
3131 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003132 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003135 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003136 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3137 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003138 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003139 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003140
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 if test "x${prefix}" = "xNONE" ; then
3142 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003144 else
3145 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3146 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147
3148 case "${enableval}" in
3149 /System*)
3150 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3151 if test "${prefix}" = "NONE" ; then
3152 # See below
3153 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3154 fi
3155 ;;
3156
3157 /Library*)
3158 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3159 ;;
3160
3161 */Library/Frameworks)
3162 MDIR="`dirname "${enableval}"`"
3163 MDIR="`dirname "${MDIR}"`"
3164 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3165
3166 if test "${prefix}" = "NONE"; then
3167 # User hasn't specified the
3168 # --prefix option, but wants to install
3169 # the framework in a non-default location,
3170 # ensure that the compatibility links get
3171 # installed relative to that prefix as well
3172 # instead of in /usr/local.
3173 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3174 fi
3175 ;;
3176
3177 *)
3178 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3179 ;;
3180 esac
3181
Jack Jansen127e56e2001-09-11 14:41:54 +00003182 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003184 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003190 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3191
3192 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3193
Jack Jansene578a632001-08-15 01:27:14 +00003194 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Guido van Rossum563e7081996-09-10 18:20:48 +00003196else
Martin v. Löwis11437992002-04-12 09:54:03 +00003197
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003199 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003200 PYTHONFRAMEWORKPREFIX=
3201 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202 FRAMEWORKINSTALLFIRST=
3203 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 FRAMEWORKALTINSTALLFIRST=
3205 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003206 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003207 if test "x${prefix}" = "xNONE" ; then
3208 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3209 else
3210 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3211 fi
Jack Jansene578a632001-08-15 01:27:14 +00003212 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003213
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215fi
3216
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217
3218
Michael W. Hudson54241132001-12-07 15:38:26 +00003219
3220
3221
3222
Jack Jansene578a632001-08-15 01:27:14 +00003223
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003224
3225
3226
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003227
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003228
Ned Deilyb8f944f2013-11-21 22:42:25 -08003229
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003230
3231cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003232#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003233_ACEOF
3234
3235
Jack Jansene578a632001-08-15 01:27:14 +00003236##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003237## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003238## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003239##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003240# Set name for machine-dependent library files
3241
Matthias Kloseb9621712010-04-24 17:59:49 +00003242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3243$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244if test -z "$MACHDEP"
3245then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003246 # avoid using uname for cross builds
3247 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003248 # ac_sys_system and ac_sys_release are used for setting
3249 # a lot of different things including 'define_xopen_source'
3250 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003251 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003252 *-*-linux-android*)
3253 ac_sys_system=Linux-android
3254 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 *-*-linux*)
3256 ac_sys_system=Linux
3257 ;;
3258 *-*-cygwin*)
3259 ac_sys_system=Cygwin
3260 ;;
3261 *)
3262 # for now, limit cross builds to known configurations
3263 MACHDEP="unknown"
3264 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3265 esac
3266 ac_sys_release=
3267 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003269 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003270 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003274 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003275 fi
3276 ac_md_system=`echo $ac_sys_system |
3277 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3278 ac_md_release=`echo $ac_sys_release |
3279 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3280 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003281
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003283 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003284 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003285 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003286 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003287 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288fi
Guido van Rossum91922671997-10-09 20:24:13 +00003289
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003290
3291if test "$cross_compiling" = yes; then
3292 case "$host" in
3293 *-*-linux*)
3294 case "$host_cpu" in
3295 arm*)
3296 _host_cpu=arm
3297 ;;
3298 *)
3299 _host_cpu=$host_cpu
3300 esac
3301 ;;
3302 *-*-cygwin*)
3303 _host_cpu=
3304 ;;
3305 *)
3306 # for now, limit cross builds to known configurations
3307 MACHDEP="unknown"
3308 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3309 esac
3310 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3311fi
3312
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003313# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3314# disable features if it is defined, without any means to access these
3315# features as extensions. For these systems, we skip the definition of
3316# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3317# some feature, make sure there is no alternative way to access this
3318# feature. Also, when using wildcards, make sure you have verified the
3319# need for not defining _XOPEN_SOURCE on all systems matching the
3320# wildcard, and that the wildcard does not include future systems
3321# (which may remove their limitations).
3322case $ac_sys_system/$ac_sys_release in
3323 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3324 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003325 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003326 # In addition, Stefan Krah confirms that issue #1244610 exists through
3327 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003328 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003329 define_xopen_source=no
3330 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3331 # also defined. This can be overridden by defining _BSD_SOURCE
3332 # As this has a different meaning on Linux, only define it on OpenBSD
3333
Matthias Kloseb9621712010-04-24 17:59:49 +00003334$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003335
3336 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003337 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003338 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3339 # also defined. This can be overridden by defining _BSD_SOURCE
3340 # As this has a different meaning on Linux, only define it on OpenBSD
3341
Matthias Kloseb9621712010-04-24 17:59:49 +00003342$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003343
3344 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003345 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3346 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3347 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003348 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 +00003349 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003350 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3351 # request to enable features supported by the standard as a request
3352 # to disable features not supported by the standard. The best way
3353 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3354 # entirely and define __EXTENSIONS__ instead.
3355 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003356 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003357 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3358 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003359 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003360 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 define_xopen_source=no;;
3362 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003363 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003365 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003366 # On FreeBSD 4, the math functions C89 does not cover are never defined
3367 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3368 FreeBSD/4.*)
3369 define_xopen_source=no;;
3370 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3371 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3372 # identifies itself as Darwin/7.*
3373 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3374 # disables platform specific features beyond repair.
3375 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3376 # has no effect, don't bother defining them
3377 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003378 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003379 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003380 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003381 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3382 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3383 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003384 AIX/4)
3385 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003386 AIX/5)
3387 if test `uname -r` -eq 1; then
3388 define_xopen_source=no
3389 fi
3390 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003391 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3392 # defining NI_NUMERICHOST.
3393 QNX/6.3.2)
3394 define_xopen_source=no
3395 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003396
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003397esac
3398
3399if test $define_xopen_source = yes
3400then
Victor Stinner14d098d2011-09-07 22:29:43 +02003401 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
Victor Stinner14d098d2011-09-07 22:29:43 +02003403$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003404
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
3406 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3407 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3408 # several APIs are not declared. Since this is also needed in some
3409 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
Matthias Kloseb9621712010-04-24 17:59:49 +00003411$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
3413
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003414
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003415$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003417fi
3418
Christian Heimes647cd872013-12-07 23:39:33 +01003419# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3420case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003421 hp*|HP*)
3422 define_stdc_a1=yes;;
3423 *)
3424 define_stdc_a1=no;;
3425esac
3426
3427if test $define_stdc_a1 = yes
3428then
Christian Heimes647cd872013-12-07 23:39:33 +01003429
3430$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3431
Christian Heimesb02bcae2013-12-08 15:21:08 +01003432fi
Christian Heimes647cd872013-12-07 23:39:33 +01003433
Jack Jansen6b08a402004-06-03 12:41:45 +00003434# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3435# it may influence the way we can build extensions, so distutils
3436# needs to check it
3437
Thomas Wouters477c8d52006-05-27 19:21:47 +00003438
Jack Jansen6b08a402004-06-03 12:41:45 +00003439CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003440EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003441
Guido van Rossum627b2d71993-12-24 10:39:16 +00003442# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003443
3444# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3445# for debug/optimization stuff. BASECFLAGS is for flags that are required
3446# just to get things to compile and link. Users are free to override OPT
3447# when running configure or make. The build should not break if they do.
3448# BASECFLAGS should generally not be messed with, however.
3449
3450# XXX shouldn't some/most/all of this code be merged with the stuff later
3451# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3453$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003456if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003458 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003459 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003460 without_gcc=yes;;
3461 yes) CC=gcc
3462 without_gcc=no;;
3463 *) CC=$withval
3464 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003465 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003466else
Martin v. Löwis11437992002-04-12 09:54:03 +00003467
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003468 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003469 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003470 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003471 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003472 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473fi
3474
Matthias Kloseb9621712010-04-24 17:59:49 +00003475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3476$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003477
Zachary Ware5af85642015-12-21 12:09:17 -06003478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3479$as_echo_n "checking for --with-icc... " >&6; }
3480
3481# Check whether --with-icc was given.
3482if test "${with_icc+set}" = set; then :
3483 withval=$with_icc;
3484 case $withval in
3485 no) CC=${CC:-cc}
3486 with_icc=no;;
3487 yes) CC=icc
3488 CXX=icpc
3489 with_icc=yes;;
3490 *) CC=$withval
3491 with_icc=$withval;;
3492 esac
3493else
3494
3495 with_icc=no
3496fi
3497
3498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3499$as_echo "$with_icc" >&6; }
3500
Guido van Rossum8b131c51995-03-09 14:10:13 +00003501# If the user switches compilers, we can't believe the cache
3502if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3503then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003504 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003505(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003506fi
3507
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003508# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3509# when the compiler supports them, but we don't always want -O2, and
3510# we set -g later.
3511if test -z "$CFLAGS"; then
3512 CFLAGS=
3513fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003514
3515if test "$ac_sys_system" = "Darwin"
3516then
3517 # Compiler selection on MacOSX is more complicated than
3518 # AC_PROG_CC can handle, see Mac/README.txt for more
3519 # information
3520 if test -z "${CC}"
3521 then
3522 found_gcc=
3523 found_clang=
3524 as_save_IFS=$IFS; IFS=:
3525 for as_dir in $PATH
3526 do
3527 IFS=$as_save_IFS
3528 if test -x $as_dir/gcc; then
3529 if test -z "${found_gcc}"; then
3530 found_gcc=$as_dir/gcc
3531 fi
3532 fi
3533 if test -x $as_dir/clang; then
3534 if test -z "${found_clang}"; then
3535 found_clang=$as_dir/clang
3536 fi
3537 fi
3538 done
3539 IFS=$as_save_IFS
3540
3541 if test -n "$found_gcc" -a -n "$found_clang"
3542 then
3543 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3544 then
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3546$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3547 CC="$found_clang"
3548 CXX="$found_clang++"
3549 fi
3550
3551
3552 elif test -z "$found_gcc" -a -n "$found_clang"
3553 then
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3555$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3556 CC="$found_clang"
3557 CXX="$found_clang++"
3558
3559 elif test -z "$found_gcc" -a -z "$found_clang"
3560 then
3561 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3562 if test -n "${found_clang}"
3563 then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3565$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3566 CC="${found_clang}"
3567 CXX="`/usr/bin/xcrun -find clang++`"
3568
3569 # else: use default behaviour
3570 fi
3571 fi
3572 fi
3573fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003574ac_ext=c
3575ac_cpp='$CPP $CPPFLAGS'
3576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3578ac_compiler_gnu=$ac_cv_c_compiler_gnu
3579if test -n "$ac_tool_prefix"; then
3580 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3581set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3583$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003584if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003586else
3587 if test -n "$CC"; then
3588 ac_cv_prog_CC="$CC" # Let the user override the test.
3589else
Martin v. Löwis11437992002-04-12 09:54:03 +00003590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH
3592do
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 $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 +00003599 break 2
3600 fi
3601done
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003604
Jack Jansendd19cf82001-12-06 22:36:17 +00003605fi
3606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003608if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3610$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003611else
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003614fi
3615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616
Martin v. Löwis11437992002-04-12 09:54:03 +00003617fi
3618if test -z "$ac_cv_prog_CC"; then
3619 ac_ct_CC=$CC
3620 # Extract the first word of "gcc", so it can be a program name with args.
3621set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3623$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003624if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003626else
3627 if test -n "$ac_ct_CC"; then
3628 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3629else
3630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3631for as_dir in $PATH
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 $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 +00003639 break 2
3640 fi
3641done
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003644
3645fi
3646fi
3647ac_ct_CC=$ac_cv_prog_ac_ct_CC
3648if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3650$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651else
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3653$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003654fi
3655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656 if test "x$ac_ct_CC" = x; then
3657 CC=""
3658 else
3659 case $cross_compiling:$ac_tool_warned in
3660yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663ac_tool_warned=yes ;;
3664esac
3665 CC=$ac_ct_CC
3666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
3668 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003669fi
3670
Jack Jansendd19cf82001-12-06 22:36:17 +00003671if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 if test -n "$ac_tool_prefix"; then
3673 # 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 +00003674set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3676$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003677if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003679else
3680 if test -n "$CC"; then
3681 ac_cv_prog_CC="$CC" # Let the user override the test.
3682else
Martin v. Löwis11437992002-04-12 09:54:03 +00003683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3684for as_dir in $PATH
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $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 +00003692 break 2
3693 fi
3694done
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003697
3698fi
3699fi
3700CC=$ac_cv_prog_CC
3701if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3703$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003704else
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3706$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003707fi
3708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003709
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003711fi
3712if test -z "$CC"; then
3713 # Extract the first word of "cc", so it can be a program name with args.
3714set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3716$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003717if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003719else
3720 if test -n "$CC"; then
3721 ac_cv_prog_CC="$CC" # Let the user override the test.
3722else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3732 ac_prog_rejected=yes
3733 continue
3734 fi
3735 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $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 +00003737 break 2
3738 fi
3739done
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743if test $ac_prog_rejected = yes; then
3744 # We found a bogon in the path, so make sure we never use it.
3745 set dummy $ac_cv_prog_CC
3746 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748 # We chose a different compiler from the bogus one.
3749 # However, it has the same basename, so the bogon will be chosen
3750 # first if we set CC to just the basename; use the full file name.
3751 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003752 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753 fi
3754fi
3755fi
3756fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003757CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3760$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761else
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3763$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764fi
3765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767fi
3768if test -z "$CC"; then
3769 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 do
3772 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3773set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3775$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003776if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003778else
3779 if test -n "$CC"; then
3780 ac_cv_prog_CC="$CC" # Let the user override the test.
3781else
Martin v. Löwis11437992002-04-12 09:54:03 +00003782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785 IFS=$as_save_IFS
3786 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 $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 +00003791 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793done
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
3797fi
3798fi
3799CC=$ac_cv_prog_CC
3800if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3802$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003803else
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3805$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003806fi
3807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 test -n "$CC" && break
3810 done
3811fi
3812if test -z "$CC"; then
3813 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003815do
3816 # Extract the first word of "$ac_prog", so it can be a program name with args.
3817set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3819$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003820if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003822else
3823 if test -n "$ac_ct_CC"; then
3824 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3825else
3826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827for as_dir in $PATH
3828do
3829 IFS=$as_save_IFS
3830 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 $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 +00003835 break 2
3836 fi
3837done
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841fi
3842fi
3843ac_ct_CC=$ac_cv_prog_ac_ct_CC
3844if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3846$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003847else
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3849$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 test -n "$ac_ct_CC" && break
3854done
Michael W. Hudson54241132001-12-07 15:38:26 +00003855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856 if test "x$ac_ct_CC" = x; then
3857 CC=""
3858 else
3859 case $cross_compiling:$ac_tool_warned in
3860yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863ac_tool_warned=yes ;;
3864esac
3865 CC=$ac_ct_CC
3866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868
3869fi
3870
3871
Matthias Kloseb9621712010-04-24 17:59:49 +00003872test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003874as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003875See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
3877# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003878$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3879set X $ac_compile
3880ac_compiler=$2
3881for ac_option in --version -v -V -qversion; do
3882 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883case "(($ac_try" in
3884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885 *) ac_try_echo=$ac_try;;
3886esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3888$as_echo "$ac_try_echo"; } >&5
3889 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003890 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 if test -s conftest.err; then
3892 sed '10a\
3893... rest of stderr output deleted ...
3894 10q' conftest.err >conftest.er1
3895 cat conftest.er1 >&5
3896 fi
3897 rm -f conftest.er1 conftest.err
3898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }
3900done
Martin v. Löwis11437992002-04-12 09:54:03 +00003901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003903/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003904
Martin v. Löwis11437992002-04-12 09:54:03 +00003905int
3906main ()
3907{
3908
3909 ;
3910 return 0;
3911}
3912_ACEOF
3913ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003914ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003915# Try to create an executable without -o first, disregard a.out.
3916# It will help us diagnose broken compilers, and finding out an intuition
3917# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3919$as_echo_n "checking whether the C compiler works... " >&6; }
3920ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3921
3922# The possible output files:
3923ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925ac_rmfiles=
3926for ac_file in $ac_files
3927do
3928 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3931 esac
3932done
3933rm -f $ac_rmfiles
3934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936case "(($ac_try" in
3937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938 *) ac_try_echo=$ac_try;;
3939esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3941$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3945 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3947# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3948# in a Makefile. We should not override ac_cv_exeext if it was cached,
3949# so that the user can short-circuit this test for compilers unknown to
3950# Autoconf.
3951for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003952do
3953 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956 ;;
3957 [ab].out )
3958 # We found the default executable, but exeext='' is most
3959 # certainly right.
3960 break;;
3961 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 then :; else
3964 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3965 fi
3966 # We set ac_cv_exeext here because the later test for it is not
3967 # safe: cross compilers may not add the suffix if given an `-o'
3968 # argument, so we may need to know it at that point already.
3969 # Even if this section looks crufty: it has the advantage of
3970 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 break;;
3972 * )
3973 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 esac
3975done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976test "$ac_cv_exeext" = no && ac_cv_exeext=
3977
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003978else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 ac_file=''
3980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003981if test -z "$ac_file"; then :
3982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983$as_echo "no" >&6; }
3984$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003985sed 's/^/| /' conftest.$ac_ext >&5
3986
Matthias Kloseb9621712010-04-24 17:59:49 +00003987{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003989as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003990See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003991else
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3993$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3996$as_echo_n "checking for C compiler default output file name... " >&6; }
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3998$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000
Matthias Kloseb9621712010-04-24 17:59:49 +00004001rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4004$as_echo_n "checking for suffix of executables... " >&6; }
4005if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006case "(($ac_try" in
4007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008 *) ac_try_echo=$ac_try;;
4009esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4011$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004013 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4015 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4017# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4018# work properly (i.e., refer to `conftest.exe'), while it won't with
4019# `rm'.
4020for ac_file in conftest.exe conftest conftest.*; do
4021 test -f "$ac_file" || continue
4022 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004024 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4025 break;;
4026 * ) break;;
4027 esac
4028done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004029else
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004032as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004033See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004035rm -f conftest conftest$ac_cv_exeext
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4037$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038
4039rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004040EXEEXT=$ac_cv_exeext
4041ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4043/* end confdefs.h. */
4044#include <stdio.h>
4045int
4046main ()
4047{
4048FILE *f = fopen ("conftest.out", "w");
4049 return ferror (f) || fclose (f) != 0;
4050
4051 ;
4052 return 0;
4053}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004055ac_clean_files="$ac_clean_files conftest.out"
4056# Check that the compiler produces executables we can run. If not, either
4057# the compiler is broken, or we cross compile.
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4059$as_echo_n "checking whether we are cross compiling... " >&6; }
4060if test "$cross_compiling" != yes; then
4061 { { ac_try="$ac_link"
4062case "(($ac_try" in
4063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4064 *) ac_try_echo=$ac_try;;
4065esac
4066eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4067$as_echo "$ac_try_echo"; } >&5
4068 (eval "$ac_link") 2>&5
4069 ac_status=$?
4070 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4071 test $ac_status = 0; }
4072 if { ac_try='./conftest$ac_cv_exeext'
4073 { { case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
4077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
4079 (eval "$ac_try") 2>&5
4080 ac_status=$?
4081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }; }; then
4083 cross_compiling=no
4084 else
4085 if test "$cross_compiling" = maybe; then
4086 cross_compiling=yes
4087 else
4088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004090as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004091If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004092See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 fi
4094 fi
4095fi
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4097$as_echo "$cross_compiling" >&6; }
4098
4099rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4100ac_clean_files=$ac_clean_files_save
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4102$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004103if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 $as_echo_n "(cached) " >&6
4105else
4106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004107/* end confdefs.h. */
4108
4109int
4110main ()
4111{
4112
4113 ;
4114 return 0;
4115}
4116_ACEOF
4117rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004118if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119case "(($ac_try" in
4120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4121 *) ac_try_echo=$ac_try;;
4122esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004123eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4124$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4128 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129 for ac_file in conftest.o conftest.obj conftest.*; do
4130 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4134 break;;
4135 esac
4136done
4137else
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004139sed 's/^/| /' conftest.$ac_ext >&5
4140
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004143as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004144See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4149$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004150OBJEXT=$ac_cv_objext
4151ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4153$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004154if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004156else
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004159
Martin v. Löwis11437992002-04-12 09:54:03 +00004160int
4161main ()
4162{
4163#ifndef __GNUC__
4164 choke me
4165#endif
4166
4167 ;
4168 return 0;
4169}
4170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 ac_compiler_gnu=yes
4173else
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004177ac_cv_c_compiler_gnu=$ac_compiler_gnu
4178
4179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4181$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4182if test $ac_compiler_gnu = yes; then
4183 GCC=yes
4184else
4185 GCC=
4186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004187ac_test_CFLAGS=${CFLAGS+set}
4188ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4190$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004191if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004193else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194 ac_save_c_werror_flag=$ac_c_werror_flag
4195 ac_c_werror_flag=yes
4196 ac_cv_prog_cc_g=no
4197 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004200
Martin v. Löwis11437992002-04-12 09:54:03 +00004201int
4202main ()
4203{
4204
4205 ;
4206 return 0;
4207}
4208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211else
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 CFLAGS=""
4213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214/* end confdefs.h. */
4215
4216int
4217main ()
4218{
4219
4220 ;
4221 return 0;
4222}
4223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004224if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225
Matthias Kloseb9621712010-04-24 17:59:49 +00004226else
4227 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230/* end confdefs.h. */
4231
4232int
4233main ()
4234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248 ac_c_werror_flag=$ac_save_c_werror_flag
4249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4251$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254elif test $ac_cv_prog_cc_g = yes; then
4255 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004256 CFLAGS="-g -O2"
4257 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259 fi
4260else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261 if test "$GCC" = yes; then
4262 CFLAGS="-O2"
4263 else
4264 CFLAGS=
4265 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4268$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004269if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004270 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004271else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004273ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* end confdefs.h. */
4276#include <stdarg.h>
4277#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004278struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4280struct buf { int x; };
4281FILE * (*rcsopen) (struct buf *, struct stat *, int);
4282static char *e (p, i)
4283 char **p;
4284 int i;
4285{
4286 return p[i];
4287}
4288static char *f (char * (*g) (char **, int), char **p, ...)
4289{
4290 char *s;
4291 va_list v;
4292 va_start (v,p);
4293 s = g (p, va_arg (v,int));
4294 va_end (v);
4295 return s;
4296}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297
4298/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4299 function prototypes and stuff, but not '\xHH' hex character constants.
4300 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4303 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4308 inside strings and character constants. */
4309#define FOO(x) 'x'
4310int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4311
Skip Montanaro6dead952003-09-25 14:50:04 +00004312int test (int i, double x);
4313struct s1 {int (*f) (int a);};
4314struct s2 {int (*f) (double a);};
4315int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4316int argc;
4317char **argv;
4318int
4319main ()
4320{
4321return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4322 ;
4323 return 0;
4324}
4325_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4327 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004328do
4329 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333rm -f core conftest.err conftest.$ac_objext
4334 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004335done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004337CC=$ac_save_CC
4338
4339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340# AC_CACHE_VAL
4341case "x$ac_cv_prog_cc_c89" in
4342 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4344$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4347$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004348 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4351$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004352esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004353if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004354
Matthias Kloseb9621712010-04-24 17:59:49 +00004355fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004356
Martin v. Löwis11437992002-04-12 09:54:03 +00004357ac_ext=c
4358ac_cpp='$CPP $CPPFLAGS'
4359ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4360ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4361ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004363ac_ext=c
4364ac_cpp='$CPP $CPPFLAGS'
4365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4367ac_compiler_gnu=$ac_cv_c_compiler_gnu
4368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4369$as_echo_n "checking how to run the C preprocessor... " >&6; }
4370# On Suns, sometimes $CPP names a directory.
4371if test -n "$CPP" && test -d "$CPP"; then
4372 CPP=
4373fi
4374if test -z "$CPP"; then
4375 if ${ac_cv_prog_CPP+:} false; then :
4376 $as_echo_n "(cached) " >&6
4377else
4378 # Double quotes because CPP needs to be expanded
4379 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4380 do
4381 ac_preproc_ok=false
4382for ac_c_preproc_warn_flag in '' yes
4383do
4384 # Use a header file that comes with gcc, so configuring glibc
4385 # with a fresh cross-compiler works.
4386 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4387 # <limits.h> exists even on freestanding compilers.
4388 # On the NeXT, cc -E runs the code through the compiler's parser,
4389 # not just through cpp. "Syntax error" is here to catch this case.
4390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4391/* end confdefs.h. */
4392#ifdef __STDC__
4393# include <limits.h>
4394#else
4395# include <assert.h>
4396#endif
4397 Syntax error
4398_ACEOF
4399if ac_fn_c_try_cpp "$LINENO"; then :
4400
4401else
4402 # Broken: fails on valid input.
4403continue
4404fi
4405rm -f conftest.err conftest.i conftest.$ac_ext
4406
4407 # OK, works on sane cases. Now check whether nonexistent headers
4408 # can be detected and how.
4409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410/* end confdefs.h. */
4411#include <ac_nonexistent.h>
4412_ACEOF
4413if ac_fn_c_try_cpp "$LINENO"; then :
4414 # Broken: success on invalid input.
4415continue
4416else
4417 # Passes both tests.
4418ac_preproc_ok=:
4419break
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423done
4424# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4425rm -f conftest.i conftest.err conftest.$ac_ext
4426if $ac_preproc_ok; then :
4427 break
4428fi
4429
4430 done
4431 ac_cv_prog_CPP=$CPP
4432
4433fi
4434 CPP=$ac_cv_prog_CPP
4435else
4436 ac_cv_prog_CPP=$CPP
4437fi
4438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4439$as_echo "$CPP" >&6; }
4440ac_preproc_ok=false
4441for ac_c_preproc_warn_flag in '' yes
4442do
4443 # Use a header file that comes with gcc, so configuring glibc
4444 # with a fresh cross-compiler works.
4445 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4446 # <limits.h> exists even on freestanding compilers.
4447 # On the NeXT, cc -E runs the code through the compiler's parser,
4448 # not just through cpp. "Syntax error" is here to catch this case.
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450/* end confdefs.h. */
4451#ifdef __STDC__
4452# include <limits.h>
4453#else
4454# include <assert.h>
4455#endif
4456 Syntax error
4457_ACEOF
4458if ac_fn_c_try_cpp "$LINENO"; then :
4459
4460else
4461 # Broken: fails on valid input.
4462continue
4463fi
4464rm -f conftest.err conftest.i conftest.$ac_ext
4465
4466 # OK, works on sane cases. Now check whether nonexistent headers
4467 # can be detected and how.
4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4469/* end confdefs.h. */
4470#include <ac_nonexistent.h>
4471_ACEOF
4472if ac_fn_c_try_cpp "$LINENO"; then :
4473 # Broken: success on invalid input.
4474continue
4475else
4476 # Passes both tests.
4477ac_preproc_ok=:
4478break
4479fi
4480rm -f conftest.err conftest.i conftest.$ac_ext
4481
4482done
4483# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4484rm -f conftest.i conftest.err conftest.$ac_ext
4485if $ac_preproc_ok; then :
4486
4487else
4488 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4490as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4491See \`config.log' for more details" "$LINENO" 5; }
4492fi
4493
4494ac_ext=c
4495ac_cpp='$CPP $CPPFLAGS'
4496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4498ac_compiler_gnu=$ac_cv_c_compiler_gnu
4499
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4501$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4502if ${ac_cv_path_GREP+:} false; then :
4503 $as_echo_n "(cached) " >&6
4504else
4505 if test -z "$GREP"; then
4506 ac_path_GREP_found=false
4507 # Loop through the user's path and test for each of PROGNAME-LIST
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
4513 for ac_prog in grep ggrep; do
4514 for ac_exec_ext in '' $ac_executable_extensions; do
4515 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4516 as_fn_executable_p "$ac_path_GREP" || continue
4517# Check for GNU ac_path_GREP and select it if it is found.
4518 # Check for GNU $ac_path_GREP
4519case `"$ac_path_GREP" --version 2>&1` in
4520*GNU*)
4521 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4522*)
4523 ac_count=0
4524 $as_echo_n 0123456789 >"conftest.in"
4525 while :
4526 do
4527 cat "conftest.in" "conftest.in" >"conftest.tmp"
4528 mv "conftest.tmp" "conftest.in"
4529 cp "conftest.in" "conftest.nl"
4530 $as_echo 'GREP' >> "conftest.nl"
4531 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4532 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4533 as_fn_arith $ac_count + 1 && ac_count=$as_val
4534 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4535 # Best one so far, save it but keep looking for a better one
4536 ac_cv_path_GREP="$ac_path_GREP"
4537 ac_path_GREP_max=$ac_count
4538 fi
4539 # 10*(2^10) chars as input seems more than enough
4540 test $ac_count -gt 10 && break
4541 done
4542 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4543esac
4544
4545 $ac_path_GREP_found && break 3
4546 done
4547 done
4548 done
4549IFS=$as_save_IFS
4550 if test -z "$ac_cv_path_GREP"; then
4551 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4552 fi
4553else
4554 ac_cv_path_GREP=$GREP
4555fi
4556
4557fi
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4559$as_echo "$ac_cv_path_GREP" >&6; }
4560 GREP="$ac_cv_path_GREP"
4561
4562
Łukasz Langaa785c872016-09-09 17:37:37 -07004563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4564$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4565if ${ac_cv_path_SED+:} false; then :
4566 $as_echo_n "(cached) " >&6
4567else
4568 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4569 for ac_i in 1 2 3 4 5 6 7; do
4570 ac_script="$ac_script$as_nl$ac_script"
4571 done
4572 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4573 { ac_script=; unset ac_script;}
4574 if test -z "$SED"; then
4575 ac_path_SED_found=false
4576 # Loop through the user's path and test for each of PROGNAME-LIST
4577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578for as_dir in $PATH
4579do
4580 IFS=$as_save_IFS
4581 test -z "$as_dir" && as_dir=.
4582 for ac_prog in sed gsed; do
4583 for ac_exec_ext in '' $ac_executable_extensions; do
4584 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4585 as_fn_executable_p "$ac_path_SED" || continue
4586# Check for GNU ac_path_SED and select it if it is found.
4587 # Check for GNU $ac_path_SED
4588case `"$ac_path_SED" --version 2>&1` in
4589*GNU*)
4590 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4591*)
4592 ac_count=0
4593 $as_echo_n 0123456789 >"conftest.in"
4594 while :
4595 do
4596 cat "conftest.in" "conftest.in" >"conftest.tmp"
4597 mv "conftest.tmp" "conftest.in"
4598 cp "conftest.in" "conftest.nl"
4599 $as_echo '' >> "conftest.nl"
4600 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4601 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4602 as_fn_arith $ac_count + 1 && ac_count=$as_val
4603 if test $ac_count -gt ${ac_path_SED_max-0}; then
4604 # Best one so far, save it but keep looking for a better one
4605 ac_cv_path_SED="$ac_path_SED"
4606 ac_path_SED_max=$ac_count
4607 fi
4608 # 10*(2^10) chars as input seems more than enough
4609 test $ac_count -gt 10 && break
4610 done
4611 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4612esac
4613
4614 $ac_path_SED_found && break 3
4615 done
4616 done
4617 done
4618IFS=$as_save_IFS
4619 if test -z "$ac_cv_path_SED"; then
4620 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4621 fi
4622else
4623 ac_cv_path_SED=$SED
4624fi
4625
4626fi
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4628$as_echo "$ac_cv_path_SED" >&6; }
4629 SED="$ac_cv_path_SED"
4630 rm -f conftest.sed
4631
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004632
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004633
4634
Matthias Kloseb9621712010-04-24 17:59:49 +00004635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4636$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004638# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004639if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004640 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641
4642 case $withval in
4643 no) with_cxx_main=no
4644 MAINCC='$(CC)';;
4645 yes) with_cxx_main=yes
4646 MAINCC='$(CXX)';;
4647 *) with_cxx_main=yes
4648 MAINCC=$withval
4649 if test -z "$CXX"
4650 then
4651 CXX=$withval
4652 fi;;
4653 esac
4654else
4655
4656 with_cxx_main=no
4657 MAINCC='$(CC)'
4658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004659fi
4660
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4662$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
4664preset_cxx="$CXX"
4665if test -z "$CXX"
4666then
4667 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668 gcc) if test -n "$ac_tool_prefix"; then
4669 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4670set dummy ${ac_tool_prefix}g++; ac_word=$2
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672$as_echo_n "checking for $ac_word... " >&6; }
4673if ${ac_cv_path_CXX+:} false; then :
4674 $as_echo_n "(cached) " >&6
4675else
4676 case $CXX in
4677 [\\/]* | ?:[\\/]*)
4678 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4679 ;;
4680 *)
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682for as_dir in notfound
4683do
4684 IFS=$as_save_IFS
4685 test -z "$as_dir" && as_dir=.
4686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690 break 2
4691 fi
4692done
4693 done
4694IFS=$as_save_IFS
4695
4696 ;;
4697esac
4698fi
4699CXX=$ac_cv_path_CXX
4700if test -n "$CXX"; then
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4702$as_echo "$CXX" >&6; }
4703else
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705$as_echo "no" >&6; }
4706fi
4707
4708
4709fi
4710if test -z "$ac_cv_path_CXX"; then
4711 ac_pt_CXX=$CXX
4712 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004713set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004716if ${ac_cv_path_ac_pt_CXX+:} false; then :
4717 $as_echo_n "(cached) " >&6
4718else
4719 case $ac_pt_CXX in
4720 [\\/]* | ?:[\\/]*)
4721 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4722 ;;
4723 *)
4724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in notfound
4726do
4727 IFS=$as_save_IFS
4728 test -z "$as_dir" && as_dir=.
4729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004731 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733 break 2
4734 fi
4735done
4736 done
4737IFS=$as_save_IFS
4738
4739 ;;
4740esac
4741fi
4742ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4743if test -n "$ac_pt_CXX"; then
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4745$as_echo "$ac_pt_CXX" >&6; }
4746else
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751 if test "x$ac_pt_CXX" = x; then
4752 CXX="g++"
4753 else
4754 case $cross_compiling:$ac_tool_warned in
4755yes:)
4756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4758ac_tool_warned=yes ;;
4759esac
4760 CXX=$ac_pt_CXX
4761 fi
4762else
4763 CXX="$ac_cv_path_CXX"
4764fi
4765 ;;
4766 cc) if test -n "$ac_tool_prefix"; then
4767 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4768set dummy ${ac_tool_prefix}c++; ac_word=$2
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4770$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004771if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773else
4774 case $CXX in
4775 [\\/]* | ?:[\\/]*)
4776 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4777 ;;
4778 *)
4779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780for as_dir in notfound
4781do
4782 IFS=$as_save_IFS
4783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788 break 2
4789 fi
4790done
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004792IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 ;;
4795esac
4796fi
4797CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4800$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801else
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004805
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806
4807fi
4808if test -z "$ac_cv_path_CXX"; then
4809 ac_pt_CXX=$CXX
4810 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4813$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819 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 +00004820 ;;
4821 *)
4822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4823for as_dir in notfound
4824do
4825 IFS=$as_save_IFS
4826 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831 break 2
4832 fi
4833done
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837 ;;
4838esac
4839fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4841if test -n "$ac_pt_CXX"; then
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4843$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004844else
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4846$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004848
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849 if test "x$ac_pt_CXX" = x; then
4850 CXX="c++"
4851 else
4852 case $cross_compiling:$ac_tool_warned in
4853yes:)
4854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4856ac_tool_warned=yes ;;
4857esac
4858 CXX=$ac_pt_CXX
4859 fi
4860else
4861 CXX="$ac_cv_path_CXX"
4862fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004864 clang|*/clang) if test -n "$ac_tool_prefix"; then
4865 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4866set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4868$as_echo_n "checking for $ac_word... " >&6; }
4869if ${ac_cv_path_CXX+:} false; then :
4870 $as_echo_n "(cached) " >&6
4871else
4872 case $CXX in
4873 [\\/]* | ?:[\\/]*)
4874 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4875 ;;
4876 *)
4877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878for as_dir in notfound
4879do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004884 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4887 fi
4888done
4889 done
4890IFS=$as_save_IFS
4891
Ned Deilycbfb9a52012-06-23 16:02:19 -07004892 ;;
4893esac
4894fi
4895CXX=$ac_cv_path_CXX
4896if test -n "$CXX"; then
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4898$as_echo "$CXX" >&6; }
4899else
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
4902fi
4903
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004904
4905fi
4906if test -z "$ac_cv_path_CXX"; then
4907 ac_pt_CXX=$CXX
4908 # Extract the first word of "clang++", so it can be a program name with args.
4909set dummy clang++; ac_word=$2
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
4912if ${ac_cv_path_ac_pt_CXX+:} false; then :
4913 $as_echo_n "(cached) " >&6
4914else
4915 case $ac_pt_CXX in
4916 [\\/]* | ?:[\\/]*)
4917 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4918 ;;
4919 *)
4920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921for as_dir in notfound
4922do
4923 IFS=$as_save_IFS
4924 test -z "$as_dir" && as_dir=.
4925 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004927 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4929 break 2
4930 fi
4931done
4932 done
4933IFS=$as_save_IFS
4934
4935 ;;
4936esac
4937fi
4938ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4939if test -n "$ac_pt_CXX"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4941$as_echo "$ac_pt_CXX" >&6; }
4942else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947 if test "x$ac_pt_CXX" = x; then
4948 CXX="clang++"
4949 else
4950 case $cross_compiling:$ac_tool_warned in
4951yes:)
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4954ac_tool_warned=yes ;;
4955esac
4956 CXX=$ac_pt_CXX
4957 fi
4958else
4959 CXX="$ac_cv_path_CXX"
4960fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004961 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004962 icc|*/icc) if test -n "$ac_tool_prefix"; then
4963 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4964set dummy ${ac_tool_prefix}icpc; ac_word=$2
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
4967if ${ac_cv_path_CXX+:} false; then :
4968 $as_echo_n "(cached) " >&6
4969else
4970 case $CXX in
4971 [\\/]* | ?:[\\/]*)
4972 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4973 ;;
4974 *)
4975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in notfound
4977do
4978 IFS=$as_save_IFS
4979 test -z "$as_dir" && as_dir=.
4980 for ac_exec_ext in '' $ac_executable_extensions; do
4981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4982 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4984 break 2
4985 fi
4986done
4987 done
4988IFS=$as_save_IFS
4989
4990 ;;
4991esac
4992fi
4993CXX=$ac_cv_path_CXX
4994if test -n "$CXX"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4996$as_echo "$CXX" >&6; }
4997else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999$as_echo "no" >&6; }
5000fi
5001
5002
5003fi
5004if test -z "$ac_cv_path_CXX"; then
5005 ac_pt_CXX=$CXX
5006 # Extract the first word of "icpc", so it can be a program name with args.
5007set dummy icpc; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if ${ac_cv_path_ac_pt_CXX+:} false; then :
5011 $as_echo_n "(cached) " >&6
5012else
5013 case $ac_pt_CXX in
5014 [\\/]* | ?:[\\/]*)
5015 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5016 ;;
5017 *)
5018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in notfound
5020do
5021 IFS=$as_save_IFS
5022 test -z "$as_dir" && as_dir=.
5023 for ac_exec_ext in '' $ac_executable_extensions; do
5024 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027 break 2
5028 fi
5029done
5030 done
5031IFS=$as_save_IFS
5032
5033 ;;
5034esac
5035fi
5036ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5037if test -n "$ac_pt_CXX"; then
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5039$as_echo "$ac_pt_CXX" >&6; }
5040else
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045 if test "x$ac_pt_CXX" = x; then
5046 CXX="icpc"
5047 else
5048 case $cross_compiling:$ac_tool_warned in
5049yes:)
5050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5052ac_tool_warned=yes ;;
5053esac
5054 CXX=$ac_pt_CXX
5055 fi
5056else
5057 CXX="$ac_cv_path_CXX"
5058fi
5059 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060 esac
5061 if test "$CXX" = "notfound"
5062 then
5063 CXX=""
5064 fi
5065fi
5066if test -z "$CXX"
5067then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005068 if test -n "$ac_tool_prefix"; then
5069 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5070 do
5071 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005075if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077else
5078 if test -n "$CXX"; then
5079 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5080else
5081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5082for as_dir in $PATH
5083do
5084 IFS=$as_save_IFS
5085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005088 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090 break 2
5091 fi
5092done
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095
5096fi
5097fi
5098CXX=$ac_cv_prog_CXX
5099if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5101$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102else
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5104$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105fi
5106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005108 test -n "$CXX" && break
5109 done
5110fi
5111if test -z "$CXX"; then
5112 ac_ct_CXX=$CXX
5113 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5114do
5115 # Extract the first word of "$ac_prog", so it can be a program name with args.
5116set dummy $ac_prog; ac_word=$2
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5118$as_echo_n "checking for $ac_word... " >&6; }
5119if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5120 $as_echo_n "(cached) " >&6
5121else
5122 if test -n "$ac_ct_CXX"; then
5123 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5124else
5125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in $PATH
5127do
5128 IFS=$as_save_IFS
5129 test -z "$as_dir" && as_dir=.
5130 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005132 ac_cv_prog_ac_ct_CXX="$ac_prog"
5133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5134 break 2
5135 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 done
5138IFS=$as_save_IFS
5139
5140fi
5141fi
5142ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5143if test -n "$ac_ct_CXX"; then
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5145$as_echo "$ac_ct_CXX" >&6; }
5146else
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5148$as_echo "no" >&6; }
5149fi
5150
5151
5152 test -n "$ac_ct_CXX" && break
5153done
5154
5155 if test "x$ac_ct_CXX" = x; then
5156 CXX="notfound"
5157 else
5158 case $cross_compiling:$ac_tool_warned in
5159yes:)
5160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5162ac_tool_warned=yes ;;
5163esac
5164 CXX=$ac_ct_CXX
5165 fi
5166fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167
5168 if test "$CXX" = "notfound"
5169 then
5170 CXX=""
5171 fi
5172fi
5173if test "$preset_cxx" != "$CXX"
5174then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005175 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005176
5177 By default, distutils will build C++ extension modules with \"$CXX\".
5178 If this is not intended, then set CXX on the configure command line.
5179 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005180$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005181
5182 By default, distutils will build C++ extension modules with \"$CXX\".
5183 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005184 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185fi
5186
5187
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005188MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5189
5190
5191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5192$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5193cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005194#undef bfin
5195#undef cris
5196#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef hppa
5199#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005201#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005202#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005203#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005205#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005206 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005207#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208# if defined(__x86_64__) && defined(__LP64__)
5209 x86_64-linux-gnu
5210# elif defined(__x86_64__) && defined(__ILP32__)
5211 x86_64-linux-gnux32
5212# elif defined(__i386__)
5213 i386-linux-gnu
5214# elif defined(__aarch64__) && defined(__AARCH64EL__)
5215# if defined(__ILP32__)
5216 aarch64_ilp32-linux-gnu
5217# else
5218 aarch64-linux-gnu
5219# endif
5220# elif defined(__aarch64__) && defined(__AARCH64EB__)
5221# if defined(__ILP32__)
5222 aarch64_be_ilp32-linux-gnu
5223# else
5224 aarch64_be-linux-gnu
5225# endif
5226# elif defined(__alpha__)
5227 alpha-linux-gnu
5228# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5229# if defined(__ARMEL__)
5230 arm-linux-gnueabihf
5231# else
5232 armeb-linux-gnueabihf
5233# endif
5234# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5235# if defined(__ARMEL__)
5236 arm-linux-gnueabi
5237# else
5238 armeb-linux-gnueabi
5239# endif
5240# elif defined(__hppa__)
5241 hppa-linux-gnu
5242# elif defined(__ia64__)
5243 ia64-linux-gnu
5244# elif defined(__m68k__) && !defined(__mcoldfire__)
5245 m68k-linux-gnu
5246# elif defined(__mips_hard_float) && defined(_MIPSEL)
5247# if _MIPS_SIM == _ABIO32
5248 mipsel-linux-gnu
5249# elif _MIPS_SIM == _ABIN32
5250 mips64el-linux-gnuabin32
5251# elif _MIPS_SIM == _ABI64
5252 mips64el-linux-gnuabi64
5253# else
5254# error unknown platform triplet
5255# endif
5256# elif defined(__mips_hard_float)
5257# if _MIPS_SIM == _ABIO32
5258 mips-linux-gnu
5259# elif _MIPS_SIM == _ABIN32
5260 mips64-linux-gnuabin32
5261# elif _MIPS_SIM == _ABI64
5262 mips64-linux-gnuabi64
5263# else
5264# error unknown platform triplet
5265# endif
5266# elif defined(__or1k__)
5267 or1k-linux-gnu
5268# elif defined(__powerpc__) && defined(__SPE__)
5269 powerpc-linux-gnuspe
5270# elif defined(__powerpc64__)
5271# if defined(__LITTLE_ENDIAN__)
5272 powerpc64le-linux-gnu
5273# else
5274 powerpc64-linux-gnu
5275# endif
5276# elif defined(__powerpc__)
5277 powerpc-linux-gnu
5278# elif defined(__s390x__)
5279 s390x-linux-gnu
5280# elif defined(__s390__)
5281 s390-linux-gnu
5282# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5283 sh4-linux-gnu
5284# elif defined(__sparc__) && defined(__arch64__)
5285 sparc64-linux-gnu
5286# elif defined(__sparc__)
5287 sparc-linux-gnu
5288# else
5289# error unknown platform triplet
5290# endif
5291#elif defined(__FreeBSD_kernel__)
5292# if defined(__LP64__)
5293 x86_64-kfreebsd-gnu
5294# elif defined(__i386__)
5295 i386-kfreebsd-gnu
5296# else
5297# error unknown platform triplet
5298# endif
5299#elif defined(__gnu_hurd__)
5300 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005301#elif defined(__APPLE__)
5302 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005303#else
5304# error unknown platform triplet
5305#endif
5306
5307EOF
5308
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005309if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5312$as_echo "$PLATFORM_TRIPLET" >&6; }
5313else
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5315$as_echo "none" >&6; }
5316fi
5317rm -f conftest.c conftest.out
5318
5319if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5320 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5321 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5322 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005323elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5324 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005326
doko@ubuntu.com55532312016-06-14 08:55:19 +02005327if test x$MULTIARCH != x; then
5328 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5329fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005330
5331
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5333$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5334save_LDFLAGS="$LDFLAGS"
5335LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005336
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5338/* end confdefs.h. */
5339
5340int
5341main ()
5342{
5343
5344 ;
5345 return 0;
5346}
5347_ACEOF
5348if ac_fn_c_try_link "$LINENO"; then :
5349 NO_AS_NEEDED="-Wl,--no-as-needed"
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5351$as_echo "yes" >&6; }
5352else
5353 NO_AS_NEEDED=""
5354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5355$as_echo "no" >&6; }
5356fi
5357rm -f core conftest.err conftest.$ac_objext \
5358 conftest$ac_exeext conftest.$ac_ext
5359LDFLAGS="$save_LDFLAGS"
5360
5361
5362
5363# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005364
Matthias Kloseb9621712010-04-24 17:59:49 +00005365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5366$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005367if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369else
5370 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5371 then ac_cv_path_EGREP="$GREP -E"
5372 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 # Loop through the user's path and test for each of PROGNAME-LIST
5376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5378do
5379 IFS=$as_save_IFS
5380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 for ac_prog in egrep; do
5382 for ac_exec_ext in '' $ac_executable_extensions; do
5383 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005384 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005385# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005386 # Check for GNU $ac_path_EGREP
5387case `"$ac_path_EGREP" --version 2>&1` in
5388*GNU*)
5389 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5390*)
5391 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 while :
5394 do
5395 cat "conftest.in" "conftest.in" >"conftest.tmp"
5396 mv "conftest.tmp" "conftest.in"
5397 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5400 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5403 # Best one so far, save it but keep looking for a better one
5404 ac_cv_path_EGREP="$ac_path_EGREP"
5405 ac_path_EGREP_max=$ac_count
5406 fi
5407 # 10*(2^10) chars as input seems more than enough
5408 test $ac_count -gt 10 && break
5409 done
5410 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5411esac
5412
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 $ac_path_EGREP_found && break 3
5414 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005419 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 +00005420 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421else
5422 ac_cv_path_EGREP=$EGREP
5423fi
5424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 fi
5426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5428$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005430
5431
Matthias Kloseb9621712010-04-24 17:59:49 +00005432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5433$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005434if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 $as_echo_n "(cached) " >&6
5436else
5437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005438/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005439#include <stdlib.h>
5440#include <stdarg.h>
5441#include <string.h>
5442#include <float.h>
5443
5444int
5445main ()
5446{
5447
5448 ;
5449 return 0;
5450}
5451_ACEOF
5452if ac_fn_c_try_compile "$LINENO"; then :
5453 ac_cv_header_stdc=yes
5454else
5455 ac_cv_header_stdc=no
5456fi
5457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5458
5459if test $ac_cv_header_stdc = yes; then
5460 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5462/* end confdefs.h. */
5463#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005464
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005465_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005469else
Matthias Kloseb9621712010-04-24 17:59:49 +00005470 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005471fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005472rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473
Matthias Kloseb9621712010-04-24 17:59:49 +00005474fi
5475
5476if test $ac_cv_header_stdc = yes; then
5477 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479/* end confdefs.h. */
5480#include <stdlib.h>
5481
5482_ACEOF
5483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5484 $EGREP "free" >/dev/null 2>&1; then :
5485
5486else
5487 ac_cv_header_stdc=no
5488fi
5489rm -f conftest*
5490
5491fi
5492
5493if test $ac_cv_header_stdc = yes; then
5494 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5495 if test "$cross_compiling" = yes; then :
5496 :
5497else
5498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5499/* end confdefs.h. */
5500#include <ctype.h>
5501#include <stdlib.h>
5502#if ((' ' & 0x0FF) == 0x020)
5503# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5504# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5505#else
5506# define ISLOWER(c) \
5507 (('a' <= (c) && (c) <= 'i') \
5508 || ('j' <= (c) && (c) <= 'r') \
5509 || ('s' <= (c) && (c) <= 'z'))
5510# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5511#endif
5512
5513#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5514int
5515main ()
5516{
5517 int i;
5518 for (i = 0; i < 256; i++)
5519 if (XOR (islower (i), ISLOWER (i))
5520 || toupper (i) != TOUPPER (i))
5521 return 2;
5522 return 0;
5523}
5524_ACEOF
5525if ac_fn_c_try_run "$LINENO"; then :
5526
5527else
5528 ac_cv_header_stdc=no
5529fi
5530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5531 conftest.$ac_objext conftest.beam conftest.$ac_ext
5532fi
5533
5534fi
5535fi
5536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5537$as_echo "$ac_cv_header_stdc" >&6; }
5538if test $ac_cv_header_stdc = yes; then
5539
5540$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5541
5542fi
5543
5544# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5545for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5546 inttypes.h stdint.h unistd.h
5547do :
5548 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5549ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5550"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005551if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 cat >>confdefs.h <<_ACEOF
5553#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5554_ACEOF
5555
5556fi
5557
5558done
5559
5560
5561
5562 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 +02005563if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005564 MINIX=yes
5565else
5566 MINIX=
5567fi
5568
5569
5570 if test "$MINIX" = yes; then
5571
5572$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5573
5574
5575$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5576
5577
5578$as_echo "#define _MINIX 1" >>confdefs.h
5579
5580 fi
5581
5582
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5584$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005585if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005586 $as_echo_n "(cached) " >&6
5587else
5588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5589/* end confdefs.h. */
5590
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005591# define __EXTENSIONS__ 1
5592 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005593int
5594main ()
5595{
5596
5597 ;
5598 return 0;
5599}
5600_ACEOF
5601if ac_fn_c_try_compile "$LINENO"; then :
5602 ac_cv_safe_to_define___extensions__=yes
5603else
5604 ac_cv_safe_to_define___extensions__=no
5605fi
5606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5607fi
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5609$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5610 test $ac_cv_safe_to_define___extensions__ = yes &&
5611 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5612
5613 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5614
5615 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5616
5617 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5618
5619 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5620
5621
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622
Xavier de Gaye95750b12016-07-09 11:05:42 +02005623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5624$as_echo_n "checking for the Android API level... " >&6; }
5625cat >> conftest.c <<EOF
5626#ifdef __ANDROID__
5627#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005628android_api = __ANDROID_API__
5629arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005630#else
5631#error not Android
5632#endif
5633EOF
5634
5635if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005636 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5637 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5639$as_echo "$ANDROID_API_LEVEL" >&6; }
5640
5641cat >>confdefs.h <<_ACEOF
5642#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5643_ACEOF
5644
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005645
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5647$as_echo_n "checking for the Android arm ABI... " >&6; }
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5649$as_echo "$_arm_arch" >&6; }
5650 if test "$_arm_arch" = 7; then
5651 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5652 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5653 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005654else
5655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5656$as_echo "not Android" >&6; }
5657fi
5658rm -f conftest.c conftest.out
5659
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660# Check for unsupported systems
5661case $ac_sys_system/$ac_sys_release in
5662atheos*|Linux*/1*)
5663 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5664 echo See README for details.
5665 exit 1;;
5666esac
5667
5668
Matthias Kloseb9621712010-04-24 17:59:49 +00005669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5670$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005673if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 withval=$with_suffix;
5675 case $withval in
5676 no) EXEEXT=;;
5677 yes) EXEEXT=.exe;;
5678 *) EXEEXT=$withval;;
5679 esac
5680fi
5681
Matthias Kloseb9621712010-04-24 17:59:49 +00005682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5683$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
5685# Test whether we're running on a non-case-sensitive system, in which
5686# case we give a warning if no ext is given
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5689$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690if test ! -d CaseSensitiveTestDir; then
5691mkdir CaseSensitiveTestDir
5692fi
5693
5694if test -d casesensitivetestdir
5695then
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5697$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698 BUILDEXEEXT=.exe
5699else
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5701$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 BUILDEXEEXT=$EXEEXT
5703fi
5704rmdir CaseSensitiveTestDir
5705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706case $ac_sys_system in
5707hp*|HP*)
5708 case $CC in
5709 cc|*/cc) CC="$CC -Ae";;
5710 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711esac
5712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5715$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716if test -z "$LIBRARY"
5717then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005718 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5721$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722
5723# LDLIBRARY is the name of the library to link against (as opposed to the
5724# name of the library into which to insert object files). BLDLIBRARY is also
5725# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5726# is blank as the main program is not linked directly against LDLIBRARY.
5727# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5728# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5729# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5730# DLLLIBRARY is the shared (i.e., DLL) library.
5731#
5732# RUNSHARED is used to run shared python without installed libraries
5733#
5734# INSTSONAME is the name of the shared library that will be use to install
5735# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005736#
5737# LDVERSION is the shared library version number, normally the Python version
5738# with the ABI build flags appended.
5739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740
5741
5742
5743
5744
5745
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747LDLIBRARY="$LIBRARY"
5748BLDLIBRARY='$(LDLIBRARY)'
5749INSTSONAME='$(LDLIBRARY)'
5750DLLLIBRARY=''
5751LDLIBRARYDIR=''
5752RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005753LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755# LINKCC is the command that links the python executable -- default is $(CC).
5756# If CXX is set, and if it is needed to link a main function that was
5757# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5758# python might then depend on the C++ runtime
5759# This is altered for AIX in order to build the export list before
5760# linking.
5761
Matthias Kloseb9621712010-04-24 17:59:49 +00005762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5763$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764if test -z "$LINKCC"
5765then
5766 LINKCC='$(PURIFY) $(MAINCC)'
5767 case $ac_sys_system in
5768 AIX*)
5769 exp_extra="\"\""
5770 if test $ac_sys_release -ge 5 -o \
5771 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5772 exp_extra="."
5773 fi
5774 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775 QNX*)
5776 # qcc must be used because the other compilers do not
5777 # support -N.
5778 LINKCC=qcc;;
5779 esac
5780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5782$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5785# make sure we default having it set to "no": this is used by
5786# distutils.unixccompiler to know if it should add --enable-new-dtags
5787# to linker command lines, and failing to detect GNU ld simply results
5788# in the same bahaviour as before.
5789
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5791$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792ac_prog=ld
5793if test "$GCC" = yes; then
5794 ac_prog=`$CC -print-prog-name=ld`
5795fi
5796case `"$ac_prog" -V 2>&1 < /dev/null` in
5797 *GNU*)
5798 GNULD=yes;;
5799 *)
5800 GNULD=no;;
5801esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5803$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5806$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005808if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 enableval=$enable_shared;
5810fi
5811
5812
5813if test -z "$enable_shared"
5814then
5815 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005816 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817 enable_shared="yes";;
5818 *)
5819 enable_shared="no";;
5820 esac
5821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5823$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824
Matthias Kloseb9621712010-04-24 17:59:49 +00005825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5826$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005828if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829 enableval=$enable_profiling;
5830fi
5831
5832if test "x$enable_profiling" = xyes; then
5833 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005834 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836/* end confdefs.h. */
5837int main() { return 0; }
5838_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005839if ac_fn_c_try_link "$LINENO"; then :
5840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005842 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844rm -f core conftest.err conftest.$ac_objext \
5845 conftest$ac_exeext conftest.$ac_ext
5846 CC="$ac_save_cc"
5847else
5848 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5851$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852
doko@ubuntu.comba015832012-06-30 16:52:05 +02005853if test "x$enable_profiling" = xyes; then
5854 BASECFLAGS="-pg $BASECFLAGS"
5855 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856fi
5857
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5859$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
5861# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5862# library that we build, but we do not want to link against it (we
5863# will find it with a -framework option). For this reason there is an
5864# extra variable BLDLIBRARY against which Python and the extension
5865# modules are linked, BLDLIBRARY. This is normally the same as
5866# LDLIBRARY, but empty for MacOSX framework builds.
5867if test "$enable_framework"
5868then
5869 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005870 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871 BLDLIBRARY=''
5872else
5873 BLDLIBRARY='$(LDLIBRARY)'
5874fi
5875
5876# Other platforms follow
5877if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005878 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879
Matthias Kloseb9621712010-04-24 17:59:49 +00005880$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
5882 case $ac_sys_system in
5883 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005884 LDLIBRARY='libpython$(LDVERSION).dll.a'
5885 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ;;
5887 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005888 LDLIBRARY='libpython$(LDVERSION).so'
5889 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005890 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005892 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005893 then
5894 PY3LIBRARY=libpython3.so
5895 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005897 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005898 LDLIBRARY='libpython$(LDVERSION).so'
5899 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005900 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005902 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005903 then
5904 PY3LIBRARY=libpython3.so
5905 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ;;
5907 hp*|HP*)
5908 case `uname -m` in
5909 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
5912 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ;;
5915 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005916 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005917 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).dylib'
5921 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005924 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005927 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928
5929 esac
5930else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005931 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 case $ac_sys_system in
5933 CYGWIN*)
5934 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 ;;
5937 esac
5938fi
5939
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005940if test "$cross_compiling" = yes; then
5941 RUNSHARED=
5942fi
5943
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5945$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946
5947if test -n "$ac_tool_prefix"; then
5948 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5949set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5951$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005952if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005953 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954else
5955 if test -n "$RANLIB"; then
5956 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5957else
5958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5959for as_dir in $PATH
5960do
5961 IFS=$as_save_IFS
5962 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005963 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005964 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 break 2
5968 fi
5969done
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971IFS=$as_save_IFS
5972
5973fi
5974fi
5975RANLIB=$ac_cv_prog_RANLIB
5976if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5978$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979else
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5981$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982fi
5983
5984
5985fi
5986if test -z "$ac_cv_prog_RANLIB"; then
5987 ac_ct_RANLIB=$RANLIB
5988 # Extract the first word of "ranlib", so it can be a program name with args.
5989set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005992if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994else
5995 if test -n "$ac_ct_RANLIB"; then
5996 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5997else
5998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999for as_dir in $PATH
6000do
6001 IFS=$as_save_IFS
6002 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 break 2
6008 fi
6009done
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011IFS=$as_save_IFS
6012
6013fi
6014fi
6015ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6016if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6018$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019else
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022fi
6023
6024 if test "x$ac_ct_RANLIB" = x; then
6025 RANLIB=":"
6026 else
6027 case $cross_compiling:$ac_tool_warned in
6028yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031ac_tool_warned=yes ;;
6032esac
6033 RANLIB=$ac_ct_RANLIB
6034 fi
6035else
6036 RANLIB="$ac_cv_prog_RANLIB"
6037fi
6038
6039
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006040if test -n "$ac_tool_prefix"; then
6041 for ac_prog in ar aal
6042 do
6043 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6046$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006047if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006048 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049else
6050 if test -n "$AR"; then
6051 ac_cv_prog_AR="$AR" # Let the user override the test.
6052else
6053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054for as_dir in $PATH
6055do
6056 IFS=$as_save_IFS
6057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006058 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006060 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 break 2
6063 fi
6064done
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066IFS=$as_save_IFS
6067
6068fi
6069fi
6070AR=$ac_cv_prog_AR
6071if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6073$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074else
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077fi
6078
6079
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006080 test -n "$AR" && break
6081 done
6082fi
6083if test -z "$AR"; then
6084 ac_ct_AR=$AR
6085 for ac_prog in ar aal
6086do
6087 # Extract the first word of "$ac_prog", so it can be a program name with args.
6088set dummy $ac_prog; ac_word=$2
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
6091if ${ac_cv_prog_ac_ct_AR+:} false; then :
6092 $as_echo_n "(cached) " >&6
6093else
6094 if test -n "$ac_ct_AR"; then
6095 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6096else
6097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6098for as_dir in $PATH
6099do
6100 IFS=$as_save_IFS
6101 test -z "$as_dir" && as_dir=.
6102 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006104 ac_cv_prog_ac_ct_AR="$ac_prog"
6105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6106 break 2
6107 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006108done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006109 done
6110IFS=$as_save_IFS
6111
6112fi
6113fi
6114ac_ct_AR=$ac_cv_prog_ac_ct_AR
6115if test -n "$ac_ct_AR"; then
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6117$as_echo "$ac_ct_AR" >&6; }
6118else
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120$as_echo "no" >&6; }
6121fi
6122
6123
6124 test -n "$ac_ct_AR" && break
6125done
6126
6127 if test "x$ac_ct_AR" = x; then
6128 AR="ar"
6129 else
6130 case $cross_compiling:$ac_tool_warned in
6131yes:)
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6134ac_tool_warned=yes ;;
6135esac
6136 AR=$ac_ct_AR
6137 fi
6138fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139
6140
6141# tweak ARFLAGS only if the user didn't set it on the command line
6142
6143if test -z "$ARFLAGS"
6144then
6145 ARFLAGS="rc"
6146fi
6147
doko@ubuntu.com58844492012-06-30 18:25:32 +02006148if test -n "$ac_tool_prefix"; then
6149 for ac_prog in readelf
6150 do
6151 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6152set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6154$as_echo_n "checking for $ac_word... " >&6; }
6155if ${ac_cv_prog_READELF+:} false; then :
6156 $as_echo_n "(cached) " >&6
6157else
6158 if test -n "$READELF"; then
6159 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6160else
6161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH
6163do
6164 IFS=$as_save_IFS
6165 test -z "$as_dir" && as_dir=.
6166 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006167 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006168 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6169 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6170 break 2
6171 fi
6172done
6173 done
6174IFS=$as_save_IFS
6175
6176fi
6177fi
6178READELF=$ac_cv_prog_READELF
6179if test -n "$READELF"; then
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6181$as_echo "$READELF" >&6; }
6182else
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6184$as_echo "no" >&6; }
6185fi
6186
6187
6188 test -n "$READELF" && break
6189 done
6190fi
6191if test -z "$READELF"; then
6192 ac_ct_READELF=$READELF
6193 for ac_prog in readelf
6194do
6195 # Extract the first word of "$ac_prog", so it can be a program name with args.
6196set dummy $ac_prog; ac_word=$2
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6198$as_echo_n "checking for $ac_word... " >&6; }
6199if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6200 $as_echo_n "(cached) " >&6
6201else
6202 if test -n "$ac_ct_READELF"; then
6203 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6204else
6205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206for as_dir in $PATH
6207do
6208 IFS=$as_save_IFS
6209 test -z "$as_dir" && as_dir=.
6210 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006211 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006212 ac_cv_prog_ac_ct_READELF="$ac_prog"
6213 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6214 break 2
6215 fi
6216done
6217 done
6218IFS=$as_save_IFS
6219
6220fi
6221fi
6222ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6223if test -n "$ac_ct_READELF"; then
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6225$as_echo "$ac_ct_READELF" >&6; }
6226else
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6228$as_echo "no" >&6; }
6229fi
6230
6231
6232 test -n "$ac_ct_READELF" && break
6233done
6234
6235 if test "x$ac_ct_READELF" = x; then
6236 READELF=":"
6237 else
6238 case $cross_compiling:$ac_tool_warned in
6239yes:)
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6241$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6242ac_tool_warned=yes ;;
6243esac
6244 READELF=$ac_ct_READELF
6245 fi
6246fi
6247
6248if test "$cross_compiling" = yes; then
6249 case "$READELF" in
6250 readelf|:)
6251 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6252 ;;
6253 esac
6254fi
6255
6256
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006257
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006259hp*|HP*)
6260 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006261 if test -z "$INSTALL"
6262 then
6263 INSTALL="${srcdir}/install-sh -c"
6264 fi
6265esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266# Find a good install program. We prefer a C program (faster),
6267# so one script is as good as another. But avoid the broken or
6268# incompatible versions:
6269# SysV /etc/install, /usr/sbin/install
6270# SunOS /usr/etc/install
6271# IRIX /sbin/install
6272# AIX /bin/install
6273# AmigaOS /C/install, which installs bootblocks on floppy discs
6274# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6275# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6276# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6277# OS/2's system install, which has a completely different semantic
6278# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006279# Reject install programs that cannot install multiple files.
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6281$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006283if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006284 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285else
6286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287for as_dir in $PATH
6288do
6289 IFS=$as_save_IFS
6290 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006291 # Account for people who put trailing slashes in PATH elements.
6292case $as_dir/ in #((
6293 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296 /usr/ucb/* ) ;;
6297 *)
6298 # OSF1 and SCO ODT 3.0 have their own names for install.
6299 # Don't use installbsd from OSF since it installs stuff as root
6300 # by default.
6301 for ac_prog in ginstall scoinst install; do
6302 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006303 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006304 if test $ac_prog = install &&
6305 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6306 # AIX install. It has an incompatible calling convention.
6307 :
6308 elif test $ac_prog = install &&
6309 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6310 # program-specific install script used by HP pwplus--don't use.
6311 :
6312 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006313 rm -rf conftest.one conftest.two conftest.dir
6314 echo one > conftest.one
6315 echo two > conftest.two
6316 mkdir conftest.dir
6317 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6318 test -s conftest.one && test -s conftest.two &&
6319 test -s conftest.dir/conftest.one &&
6320 test -s conftest.dir/conftest.two
6321 then
6322 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6323 break 3
6324 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 fi
6326 fi
6327 done
6328 done
6329 ;;
6330esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006331
6332 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333IFS=$as_save_IFS
6334
Matthias Kloseb9621712010-04-24 17:59:49 +00006335rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336
6337fi
6338 if test "${ac_cv_path_install+set}" = set; then
6339 INSTALL=$ac_cv_path_install
6340 else
6341 # As a last resort, use the slow shell script. Don't cache a
6342 # value for INSTALL within a source directory, because that will
6343 # break other packages using the cache if that directory is
6344 # removed, or if the value is a relative name.
6345 INSTALL=$ac_install_sh
6346 fi
6347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6349$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350
6351# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6352# It thinks the first close brace ends the variable substitution.
6353test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6354
6355test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6356
6357test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6358
Matthias Klose93a0ef12012-03-15 18:08:34 +01006359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6360$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6361if test -z "$MKDIR_P"; then
6362 if ${ac_cv_path_mkdir+:} false; then :
6363 $as_echo_n "(cached) " >&6
6364else
6365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6366for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6367do
6368 IFS=$as_save_IFS
6369 test -z "$as_dir" && as_dir=.
6370 for ac_prog in mkdir gmkdir; do
6371 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006372 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006373 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6374 'mkdir (GNU coreutils) '* | \
6375 'mkdir (coreutils) '* | \
6376 'mkdir (fileutils) '4.1*)
6377 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6378 break 3;;
6379 esac
6380 done
6381 done
6382 done
6383IFS=$as_save_IFS
6384
6385fi
6386
6387 test -d ./--version && rmdir ./--version
6388 if test "${ac_cv_path_mkdir+set}" = set; then
6389 MKDIR_P="$ac_cv_path_mkdir -p"
6390 else
6391 # As a last resort, use the slow shell script. Don't cache a
6392 # value for MKDIR_P within a source directory, because that will
6393 # break other packages using the cache if that directory is
6394 # removed, or if the value is a relative name.
6395 MKDIR_P="$ac_install_sh -d"
6396 fi
6397fi
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6399$as_echo "$MKDIR_P" >&6; }
6400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401
6402# Not every filesystem supports hard links
6403
6404if test -z "$LN" ; then
6405 case $ac_sys_system in
6406 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006407 *) LN=ln;;
6408 esac
6409fi
6410
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006411# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006412
6413ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006414
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6417$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418
6419# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006420if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421 withval=$with_pydebug;
6422if test "$withval" != no
6423then
6424
Matthias Kloseb9621712010-04-24 17:59:49 +00006425$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426
Matthias Kloseb9621712010-04-24 17:59:49 +00006427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6428$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006430 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006431else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433fi
6434else
Matthias Kloseb9621712010-04-24 17:59:49 +00006435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437fi
6438
6439
T. Woutersddbfa2c2017-05-23 01:30:49 +02006440# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6441# the ABI. This allows enabling assertions without changing the ABI.
6442assertions='false'
6443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6444$as_echo_n "checking for --with-assertions... " >&6; }
6445
6446# Check whether --with-assertions was given.
6447if test "${with_assertions+set}" = set; then :
6448 withval=$with_assertions;
6449if test "$withval" != no
6450then
6451 assertions='true'
6452fi
6453fi
6454
6455if test "$assertions" = 'true'; then
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6457$as_echo "yes" >&6; }
6458elif test "$Py_DEBUG" = 'true'; then
6459 assertions='true'
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6461$as_echo "implied by --with-pydebug" >&6; }
6462else
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
Brett Cannon63d98bc2016-09-06 17:12:40 -07006467# Enable optimization flags
6468
6469
6470Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6472$as_echo_n "checking for --enable-optimizations... " >&6; }
6473# Check whether --enable-optimizations was given.
6474if test "${enable_optimizations+set}" = set; then :
6475 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006476if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006477then
6478 Py_OPT='true'
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6480$as_echo "yes" >&6; };
6481else
6482 Py_OPT='false'
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; };
6485fi
6486else
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; }
6489fi
6490
6491if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006492 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6493 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006494 # 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 +00006495 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006496 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006497 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006498 DEF_MAKE_RULE="build_all"
6499else
6500 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006501 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006502 DEF_MAKE_RULE="all"
6503fi
6504
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006505# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6507$as_echo_n "checking for --with-lto... " >&6; }
6508
6509# Check whether --with-lto was given.
6510if test "${with_lto+set}" = set; then :
6511 withval=$with_lto;
6512if test "$withval" != no
6513then
6514 Py_LTO='true'
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6516$as_echo "yes" >&6; };
6517else
6518 Py_LTO='false'
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6520$as_echo "no" >&6; };
6521fi
6522else
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6524$as_echo "no" >&6; }
6525fi
6526
6527if test "$Py_LTO" = 'true' ; then
6528 case $CC in
6529 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006530 case $ac_sys_system in
6531 Darwin*)
6532 # Any changes made here should be reflected in the GCC+Darwin case below
6533 LTOFLAGS="-flto -Wl,-export_dynamic"
6534 ;;
6535 *)
6536 LTOFLAGS="-flto"
6537 ;;
6538 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006539 ;;
6540 *gcc*)
6541 case $ac_sys_system in
6542 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006543 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006544 ;;
6545 *)
6546 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6547 ;;
6548 esac
6549 ;;
6550 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006551 CFLAGS="$CFLAGS $LTOFLAGS"
6552 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006553fi
6554
Brett Cannon7188a3e2015-09-18 15:13:44 -07006555# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006556
6557
6558
6559
6560
Gregory P. Smith799520c2016-09-07 16:10:00 -07006561# Make this work on systems where llvm tools are not installed with their
6562# normal names in the default $PATH (ie: Ubuntu). They exist under the
6563# non-suffixed name in their versioned llvm directory.
6564llvm_bin_dir=''
6565llvm_path="${PATH}"
6566if test "${CC}" = "clang"
6567then
6568 clang_bin=`which clang`
6569 # Some systems install clang elsewhere as a symlink to the real path
6570 # which is where the related llvm tools are located.
6571 if test -L "${clang_bin}"
6572 then
6573 clang_dir=`dirname "${clang_bin}"`
6574 clang_bin=`readlink "${clang_bin}"`
6575 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6576 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6577 fi
6578fi
Zachary Ware5af85642015-12-21 12:09:17 -06006579
Gregory P. Smith799520c2016-09-07 16:10:00 -07006580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6581$as_echo_n "checking target system type... " >&6; }
6582if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006583 $as_echo_n "(cached) " >&6
6584else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006585 if test "x$target_alias" = x; then
6586 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006587else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006588 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6589 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6590fi
6591
6592fi
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6594$as_echo "$ac_cv_target" >&6; }
6595case $ac_cv_target in
6596*-*-*) ;;
6597*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6598esac
6599target=$ac_cv_target
6600ac_save_IFS=$IFS; IFS='-'
6601set x $ac_cv_target
6602shift
6603target_cpu=$1
6604target_vendor=$2
6605shift; shift
6606# Remember, the first character of IFS is used to create $*,
6607# except with old shells:
6608target_os=$*
6609IFS=$ac_save_IFS
6610case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6611
6612
6613# The aliases save the names the user supplied, while $host etc.
6614# will get canonicalized.
6615test -n "$target_alias" &&
6616 test "$program_prefix$program_suffix$program_transform_name" = \
6617 NONENONEs,x,x, &&
6618 program_prefix=${target_alias}-
6619# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6620set dummy $target_alias-llvm-profdata; ac_word=$2
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6622$as_echo_n "checking for $ac_word... " >&6; }
6623if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6624 $as_echo_n "(cached) " >&6
6625else
6626 case $LLVM_PROFDATA in
6627 [\\/]* | ?:[\\/]*)
6628 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6629 ;;
6630 *)
6631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6632for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006633do
6634 IFS=$as_save_IFS
6635 test -z "$as_dir" && as_dir=.
6636 for ac_exec_ext in '' $ac_executable_extensions; do
6637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006638 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6640 break 2
6641 fi
6642done
6643 done
6644IFS=$as_save_IFS
6645
Gregory P. Smith799520c2016-09-07 16:10:00 -07006646 ;;
6647esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006649LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6650if test -n "$LLVM_PROFDATA"; then
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6652$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006653else
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6655$as_echo "no" >&6; }
6656fi
6657
6658
Gregory P. Smith799520c2016-09-07 16:10:00 -07006659if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6660 if test "$build" = "$target"; then
6661 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6662 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6663set dummy llvm-profdata; ac_word=$2
6664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6665$as_echo_n "checking for $ac_word... " >&6; }
6666if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6667 $as_echo_n "(cached) " >&6
6668else
6669 case $ac_pt_LLVM_PROFDATA in
6670 [\\/]* | ?:[\\/]*)
6671 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6672 ;;
6673 *)
6674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6675for as_dir in ${llvm_path}
6676do
6677 IFS=$as_save_IFS
6678 test -z "$as_dir" && as_dir=.
6679 for ac_exec_ext in '' $ac_executable_extensions; do
6680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6681 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6683 break 2
6684 fi
6685done
6686 done
6687IFS=$as_save_IFS
6688
6689 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6690 ;;
6691esac
6692fi
6693ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6694if test -n "$ac_pt_LLVM_PROFDATA"; then
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6696$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6697else
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6699$as_echo "no" >&6; }
6700fi
6701
6702 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6703 else
6704 LLVM_PROFDATA="''"
6705 fi
6706else
6707 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6708fi
6709
6710
6711if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6712then
6713 LLVM_PROF_FOUND="found"
6714else
6715 LLVM_PROF_FOUND="not-found"
6716fi
6717if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6718then
6719 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6720 if test -n "${found_llvm_profdata}"
6721 then
6722 # llvm-profdata isn't directly in $PATH in some cases.
6723 # https://apple.stackexchange.com/questions/197053/
6724 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6725 LLVM_PROF_FOUND=found
6726 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6727$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6728 fi
6729fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006730LLVM_PROF_ERR=no
6731case $CC in
6732 *clang*)
6733 # Any changes made here should be reflected in the GCC+Darwin case below
6734 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6735 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006736 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006737 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6738 if test $LLVM_PROF_FOUND = not-found
6739 then
6740 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006741 if test "${REQUIRE_PGO}" = "yes"
6742 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006743 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 -07006744 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006745 fi
6746 ;;
6747 *gcc*)
6748 case $ac_sys_system in
6749 Darwin*)
6750 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6751 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006752 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006753 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006754 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006755 then
6756 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006757 if test "${REQUIRE_PGO}" = "yes"
6758 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006759 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 -07006760 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 fi
6762 ;;
6763 *)
6764 PGO_PROF_GEN_FLAG="-fprofile-generate"
6765 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6766 LLVM_PROF_MERGER="true"
6767 LLVM_PROF_FILE=""
6768 ;;
6769 esac
6770 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006771 *icc*)
6772 PGO_PROF_GEN_FLAG="-prof-gen"
6773 PGO_PROF_USE_FLAG="-prof-use"
6774 LLVM_PROF_MERGER="true"
6775 LLVM_PROF_FILE=""
6776 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777esac
6778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6780# merged with this chunk of code?
6781
6782# Optimizer/debugger flags
6783# ------------------------
6784# (The following bit of code is complicated enough - please keep things
6785# indented properly. Just pretend you're editing Python code. ;-)
6786
6787# There are two parallel sets of case statements below, one that checks to
6788# see if OPT was set and one that does BASECFLAGS setting based upon
6789# compiler and platform. BASECFLAGS tweaks need to be made even if the
6790# user set OPT.
6791
6792# tweak OPT based on compiler and platform, only if the user didn't set
6793# it on the command line
6794
Victor Stinner9ed34a82017-05-02 22:35:58 +02006795
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006796if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797then
6798 case $GCC in
6799 yes)
6800 if test "$CC" != 'g++' ; then
6801 STRICT_PROTO="-Wstrict-prototypes"
6802 fi
6803 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6804 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6805 WRAP="-fwrapv"
6806 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006807
Stefan Krahaf04ff22011-12-08 22:20:31 +01006808 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006809 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006810 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006811 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006812 *)
6813 if $CC --version 2>&1 | grep -q clang
6814 then
6815 cc_is_clang=1
6816 else
6817 cc_is_clang=
6818 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006819 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006820
Victor Stinner35f3d242017-04-21 12:35:24 +02006821 if test -n "${cc_is_clang}"
6822 then
6823 # Clang also needs -fwrapv
6824 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006825 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6826 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006827 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006828 fi
6829
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830 case $ac_cv_prog_cc_g in
6831 yes)
6832 if test "$Py_DEBUG" = 'true' ; then
6833 # Optimization messes up debuggers, so turn it off for
6834 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006835 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006836 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006837 else
Victor Stinner28205b22017-04-21 11:24:34 +02006838 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006839 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840 else
Victor Stinner28205b22017-04-21 11:24:34 +02006841 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842 fi
6843 ;;
6844 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006845 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846 ;;
6847 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006848
Victor Stinner826f83f2017-04-28 15:07:10 +02006849 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851 case $ac_sys_system in
6852 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6853 ;;
6854 esac
6855 ;;
6856
6857 *)
6858 OPT="-O"
6859 ;;
6860 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861fi
6862
6863
6864
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006865
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866# The -arch flags for universal builds on OSX
6867UNIVERSAL_ARCH_FLAGS=
6868
6869
6870# tweak BASECFLAGS based on compiler and platform
6871case $GCC in
6872yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006873 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006874
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6876$as_echo_n "checking for -Wextra... " >&6; }
6877 ac_save_cc="$CC"
6878 CC="$CC -Wextra -Werror"
6879 if ${ac_cv_extra_warnings+:} false; then :
6880 $as_echo_n "(cached) " >&6
6881else
6882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6883/* end confdefs.h. */
6884
6885
6886int
6887main ()
6888{
6889
6890 ;
6891 return 0;
6892}
6893
6894_ACEOF
6895if ac_fn_c_try_compile "$LINENO"; then :
6896
6897 ac_cv_extra_warnings=yes
6898
6899else
6900
6901 ac_cv_extra_warnings=no
6902
6903fi
6904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6905fi
6906
6907 CC="$ac_save_cc"
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6909$as_echo "$ac_cv_extra_warnings" >&6; }
6910
6911 if test $ac_cv_extra_warnings = yes
6912 then
6913 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6914 fi
6915
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006916 # Python doesn't violate C99 aliasing rules, but older versions of
6917 # GCC produce warnings for legal Python code. Enable
6918 # -fno-strict-aliasing on versions of GCC that support but produce
6919 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6921$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922 ac_save_cc="$CC"
6923 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006924 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006925 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006927else
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006929/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006930
Matthias Kloseb159a552010-04-25 21:00:44 +00006931
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006932int
6933main ()
6934{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006935
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006936 ;
6937 return 0;
6938}
Matthias Kloseb159a552010-04-25 21:00:44 +00006939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006941if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006942
6943 CC="$ac_save_cc -fstrict-aliasing"
6944 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006946/* end confdefs.h. */
6947
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006948 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006949int
6950main ()
6951{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006952double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006953 ;
6954 return 0;
6955}
Matthias Kloseb159a552010-04-25 21:00:44 +00006956
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006958if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006959
6960 ac_cv_no_strict_aliasing=no
6961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962else
Matthias Kloseb159a552010-04-25 21:00:44 +00006963
6964 ac_cv_no_strict_aliasing=yes
6965
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006966fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006968
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006969else
Matthias Kloseb159a552010-04-25 21:00:44 +00006970
6971 ac_cv_no_strict_aliasing=no
6972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006975fi
6976
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006977 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6980$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006981 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982 then
6983 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6984 fi
6985
Zachary Ware5af85642015-12-21 12:09:17 -06006986 # ICC doesn't recognize the option, but only emits a warning
6987 ## XXX does it emit an unused result warning and can it be disabled?
6988 case "$CC" in
6989 *icc*)
6990 ac_cv_disable_unused_result_warning=no
6991 ;;
6992 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6994$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6995 ac_save_cc="$CC"
6996 CC="$CC -Wunused-result -Werror"
6997 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006998 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006999 $as_echo_n "(cached) " >&6
7000else
7001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7002/* end confdefs.h. */
7003
7004
7005int
7006main ()
7007{
7008
7009 ;
7010 return 0;
7011}
7012
7013_ACEOF
7014if ac_fn_c_try_compile "$LINENO"; then :
7015
7016 ac_cv_disable_unused_result_warning=yes
7017
7018else
7019
7020 ac_cv_disable_unused_result_warning=no
7021
7022fi
7023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7024fi
7025
7026 CFLAGS="$save_CFLAGS"
7027 CC="$ac_save_cc"
7028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7029$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007030 ;;
7031 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007032
7033 if test $ac_cv_disable_unused_result_warning = yes
7034 then
7035 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007036 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7037 fi
7038
7039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7040$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7041 ac_save_cc="$CC"
7042 CC="$CC -Wunused-parameter -Werror"
7043 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7044 $as_echo_n "(cached) " >&6
7045else
7046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7047/* end confdefs.h. */
7048
7049
7050int
7051main ()
7052{
7053
7054 ;
7055 return 0;
7056}
7057
7058_ACEOF
7059if ac_fn_c_try_compile "$LINENO"; then :
7060
7061 ac_cv_disable_unused_parameter_warning=yes
7062
7063else
7064
7065 ac_cv_disable_unused_parameter_warning=no
7066
7067fi
7068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7069fi
7070
7071 CC="$ac_save_cc"
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7073$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7074
7075 if test $ac_cv_disable_unused_parameter_warning = yes
7076 then
7077 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7078 fi
7079
7080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7081$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7082 ac_save_cc="$CC"
7083 CC="$CC -Wmissing-field-initializers -Werror"
7084 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7085 $as_echo_n "(cached) " >&6
7086else
7087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7088/* end confdefs.h. */
7089
7090
7091int
7092main ()
7093{
7094
7095 ;
7096 return 0;
7097}
7098
7099_ACEOF
7100if ac_fn_c_try_compile "$LINENO"; then :
7101
7102 ac_cv_disable_missing_field_initializers=yes
7103
7104else
7105
7106 ac_cv_disable_missing_field_initializers=no
7107
7108fi
7109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7110fi
7111
7112 CC="$ac_save_cc"
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7114$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7115
7116 if test $ac_cv_disable_missing_field_initializers = yes
7117 then
7118 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007119 fi
7120
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7122$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7123 ac_save_cc="$CC"
7124 CC="$CC -Wsign-compare"
7125 save_CFLAGS="$CFLAGS"
7126 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7127 $as_echo_n "(cached) " >&6
7128else
7129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7130/* end confdefs.h. */
7131
7132
7133int
7134main ()
7135{
7136
7137 ;
7138 return 0;
7139}
7140
7141_ACEOF
7142if ac_fn_c_try_compile "$LINENO"; then :
7143
7144 ac_cv_enable_sign_compare_warning=yes
7145
7146else
7147
7148 ac_cv_enable_sign_compare_warning=no
7149
7150fi
7151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7152fi
7153
7154 CFLAGS="$save_CFLAGS"
7155 CC="$ac_save_cc"
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7157$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7158
7159 if test $ac_cv_enable_sign_compare_warning = yes
7160 then
7161 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7162 fi
7163
7164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7165$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7166 ac_save_cc="$CC"
7167 CC="$CC -Wunreachable-code"
7168 save_CFLAGS="$CFLAGS"
7169 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7170 $as_echo_n "(cached) " >&6
7171else
7172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7173/* end confdefs.h. */
7174
7175
7176int
7177main ()
7178{
7179
7180 ;
7181 return 0;
7182}
7183
7184_ACEOF
7185if ac_fn_c_try_compile "$LINENO"; then :
7186
7187 ac_cv_enable_unreachable_code_warning=yes
7188
7189else
7190
7191 ac_cv_enable_unreachable_code_warning=no
7192
7193fi
7194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7195fi
7196
7197 CFLAGS="$save_CFLAGS"
7198 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007199
7200 # Don't enable unreachable code warning in debug mode, since it usually
7201 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007202 # Issue #24324: Unfortunately, the unreachable code warning does not work
7203 # correctly on gcc and has been silently removed from the compiler.
7204 # It is supported on clang but on OS X systems gcc may be an alias
7205 # for clang. Try to determine if the compiler is not really gcc and,
7206 # if so, only then enable the warning.
7207 if test $ac_cv_enable_unreachable_code_warning = yes && \
7208 test "$Py_DEBUG" != "true" && \
7209 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007210 then
7211 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007212 else
7213 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007214 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7216$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007217
Victor Stinner193ee0a2017-02-06 14:24:00 +01007218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7219$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7220 ac_save_cc="$CC"
7221 CC="$CC -Werror=implicit-function-declaration"
7222 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7223 $as_echo_n "(cached) " >&6
7224else
7225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7226/* end confdefs.h. */
7227
7228
7229int
7230main ()
7231{
7232
7233 ;
7234 return 0;
7235}
7236
7237_ACEOF
7238if ac_fn_c_try_compile "$LINENO"; then :
7239
7240 ac_cv_enable_implicit_function_declaration_error=yes
7241
7242else
7243
7244 ac_cv_enable_implicit_function_declaration_error=no
7245
7246fi
7247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7248fi
7249
7250 CC="$ac_save_cc"
7251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7252$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7253
7254 if test $ac_cv_enable_implicit_function_declaration_error = yes
7255 then
7256 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7257 fi
7258
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007259 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7260 # support. Without this, treatment of subnormals doesn't follow
7261 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007262 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263 alpha*)
7264 BASECFLAGS="$BASECFLAGS -mieee"
7265 ;;
7266 esac
7267
7268 case $ac_sys_system in
7269 SCO_SV*)
7270 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7271 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007272
7273 # is there any other compiler on Darwin besides gcc?
7274 Darwin*)
7275 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7276 # used to be here, but non-Apple gcc doesn't accept them.
7277 if test "${CC}" = gcc
7278 then
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007280$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007281 case "${UNIVERSALSDK}" in
7282 */MacOSX10.4u.sdk)
7283 # Build using 10.4 SDK, force usage of gcc when the
7284 # compiler is gcc, otherwise the user will get very
7285 # confusing error messages when building on OSX 10.6
7286 CC=gcc-4.0
7287 CPP=cpp-4.0
7288 ;;
7289 esac
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007291$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007292 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293
Ned Deily87adb6e2013-10-18 21:09:56 -07007294 if test "${enable_universalsdk}"
7295 then
7296 case "$UNIVERSAL_ARCHS" in
7297 32-bit)
7298 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7299 LIPO_32BIT_FLAGS=""
7300 ARCH_RUN_32BIT=""
7301 ;;
7302 64-bit)
7303 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7304 LIPO_32BIT_FLAGS=""
7305 ARCH_RUN_32BIT="true"
7306 ;;
7307 all)
7308 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7309 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7310 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7311 ;;
7312 intel)
7313 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7314 LIPO_32BIT_FLAGS="-extract i386"
7315 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7316 ;;
7317 intel-32)
7318 UNIVERSAL_ARCH_FLAGS="-arch i386"
7319 LIPO_32BIT_FLAGS=""
7320 ARCH_RUN_32BIT=""
7321 ;;
7322 3-way)
7323 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7324 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7325 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7326 ;;
7327 *)
7328 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7329 ;;
7330 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007331
Ned Deily87adb6e2013-10-18 21:09:56 -07007332 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7333 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7334 if test "${UNIVERSALSDK}" != "/"
7335 then
7336 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7337 fi
7338 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007339
Ned Deily87adb6e2013-10-18 21:09:56 -07007340 # Calculate an appropriate deployment target for this build:
7341 # The deployment target value is used explicitly to enable certain
7342 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007343 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007344 # component of the string returned by distutils.get_platform().
7345 #
7346 # Use the value from:
7347 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7348 # 2. the operating system version of the build machine if >= 10.6
7349 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7350 # below to pick either 10.3, 10.4, or 10.5 as the target.
7351 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007352
Ned Deily87adb6e2013-10-18 21:09:56 -07007353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7354$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007355 cur_target_major=`sw_vers -productVersion | \
7356 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7357 cur_target_minor=`sw_vers -productVersion | \
7358 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7359 cur_target="${cur_target_major}.${cur_target_minor}"
7360 if test ${cur_target_major} -eq 10 && \
7361 test ${cur_target_minor} -ge 3 && \
7362 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007363 then
Ned Deily36820b62014-06-25 13:44:22 -07007364 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007365 cur_target=10.3
7366 if test ${enable_universalsdk}
7367 then
7368 case "$UNIVERSAL_ARCHS" in
7369 all|3-way|intel|64-bit)
7370 # These configurations were first supported in 10.5
7371 cur_target='10.5'
7372 ;;
7373 esac
7374 else
7375 if test `/usr/bin/arch` = "i386"
7376 then
7377 # 10.4 was the first release to support Intel archs
7378 cur_target="10.4"
7379 fi
7380 fi
7381 fi
7382 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007383
Ned Deily87adb6e2013-10-18 21:09:56 -07007384 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7385 # environment with a value that is the same as what we'll use
7386 # in the Makefile to ensure that we'll get the same compiler
7387 # environment during configure and build time.
7388 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7389 export MACOSX_DEPLOYMENT_TARGET
7390 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7392$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007393
Ned Deily87adb6e2013-10-18 21:09:56 -07007394 # end of Darwin* tests
7395 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396 esac
7397 ;;
7398
7399*)
7400 case $ac_sys_system in
7401 OpenUNIX*|UnixWare*)
7402 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7403 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404 SCO_SV*)
7405 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7406 ;;
7407 esac
7408 ;;
7409esac
7410
Zachary Ware5af85642015-12-21 12:09:17 -06007411# ICC needs -fp-model strict or floats behave badly
7412case "$CC" in
7413*icc*)
7414 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7415 ;;
7416esac
7417
T. Woutersddbfa2c2017-05-23 01:30:49 +02007418if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419 :
7420else
7421 OPT="-DNDEBUG $OPT"
7422fi
7423
7424if test "$ac_arch_flags"
7425then
7426 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7427fi
7428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429# On some compilers, pthreads are available without further options
7430# (e.g. MacOS X). On some of these systems, the compiler will not
7431# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7432# So we have to see first whether pthreads are available without
7433# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7435$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007436if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438else
Matthias Kloseb9621712010-04-24 17:59:49 +00007439 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440 ac_cv_pthread_is_default=no
7441else
Matthias Kloseb9621712010-04-24 17:59:49 +00007442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443/* end confdefs.h. */
7444
Stefan Krah7dba5942012-11-22 22:49:11 +01007445#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446#include <pthread.h>
7447
7448void* routine(void* p){return NULL;}
7449
7450int main(){
7451 pthread_t p;
7452 if(pthread_create(&p,NULL,routine,NULL)!=0)
7453 return 1;
7454 (void)pthread_detach(p);
7455 return 0;
7456}
7457
7458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007459if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460
7461 ac_cv_pthread_is_default=yes
7462 ac_cv_kthread=no
7463 ac_cv_pthread=no
7464
7465else
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7469 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470fi
7471
7472
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473fi
7474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7476$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477
7478
7479if test $ac_cv_pthread_is_default = yes
7480then
7481 ac_cv_kpthread=no
7482else
7483# -Kpthread, if available, provides the right #defines
7484# and linker options to make pthread_create available
7485# Some compilers won't report that they do not support -Kpthread,
7486# so we need to run a program to see whether it really made the
7487# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7489$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007490if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492else
7493 ac_save_cc="$CC"
7494CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007495if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496 ac_cv_kpthread=no
7497else
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499/* end confdefs.h. */
7500
Stefan Krah7dba5942012-11-22 22:49:11 +01007501#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502#include <pthread.h>
7503
7504void* routine(void* p){return NULL;}
7505
7506int main(){
7507 pthread_t p;
7508 if(pthread_create(&p,NULL,routine,NULL)!=0)
7509 return 1;
7510 (void)pthread_detach(p);
7511 return 0;
7512}
7513
7514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007515if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516 ac_cv_kpthread=yes
7517else
Matthias Kloseb9621712010-04-24 17:59:49 +00007518 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7521 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522fi
7523
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524CC="$ac_save_cc"
7525fi
7526
Matthias Kloseb9621712010-04-24 17:59:49 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7528$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529fi
7530
7531if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7532then
7533# -Kthread, if available, provides the right #defines
7534# and linker options to make pthread_create available
7535# Some compilers won't report that they do not support -Kthread,
7536# so we need to run a program to see whether it really made the
7537# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7539$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007540if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542else
7543 ac_save_cc="$CC"
7544CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007545if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546 ac_cv_kthread=no
7547else
Matthias Kloseb9621712010-04-24 17:59:49 +00007548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549/* end confdefs.h. */
7550
Stefan Krah7dba5942012-11-22 22:49:11 +01007551#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552#include <pthread.h>
7553
7554void* routine(void* p){return NULL;}
7555
7556int main(){
7557 pthread_t p;
7558 if(pthread_create(&p,NULL,routine,NULL)!=0)
7559 return 1;
7560 (void)pthread_detach(p);
7561 return 0;
7562}
7563
7564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007565if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566 ac_cv_kthread=yes
7567else
Matthias Kloseb9621712010-04-24 17:59:49 +00007568 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7571 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572fi
7573
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574CC="$ac_save_cc"
7575fi
7576
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7578$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579fi
7580
7581if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7582then
7583# -pthread, if available, provides the right #defines
7584# and linker options to make pthread_create available
7585# Some compilers won't report that they do not support -pthread,
7586# so we need to run a program to see whether it really made the
7587# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7589$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007590if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007592else
7593 ac_save_cc="$CC"
7594CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007595if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596 ac_cv_pthread=no
7597else
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599/* end confdefs.h. */
7600
Stefan Krah7dba5942012-11-22 22:49:11 +01007601#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602#include <pthread.h>
7603
7604void* routine(void* p){return NULL;}
7605
7606int main(){
7607 pthread_t p;
7608 if(pthread_create(&p,NULL,routine,NULL)!=0)
7609 return 1;
7610 (void)pthread_detach(p);
7611 return 0;
7612}
7613
7614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007615if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616 ac_cv_pthread=yes
7617else
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622fi
7623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624CC="$ac_save_cc"
7625fi
7626
Matthias Kloseb9621712010-04-24 17:59:49 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7628$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629fi
7630
7631# If we have set a CC compiler flag for thread support then
7632# check if it works for CXX, too.
7633ac_cv_cxx_thread=no
7634if test ! -z "$CXX"
7635then
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7637$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638ac_save_cxx="$CXX"
7639
7640if test "$ac_cv_kpthread" = "yes"
7641then
7642 CXX="$CXX -Kpthread"
7643 ac_cv_cxx_thread=yes
7644elif test "$ac_cv_kthread" = "yes"
7645then
7646 CXX="$CXX -Kthread"
7647 ac_cv_cxx_thread=yes
7648elif test "$ac_cv_pthread" = "yes"
7649then
7650 CXX="$CXX -pthread"
7651 ac_cv_cxx_thread=yes
7652fi
7653
7654if test $ac_cv_cxx_thread = yes
7655then
7656 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7657 $CXX -c conftest.$ac_ext 2>&5
7658 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7659 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7660 then
7661 ac_cv_cxx_thread=yes
7662 else
7663 ac_cv_cxx_thread=no
7664 fi
7665 rm -fr conftest*
7666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7668$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669fi
7670CXX="$ac_save_cxx"
7671
7672
7673# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7675$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007676if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678else
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680/* end confdefs.h. */
7681#include <stdlib.h>
7682#include <stdarg.h>
7683#include <string.h>
7684#include <float.h>
7685
7686int
7687main ()
7688{
7689
7690 ;
7691 return 0;
7692}
7693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007694if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695 ac_cv_header_stdc=yes
7696else
Matthias Kloseb9621712010-04-24 17:59:49 +00007697 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7700
7701if test $ac_cv_header_stdc = yes; then
7702 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704/* end confdefs.h. */
7705#include <string.h>
7706
7707_ACEOF
7708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 $EGREP "memchr" >/dev/null 2>&1; then :
7710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711else
7712 ac_cv_header_stdc=no
7713fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007714rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715
7716fi
7717
7718if test $ac_cv_header_stdc = yes; then
7719 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721/* end confdefs.h. */
7722#include <stdlib.h>
7723
7724_ACEOF
7725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 $EGREP "free" >/dev/null 2>&1; then :
7727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728else
7729 ac_cv_header_stdc=no
7730fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007731rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732
7733fi
7734
7735if test $ac_cv_header_stdc = yes; then
7736 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738 :
7739else
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741/* end confdefs.h. */
7742#include <ctype.h>
7743#include <stdlib.h>
7744#if ((' ' & 0x0FF) == 0x020)
7745# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7746# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7747#else
7748# define ISLOWER(c) \
7749 (('a' <= (c) && (c) <= 'i') \
7750 || ('j' <= (c) && (c) <= 'r') \
7751 || ('s' <= (c) && (c) <= 'z'))
7752# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7753#endif
7754
7755#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7756int
7757main ()
7758{
7759 int i;
7760 for (i = 0; i < 256; i++)
7761 if (XOR (islower (i), ISLOWER (i))
7762 || toupper (i) != TOUPPER (i))
7763 return 2;
7764 return 0;
7765}
7766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007767if ac_fn_c_try_run "$LINENO"; then :
7768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769else
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774fi
7775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776fi
7777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7779$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780if test $ac_cv_header_stdc = yes; then
7781
Matthias Kloseb9621712010-04-24 17:59:49 +00007782$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783
7784fi
7785
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007786for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007787fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007788ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007789sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007790unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007791poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007792sys/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 +01007793sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007794sys/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 +01007795sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007796sys/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 -07007797libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007798linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007799sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007800do :
7801 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7802ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007803if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007804 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007805#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007806_ACEOF
7807
7808fi
7809
Guido van Rossum627b2d71993-12-24 10:39:16 +00007810done
7811
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007812ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007813for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7816$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007817if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007821/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007822#include <sys/types.h>
7823#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007824
Martin v. Löwis11437992002-04-12 09:54:03 +00007825int
7826main ()
7827{
7828if ((DIR *) 0)
7829return 0;
7830 ;
7831 return 0;
7832}
7833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007836else
Matthias Kloseb9621712010-04-24 17:59:49 +00007837 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841eval ac_res=\$$as_ac_Header
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7843$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007844if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007846#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007847_ACEOF
7848
7849ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007850fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007851
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007852done
7853# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7854if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7856$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007857if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859else
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864/* Override any GCC internal prototype to avoid an error.
7865 Use char because int might match the return type of a GCC
7866 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007867#ifdef __cplusplus
7868extern "C"
7869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007870char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007871int
7872main ()
7873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 ;
7876 return 0;
7877}
7878_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879for ac_lib in '' dir; do
7880 if test -z "$ac_lib"; then
7881 ac_res="none required"
7882 else
7883 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007884 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889rm -f core conftest.err conftest.$ac_objext \
7890 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007891 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894done
Victor Stinnere0be4232011-10-25 13:06:09 +02007895if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897else
7898 ac_cv_search_opendir=no
7899fi
7900rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007901LIBS=$ac_func_search_save_LIBS
7902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7904$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007906if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007908
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007910
Michael W. Hudson54241132001-12-07 15:38:26 +00007911else
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7913$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007914if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007916else
7917 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921/* Override any GCC internal prototype to avoid an error.
7922 Use char because int might match the return type of a GCC
7923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007924#ifdef __cplusplus
7925extern "C"
7926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007927char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ;
7933 return 0;
7934}
7935_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936for ac_lib in '' x; do
7937 if test -z "$ac_lib"; then
7938 ac_res="none required"
7939 else
7940 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007948 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951done
Victor Stinnere0be4232011-10-25 13:06:09 +02007952if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954else
7955 ac_cv_search_opendir=no
7956fi
7957rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007958LIBS=$ac_func_search_save_LIBS
7959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7961$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007963if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007966fi
7967
7968fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007969
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7971$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007972if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007973 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007974else
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007976/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007977#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007978int
7979main ()
7980{
7981return makedev(0, 0);
7982 ;
7983 return 0;
7984}
7985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007986if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007987 ac_cv_header_sys_types_h_makedev=yes
7988else
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007991rm -f core conftest.err conftest.$ac_objext \
7992 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007993
7994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7996$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007997
7998if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007999ac_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 +02008000if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008001
Matthias Kloseb9621712010-04-24 17:59:49 +00008002$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008003
8004fi
8005
8006
8007
8008 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 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 +02008010if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008011
Matthias Kloseb9621712010-04-24 17:59:49 +00008012$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008013
8014fi
8015
8016
8017 fi
8018fi
8019
Michael W. Hudson54241132001-12-07 15:38:26 +00008020
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008021# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8022# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8023SAVE_CFLAGS=$CFLAGS
8024CFLAGS="-std=c99 $CFLAGS"
8025for ac_header in bluetooth/bluetooth.h
8026do :
8027 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8028if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8029 cat >>confdefs.h <<_ACEOF
8030#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8031_ACEOF
8032
8033fi
8034
8035done
8036
8037CFLAGS=$SAVE_CFLAGS
8038
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008039# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8040for ac_header in net/if.h
8041do :
8042 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8043#ifdef STDC_HEADERS
8044# include <stdlib.h>
8045# include <stddef.h>
8046#else
8047# ifdef HAVE_STDLIB_H
8048# include <stdlib.h>
8049# endif
8050#endif
8051#ifdef HAVE_SYS_SOCKET_H
8052# include <sys/socket.h>
8053#endif
8054
8055"
Victor Stinnere0be4232011-10-25 13:06:09 +02008056if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008057 cat >>confdefs.h <<_ACEOF
8058#define HAVE_NET_IF_H 1
8059_ACEOF
8060
8061fi
8062
8063done
8064
8065
Martin v. Löwis11017b12006-01-14 18:12:57 +00008066# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008067for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008068do :
8069 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 +00008070#ifdef HAVE_ASM_TYPES_H
8071#include <asm/types.h>
8072#endif
8073#ifdef HAVE_SYS_SOCKET_H
8074#include <sys/socket.h>
8075#endif
8076
Matthias Kloseb9621712010-04-24 17:59:49 +00008077"
Victor Stinnere0be4232011-10-25 13:06:09 +02008078if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008079 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008080#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008081_ACEOF
8082
8083fi
8084
8085done
8086
8087
caaveryeffc12f2017-09-06 18:18:10 -04008088for ac_header in linux/vm_sockets.h
8089do :
8090 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8091#ifdef HAVE_SYS_SOCKET_H
8092#include <sys/socket.h>
8093#endif
8094
8095"
8096if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8097 cat >>confdefs.h <<_ACEOF
8098#define HAVE_LINUX_VM_SOCKETS_H 1
8099_ACEOF
8100
8101fi
8102
8103done
8104
8105
Charles-François Natali47413c12011-10-06 19:47:44 +02008106# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008107for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008108do :
8109 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8110ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8111#ifdef HAVE_SYS_SOCKET_H
8112#include <sys/socket.h>
8113#endif
8114
8115"
8116if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8117 cat >>confdefs.h <<_ACEOF
8118#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8119_ACEOF
8120
8121fi
8122
8123done
8124
8125
Guido van Rossum627b2d71993-12-24 10:39:16 +00008126# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008127was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8129$as_echo_n "checking for clock_t in time.h... " >&6; }
8130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008131/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008132#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008133
8134_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008137 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008138else
Martin v. Löwis11437992002-04-12 09:54:03 +00008139
8140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008142
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008143
Guido van Rossum627b2d71993-12-24 10:39:16 +00008144fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008145rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8148$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8151$as_echo_n "checking for makedev... " >&6; }
8152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008153/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008154
Jesus Cea740f53a2010-04-28 11:35:30 +00008155#if defined(MAJOR_IN_MKDEV)
8156#include <sys/mkdev.h>
8157#elif defined(MAJOR_IN_SYSMACROS)
8158#include <sys/sysmacros.h>
8159#else
8160#include <sys/types.h>
8161#endif
8162
Neal Norwitz11690112002-07-30 01:08:28 +00008163int
8164main ()
8165{
Jesus Cea740f53a2010-04-28 11:35:30 +00008166
8167 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008168 ;
8169 return 0;
8170}
Matthias Kloseb159a552010-04-25 21:00:44 +00008171
Neal Norwitz11690112002-07-30 01:08:28 +00008172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008173if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008174 ac_cv_has_makedev=yes
8175else
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008178rm -f core conftest.err conftest.$ac_objext \
8179 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8181$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008182if test "$ac_cv_has_makedev" = "yes"; then
8183
Matthias Kloseb9621712010-04-24 17:59:49 +00008184$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008185
8186fi
8187
Christian Heimes985ecdc2013-11-20 11:46:18 +01008188# byte swapping
8189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8190$as_echo_n "checking for le64toh... " >&6; }
8191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8192/* end confdefs.h. */
8193
8194#ifdef HAVE_ENDIAN_H
8195#include <endian.h>
8196#elif defined(HAVE_SYS_ENDIAN_H)
8197#include <sys/endian.h>
8198#endif
8199
8200int
8201main ()
8202{
8203
8204 le64toh(1)
8205 ;
8206 return 0;
8207}
8208
8209_ACEOF
8210if ac_fn_c_try_link "$LINENO"; then :
8211 ac_cv_has_le64toh=yes
8212else
8213 ac_cv_has_le64toh=no
8214fi
8215rm -f core conftest.err conftest.$ac_objext \
8216 conftest$ac_exeext conftest.$ac_ext
8217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8218$as_echo "$ac_cv_has_le64toh" >&6; }
8219if test "$ac_cv_has_le64toh" = "yes"; then
8220
8221$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8222
8223fi
8224
Martin v. Löwis399a6892002-10-04 10:22:02 +00008225use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008226# Don't use largefile support for GNU/Hurd
8227case $ac_sys_system in GNU*)
8228 use_lfs=no
8229esac
8230
Martin v. Löwis399a6892002-10-04 10:22:02 +00008231if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008232# Two defines needed to enable largefile support on various platforms
8233# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008234case $ac_sys_system/$ac_sys_release in
8235AIX*)
8236
8237$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8238
8239 ;;
8240esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008241
Matthias Kloseb9621712010-04-24 17:59:49 +00008242$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008243
8244
Matthias Kloseb9621712010-04-24 17:59:49 +00008245$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008246
Martin v. Löwis399a6892002-10-04 10:22:02 +00008247fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008248
Guido van Rossum84e7b241996-08-19 21:59:00 +00008249# Add some code to confdefs.h so that the test for off_t works on SCO
8250cat >> confdefs.h <<\EOF
8251#if defined(SCO_DS)
8252#undef _OFF_T
8253#endif
8254EOF
8255
Guido van Rossumef2255b2000-03-10 22:30:29 +00008256# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008257ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008258if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008259
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008260else
Martin v. Löwis11437992002-04-12 09:54:03 +00008261
8262cat >>confdefs.h <<_ACEOF
8263#define mode_t int
8264_ACEOF
8265
8266fi
8267
Matthias Kloseb9621712010-04-24 17:59:49 +00008268ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008269if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008270
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008271else
Martin v. Löwis11437992002-04-12 09:54:03 +00008272
8273cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008275_ACEOF
8276
8277fi
8278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008280if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008281
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008282else
Martin v. Löwis11437992002-04-12 09:54:03 +00008283
8284cat >>confdefs.h <<_ACEOF
8285#define pid_t int
8286_ACEOF
8287
8288fi
8289
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008290
Martin v. Löwis11437992002-04-12 09:54:03 +00008291cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008292#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008293_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008294
Matthias Kloseb9621712010-04-24 17:59:49 +00008295ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008296if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008297
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008298else
Martin v. Löwis11437992002-04-12 09:54:03 +00008299
8300cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008302_ACEOF
8303
8304fi
8305
Matthias Kloseb9621712010-04-24 17:59:49 +00008306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8307$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008308if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008309 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008310else
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008312/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008313#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008314
8315_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008318 ac_cv_type_uid_t=yes
8319else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008320 ac_cv_type_uid_t=no
8321fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008322rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008323
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8326$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008327if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008330
8331
Matthias Kloseb9621712010-04-24 17:59:49 +00008332$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008333
8334fi
8335
Mark Dickinson983bc162012-12-02 12:11:38 +00008336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008338if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008341
8342fi
8343
Stefan Krah1919b7e2012-03-21 18:25:23 +01008344ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8345if test "x$ac_cv_type___uint128_t" = xyes; then :
8346
8347$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8348
8349fi
8350
Jack Jansendd19cf82001-12-06 22:36:17 +00008351
Michael W. Hudson54241132001-12-07 15:38:26 +00008352# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008353# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008354# The cast to long int works around a bug in the HP C Compiler
8355# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8356# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8357# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8359$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008360if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 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 +00008364
Martin v. Löwis11437992002-04-12 09:54:03 +00008365else
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 if test "$ac_cv_type_int" = yes; then
8367 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8368$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008369as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008370See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008371 else
8372 ac_cv_sizeof_int=0
8373 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008375
Martin v. Löwis11437992002-04-12 09:54:03 +00008376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8378$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379
8380
8381
Martin v. Löwis11437992002-04-12 09:54:03 +00008382cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008383#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008384_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008385
8386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387# The cast to long int works around a bug in the HP C Compiler
8388# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8389# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8390# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8392$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008393if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008395else
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 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 +00008397
Martin v. Löwis11437992002-04-12 09:54:03 +00008398else
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 if test "$ac_cv_type_long" = yes; then
8400 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8401$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008402as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008403See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404 else
8405 ac_cv_sizeof_long=0
8406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8411$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412
8413
8414
Martin v. Löwis11437992002-04-12 09:54:03 +00008415cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008416#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008417_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008418
8419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420# The cast to long int works around a bug in the HP C Compiler
8421# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8422# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8423# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8425$as_echo_n "checking size of long long... " >&6; }
8426if ${ac_cv_sizeof_long_long+:} false; then :
8427 $as_echo_n "(cached) " >&6
8428else
8429 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8430
8431else
8432 if test "$ac_cv_type_long_long" = yes; then
8433 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8435as_fn_error 77 "cannot compute sizeof (long long)
8436See \`config.log' for more details" "$LINENO" 5; }
8437 else
8438 ac_cv_sizeof_long_long=0
8439 fi
8440fi
8441
8442fi
8443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8444$as_echo "$ac_cv_sizeof_long_long" >&6; }
8445
8446
8447
8448cat >>confdefs.h <<_ACEOF
8449#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8450_ACEOF
8451
8452
8453# The cast to long int works around a bug in the HP C Compiler
8454# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8455# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8456# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8458$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008459if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008461else
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 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 +00008463
Martin v. Löwis11437992002-04-12 09:54:03 +00008464else
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 if test "$ac_cv_type_void_p" = yes; then
8466 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008468as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008469See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470 else
8471 ac_cv_sizeof_void_p=0
8472 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474
Martin v. Löwis11437992002-04-12 09:54:03 +00008475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8477$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478
8479
8480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008482#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008483_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008484
8485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486# The cast to long int works around a bug in the HP C Compiler
8487# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8488# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8489# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8491$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008492if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 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 +00008496
Martin v. Löwis11437992002-04-12 09:54:03 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 if test "$ac_cv_type_short" = yes; then
8499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008501as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008502See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503 else
8504 ac_cv_sizeof_short=0
8505 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8510$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511
8512
8513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008515#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008516_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008517
8518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519# The cast to long int works around a bug in the HP C Compiler
8520# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8521# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8522# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8524$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008525if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008527else
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 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 +00008529
Martin v. Löwis11437992002-04-12 09:54:03 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 if test "$ac_cv_type_float" = yes; then
8532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008534as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008535See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536 else
8537 ac_cv_sizeof_float=0
8538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8543$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544
8545
8546
Martin v. Löwis11437992002-04-12 09:54:03 +00008547cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008548#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008549_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008550
8551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552# The cast to long int works around a bug in the HP C Compiler
8553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8555# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8557$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008558if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008559 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008560else
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 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 +00008562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563else
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 if test "$ac_cv_type_double" = yes; then
8565 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008567as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008568See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569 else
8570 ac_cv_sizeof_double=0
8571 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8576$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577
8578
8579
Martin v. Löwis11437992002-04-12 09:54:03 +00008580cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008581#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008582_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008583
8584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585# The cast to long int works around a bug in the HP C Compiler
8586# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8587# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8588# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8590$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008591if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008593else
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 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 +00008595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596else
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 if test "$ac_cv_type_fpos_t" = yes; then
8598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008600as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008601See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602 else
8603 ac_cv_sizeof_fpos_t=0
8604 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8609$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610
8611
8612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008614#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008616
Michael W. Hudson54241132001-12-07 15:38:26 +00008617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618# The cast to long int works around a bug in the HP C Compiler
8619# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8620# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8621# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8623$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008624if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008626else
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 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 +00008628
Martin v. Löwis18e16552006-02-15 17:27:45 +00008629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 if test "$ac_cv_type_size_t" = yes; then
8631 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008633as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008634See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 else
8636 ac_cv_sizeof_size_t=0
8637 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639
Martin v. Löwis18e16552006-02-15 17:27:45 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8642$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643
8644
8645
Martin v. Löwis18e16552006-02-15 17:27:45 +00008646cat >>confdefs.h <<_ACEOF
8647#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8648_ACEOF
8649
8650
Christian Heimes400adb02008-02-01 08:12:03 +00008651# The cast to long int works around a bug in the HP C Compiler
8652# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8653# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8654# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8656$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008657if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008659else
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 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 +00008661
Christian Heimes400adb02008-02-01 08:12:03 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 if test "$ac_cv_type_pid_t" = yes; then
8664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008666as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008667See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008668 else
8669 ac_cv_sizeof_pid_t=0
8670 fi
8671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672
Christian Heimes400adb02008-02-01 08:12:03 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8675$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008676
8677
8678
8679cat >>confdefs.h <<_ACEOF
8680#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8681_ACEOF
8682
8683
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008684# The cast to long int works around a bug in the HP C Compiler
8685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8687# This bug is HP SR number 8606223364.
8688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8689$as_echo_n "checking size of uintptr_t... " >&6; }
8690if ${ac_cv_sizeof_uintptr_t+:} false; then :
8691 $as_echo_n "(cached) " >&6
8692else
8693 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8694
8695else
8696 if test "$ac_cv_type_uintptr_t" = yes; then
8697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8699as_fn_error 77 "cannot compute sizeof (uintptr_t)
8700See \`config.log' for more details" "$LINENO" 5; }
8701 else
8702 ac_cv_sizeof_uintptr_t=0
8703 fi
8704fi
8705
8706fi
8707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8708$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8709
8710
8711
8712cat >>confdefs.h <<_ACEOF
8713#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8714_ACEOF
8715
8716
Michael W. Hudson54241132001-12-07 15:38:26 +00008717
Matthias Kloseb9621712010-04-24 17:59:49 +00008718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8719$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008720have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008722/* end confdefs.h. */
8723
8724int
8725main ()
8726{
8727long double x; x = (long double)0;
8728 ;
8729 return 0;
8730}
8731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008732if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008733
8734
Matthias Kloseb9621712010-04-24 17:59:49 +00008735$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008736
8737 have_long_double=yes
8738
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008739fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8742$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008743if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008744# The cast to long int works around a bug in the HP C Compiler
8745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8747# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8749$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008750if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008752else
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 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 +00008754
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008755else
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 if test "$ac_cv_type_long_double" = yes; then
8757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008759as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008760See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008761 else
8762 ac_cv_sizeof_long_double=0
8763 fi
8764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008765
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8768$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008769
8770
8771
8772cat >>confdefs.h <<_ACEOF
8773#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8774_ACEOF
8775
8776
8777fi
8778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779# The cast to long int works around a bug in the HP C Compiler
8780# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8781# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8782# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8784$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008785if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 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 +00008789
Thomas Woutersb2137042007-02-01 18:02:27 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 if test "$ac_cv_type__Bool" = yes; then
8792 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008794as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008795See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008796 else
8797 ac_cv_sizeof__Bool=0
8798 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008800
Thomas Woutersb2137042007-02-01 18:02:27 +00008801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8803$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008804
8805
8806
Thomas Woutersb2137042007-02-01 18:02:27 +00008807cat >>confdefs.h <<_ACEOF
8808#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8809_ACEOF
8810
8811
Thomas Woutersb2137042007-02-01 18:02:27 +00008812
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008813# The cast to long int works around a bug in the HP C Compiler
8814# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8815# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8816# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8818$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008819if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008821else
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008823#ifdef HAVE_SYS_TYPES_H
8824#include <sys/types.h>
8825#endif
8826
Matthias Kloseb9621712010-04-24 17:59:49 +00008827"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008828
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829else
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 if test "$ac_cv_type_off_t" = yes; then
8831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008833as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008834See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008835 else
8836 ac_cv_sizeof_off_t=0
8837 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008839
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8842$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008843
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008844
8845
Martin v. Löwis11437992002-04-12 09:54:03 +00008846cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008847#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008848_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008849
Michael W. Hudson54241132001-12-07 15:38:26 +00008850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851
Matthias Kloseb9621712010-04-24 17:59:49 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8853$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008854if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008855 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008856
Matthias Kloseb9621712010-04-24 17:59:49 +00008857$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008858
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8860$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008861else
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8863$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008864fi
8865
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008866# The cast to long int works around a bug in the HP C Compiler
8867# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8868# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8869# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8871$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008872if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008874else
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008876#ifdef HAVE_SYS_TYPES_H
8877#include <sys/types.h>
8878#endif
8879#ifdef HAVE_TIME_H
8880#include <time.h>
8881#endif
8882
Matthias Kloseb9621712010-04-24 17:59:49 +00008883"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008884
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008885else
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 if test "$ac_cv_type_time_t" = yes; then
8887 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008889as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008890See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008891 else
8892 ac_cv_sizeof_time_t=0
8893 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008895
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8898$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008899
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008900
8901
Martin v. Löwis11437992002-04-12 09:54:03 +00008902cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008903#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008904_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008905
Michael W. Hudson54241132001-12-07 15:38:26 +00008906
8907
Trent Mick635f6fb2000-08-23 21:33:05 +00008908# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008909ac_save_cc="$CC"
8910if test "$ac_cv_kpthread" = "yes"
8911then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008912elif test "$ac_cv_kthread" = "yes"
8913then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008914elif test "$ac_cv_pthread" = "yes"
8915then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008916fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917
Matthias Kloseb9621712010-04-24 17:59:49 +00008918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8919$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008920have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008923
8924 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008925int
8926main ()
8927{
Guido van Rossum12580492000-09-24 16:47:19 +00008928pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ;
8930 return 0;
8931}
Matthias Kloseb159a552010-04-25 21:00:44 +00008932
Martin v. Löwis11437992002-04-12 09:54:03 +00008933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008934if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008935 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8939$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008940if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008942# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8943# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8944# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8946$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008947if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008949else
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008951#ifdef HAVE_PTHREAD_H
8952#include <pthread.h>
8953#endif
8954
Matthias Kloseb9621712010-04-24 17:59:49 +00008955"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008956
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008957else
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 if test "$ac_cv_type_pthread_t" = yes; then
8959 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008961as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008962See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008963 else
8964 ac_cv_sizeof_pthread_t=0
8965 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008967
Trent Mick635f6fb2000-08-23 21:33:05 +00008968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8970$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008971
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008972
8973
Martin v. Löwis11437992002-04-12 09:54:03 +00008974cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008975#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008976_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008977
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008978
Trent Mick635f6fb2000-08-23 21:33:05 +00008979fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008980CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008981
Michael W. Hudson54241132001-12-07 15:38:26 +00008982
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008983case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008984 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008985 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8986 ;;
8987 Darwin/*)
8988 OTHER_LIBTOOL_OPT=""
8989 ;;
8990esac
8991
8992
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008993
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008994case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008995 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008996 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8997 if test "${enable_universalsdk}"; then
8998 :
8999 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009000 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009001 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009002 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009003 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009004 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009005 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009006 if test ${gcc_version} '<' 4.0
9007 then
9008 LIBTOOL_CRUFT="-lcc_dynamic"
9009 else
9010 LIBTOOL_CRUFT=""
9011 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009013 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009014else
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009016/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009017
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018 #include <unistd.h>
9019 int main(int argc, char*argv[])
9020 {
9021 if (sizeof(long) == 4) {
9022 return 0;
9023 } else {
9024 return 1;
9025 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009026 }
9027
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009029if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009030 ac_osx_32bit=yes
9031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036fi
9037
9038
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009039 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009040 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009041 i386)
9042 MACOSX_DEFAULT_ARCH="i386"
9043 ;;
9044 ppc)
9045 MACOSX_DEFAULT_ARCH="ppc"
9046 ;;
9047 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009048 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009049 ;;
9050 esac
9051 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009052 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053 i386)
9054 MACOSX_DEFAULT_ARCH="x86_64"
9055 ;;
9056 ppc)
9057 MACOSX_DEFAULT_ARCH="ppc64"
9058 ;;
9059 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009060 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009061 ;;
9062 esac
9063
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009064 fi
9065
9066 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009067 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009068 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009069esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9071$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009072if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009073then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009074 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009076 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009077
Matthias Kloseb9621712010-04-24 17:59:49 +00009078$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009079
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9081$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009082 if test $enable_shared = "yes"
9083 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009084 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 +00009085 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009086else
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9088$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009089fi
9090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9092$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009093case $ac_sys_system/$ac_sys_release in
9094 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009095
Matthias Kloseb9621712010-04-24 17:59:49 +00009096$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009097
Matthias Kloseb9621712010-04-24 17:59:49 +00009098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9099$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009100 ;;
9101 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9103$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009104 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009105esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009106
Guido van Rossum0a516c91994-09-12 10:58:40 +00009107# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009108
Michael W. Hudson54241132001-12-07 15:38:26 +00009109
9110
9111
9112
Benjamin Peterson99f03762010-04-11 22:15:28 +00009113
Thomas Wouters477c8d52006-05-27 19:21:47 +00009114
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009115# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9116# -- usually .so, .sl on HP-UX, .dll on Cygwin
9117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9118$as_echo_n "checking the extension of shared libraries... " >&6; }
9119if test -z "$SHLIB_SUFFIX"; then
9120 case $ac_sys_system in
9121 hp*|HP*)
9122 case `uname -m` in
9123 ia64) SHLIB_SUFFIX=.so;;
9124 *) SHLIB_SUFFIX=.sl;;
9125 esac
9126 ;;
9127 CYGWIN*) SHLIB_SUFFIX=.dll;;
9128 *) SHLIB_SUFFIX=.so;;
9129 esac
9130fi
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9132$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009133
Guido van Rossum0a516c91994-09-12 10:58:40 +00009134# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009135# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009136# (Shared libraries in this instance are shared modules to be loaded into
9137# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9139$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009140if test -z "$LDSHARED"
9141then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009142 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009143 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009144 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009145 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009146 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009148 if test "$GCC" = "yes" ; then
9149 LDSHARED='$(CC) -shared'
9150 LDCXXSHARED='$(CXX) -shared'
9151 else
9152 LDSHARED='$(CC) -G'
9153 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009154 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009155 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009156 if test "$GCC" = "yes" ; then
9157 LDSHARED='$(CC) -shared'
9158 LDCXXSHARED='$(CXX) -shared'
9159 else
9160 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009161 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009162 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009163 LDSHARED='$(CC) -bundle'
9164 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009165 if test "$enable_framework" ; then
9166 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009167 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9168 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009169 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009170 else
9171 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009172 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009173 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009174 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009175 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009176 LDSHARED='$(CC) -bundle'
9177 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009178 if test "$enable_framework" ; then
9179 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009180 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9181 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009182 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009183 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009184 # No framework, use the Python app as bundle-loader
9185 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009186 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009187 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009188 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009189 Darwin/*)
9190 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9191 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009192
Ned Deily36820b62014-06-25 13:44:22 -07009193 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9194 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9195 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9196 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9197 if test ${dep_target_major} -eq 10 && \
9198 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009199 then
Ned Deily36820b62014-06-25 13:44:22 -07009200 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009201 LDSHARED='$(CC) -bundle'
9202 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009203 if test "$enable_framework" ; then
9204 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009205 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9206 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009207 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009208 else
9209 # No framework, use the Python app as bundle-loader
9210 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9211 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009212 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009213 fi
Ned Deily36820b62014-06-25 13:44:22 -07009214 else
9215 # building for OS X 10.3 and later
9216 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9217 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9218 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009219 fi
9220 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009221 Linux*|GNU*|QNX*)
9222 LDSHARED='$(CC) -shared'
9223 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009224 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009225 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009226 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009227 LDSHARED='$(CC) -shared'
9228 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009229 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009230 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009231 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009232 OpenBSD*)
9233 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9234 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009235 LDSHARED='$(CC) -shared $(CCSHARED)'
9236 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009237 else
9238 case `uname -r` in
9239 [01].* | 2.[0-7] | 2.[0-7].*)
9240 LDSHARED="ld -Bshareable ${LDFLAGS}"
9241 ;;
9242 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009243 LDSHARED='$(CC) -shared $(CCSHARED)'
9244 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009245 ;;
9246 esac
9247 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009248 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009249 LDSHARED='$(CC) -shared'
9250 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009251 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009252 if test "$GCC" = "yes" ; then
9253 LDSHARED='$(CC) -shared'
9254 LDCXXSHARED='$(CXX) -shared'
9255 else
9256 LDSHARED='$(CC) -G'
9257 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009258 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009259 SCO_SV*)
9260 LDSHARED='$(CC) -Wl,-G,-Bexport'
9261 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9262 CYGWIN*)
9263 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9264 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009265 *) LDSHARED="ld";;
9266 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9269$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009270LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009271BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009272# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009273# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9275$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276if test -z "$CCSHARED"
9277then
Guido van Rossum07397971997-04-29 21:49:50 +00009278 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009279 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009280 then CCSHARED="-fPIC";
9281 elif test `uname -p` = sparc;
9282 then CCSHARED="-xcode=pic32";
9283 else CCSHARED="-Kpic";
9284 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009285 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009286 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009287 else CCSHARED="+z";
9288 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009289 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009290 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009291 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009292 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009293 if test "$GCC" = "yes"
9294 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009295 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009296 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009297 SCO_SV*)
9298 if test "$GCC" = "yes"
9299 then CCSHARED="-fPIC"
9300 else CCSHARED="-Kpic -belf"
9301 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009302 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9305$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009307# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9309$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310if test -z "$LINKFORSHARED"
9311then
Guido van Rossum07397971997-04-29 21:49:50 +00009312 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009313 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009314 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009315 LINKFORSHARED="-Wl,-E -Wl,+s";;
9316# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009317 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009318 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009319 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009321 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009322
9323 # Issue #18075: the default maximum stack size (8MBytes) is too
9324 # small for the default recursion limit. Increase the stack size
9325 # to ensure that tests don't crash
9326 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9327
Jack Jansene578a632001-08-15 01:27:14 +00009328 if test "$enable_framework"
9329 then
Jack Jansenda49e192005-01-07 13:08:22 +00009330 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009331 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009332 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009333 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009334 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009335 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009336 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009337 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9338 then
9339 LINKFORSHARED="-Wl,--export-dynamic"
9340 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009341 SunOS/5*) case $CC in
9342 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009343 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009344 then
9345 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009346 fi;;
9347 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009348 CYGWIN*)
9349 if test $enable_shared = "no"
9350 then
9351 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9352 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009353 QNX*)
9354 # -Wl,-E causes the symbols to be added to the dynamic
9355 # symbol table so that they can be found when a module
9356 # is loaded. -N 2048K causes the stack size to be set
9357 # to 2048 kilobytes so that the stack doesn't overflow
9358 # when running test_compile.py.
9359 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009360 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9363$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009364
Michael W. Hudson54241132001-12-07 15:38:26 +00009365
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9368$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009369if test ! "$LIBRARY" = "$LDLIBRARY"
9370then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009371 case $ac_sys_system in
9372 CYGWIN*)
9373 # Cygwin needs CCSHARED when building extension DLLs
9374 # but not when building the interpreter DLL.
9375 CFLAGSFORSHARED='';;
9376 *)
9377 CFLAGSFORSHARED='$(CCSHARED)'
9378 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9381$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009382
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009383# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9384# library (with --enable-shared).
9385# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009386# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9387# if it is not required, since it creates a dependency of the shared library
9388# to LIBS. This, in turn, means that applications linking the shared libpython
9389# don't need to link LIBS explicitly. The default should be only changed
9390# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009391
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9393$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009394case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009395 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009396 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009397esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9399$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009400
9401
Guido van Rossum627b2d71993-12-24 10:39:16 +00009402# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9404$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009405if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009406 $as_echo_n "(cached) " >&6
9407else
9408 ac_check_lib_save_LIBS=$LIBS
9409LIBS="-lsendfile $LIBS"
9410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9411/* end confdefs.h. */
9412
9413/* Override any GCC internal prototype to avoid an error.
9414 Use char because int might match the return type of a GCC
9415 builtin and then its argument prototype would still apply. */
9416#ifdef __cplusplus
9417extern "C"
9418#endif
9419char sendfile ();
9420int
9421main ()
9422{
9423return sendfile ();
9424 ;
9425 return 0;
9426}
9427_ACEOF
9428if ac_fn_c_try_link "$LINENO"; then :
9429 ac_cv_lib_sendfile_sendfile=yes
9430else
9431 ac_cv_lib_sendfile_sendfile=no
9432fi
9433rm -f core conftest.err conftest.$ac_objext \
9434 conftest$ac_exeext conftest.$ac_ext
9435LIBS=$ac_check_lib_save_LIBS
9436fi
9437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9438$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009439if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009440 cat >>confdefs.h <<_ACEOF
9441#define HAVE_LIBSENDFILE 1
9442_ACEOF
9443
9444 LIBS="-lsendfile $LIBS"
9445
9446fi
9447
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9449$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009450if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009452else
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009454LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009458/* Override any GCC internal prototype to avoid an error.
9459 Use char because int might match the return type of a GCC
9460 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009461#ifdef __cplusplus
9462extern "C"
9463#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009464char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009465int
9466main ()
9467{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 ;
9470 return 0;
9471}
9472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009473if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009475else
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009478rm -f core conftest.err conftest.$ac_objext \
9479 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009480LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9483$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009484if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 cat >>confdefs.h <<_ACEOF
9486#define HAVE_LIBDL 1
9487_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009488
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009489 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009491fi
9492 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9494$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009497else
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009499LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503/* Override any GCC internal prototype to avoid an error.
9504 Use char because int might match the return type of a GCC
9505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506#ifdef __cplusplus
9507extern "C"
9508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009509char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510int
9511main ()
9512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ;
9515 return 0;
9516}
9517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523rm -f core conftest.err conftest.$ac_objext \
9524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9528$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009529if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 cat >>confdefs.h <<_ACEOF
9531#define HAVE_LIBDLD 1
9532_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009533
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009534 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009536fi
9537 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009538
Georg Brandlb1441c72009-01-03 22:33:39 +00009539# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009540if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9542$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009543if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009545else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009546 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550/* Override any GCC internal prototype to avoid an error.
9551 Use char because int might match the return type of a GCC
9552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553#ifdef __cplusplus
9554extern "C"
9555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009556char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009557int
9558main ()
9559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ;
9562 return 0;
9563}
9564_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565for ac_lib in '' pthread rt posix4; do
9566 if test -z "$ac_lib"; then
9567 ac_res="none required"
9568 else
9569 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009570 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009575rm -f core conftest.err conftest.$ac_objext \
9576 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009577 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580done
Victor Stinnere0be4232011-10-25 13:06:09 +02009581if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009583else
9584 ac_cv_search_sem_init=no
9585fi
9586rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009587LIBS=$ac_func_search_save_LIBS
9588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9590$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009591ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009592if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009594
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009595fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009596 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009597 # posix4 on Solaris 2.6
9598 # pthread (first!) on Linux
9599fi
9600
Martin v. Löwis19d17342003-06-14 21:03:05 +00009601# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9603$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009604if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009606else
9607 ac_check_lib_save_LIBS=$LIBS
9608LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009610/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612/* Override any GCC internal prototype to avoid an error.
9613 Use char because int might match the return type of a GCC
9614 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009615#ifdef __cplusplus
9616extern "C"
9617#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009618char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009619int
9620main ()
9621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009623 ;
9624 return 0;
9625}
9626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009627if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009628 ac_cv_lib_intl_textdomain=yes
9629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632rm -f core conftest.err conftest.$ac_objext \
9633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009634LIBS=$ac_check_lib_save_LIBS
9635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9637$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009638if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009639
Matthias Kloseb9621712010-04-24 17:59:49 +00009640$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009641
Brett Cannonc6d936e2009-06-07 20:09:53 +00009642 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009643fi
9644
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009645
9646# checks for system dependent C++ extensions support
9647case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9649$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009651/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009652
Georg Brandl59e87bd2011-02-15 19:48:59 +00009653 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009654int
9655main ()
9656{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009657loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ;
9659 return 0;
9660}
Matthias Kloseb159a552010-04-25 21:00:44 +00009661
Martin v. Löwis11437992002-04-12 09:54:03 +00009662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009663if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009664
Matthias Kloseb159a552010-04-25 21:00:44 +00009665
Matthias Kloseb9621712010-04-24 17:59:49 +00009666$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009667
Matthias Kloseb159a552010-04-25 21:00:44 +00009668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009669$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009670
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009671else
Matthias Kloseb159a552010-04-25 21:00:44 +00009672
9673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009674$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009675
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009677rm -f core conftest.err conftest.$ac_objext \
9678 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009679 *) ;;
9680esac
9681
Christian Heimes985ecdc2013-11-20 11:46:18 +01009682# check for systems that require aligned memory access
9683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9684$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009685if ${ac_cv_aligned_required+:} false; then :
9686 $as_echo_n "(cached) " >&6
9687else
9688 if test "$cross_compiling" = yes; then :
9689 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009690else
9691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9692/* end confdefs.h. */
9693
9694int main()
9695{
9696 char s[16];
9697 int i, *p1, *p2;
9698 for (i=0; i < 16; i++)
9699 s[i] = i;
9700 p1 = (int*)(s+1);
9701 p2 = (int*)(s+2);
9702 if (*p1 == *p2)
9703 return 1;
9704 return 0;
9705}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009706_ACEOF
9707if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009708 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009709else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009710 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009711fi
9712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9713 conftest.$ac_objext conftest.beam conftest.$ac_ext
9714fi
9715
9716
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009717fi
9718
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9720$as_echo "$ac_cv_aligned_required" >&6; }
9721if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009722
9723$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9724
9725fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009726
9727# str, bytes and memoryview hash algorithm
9728
9729
9730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9731$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9732
9733# Check whether --with-hash_algorithm was given.
9734if test "${with_hash_algorithm+set}" = set; then :
9735 withval=$with_hash_algorithm;
9736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9737$as_echo "$withval" >&6; }
9738case "$withval" in
9739 siphash24)
9740 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9741
9742 ;;
9743 fnv)
9744 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9745
9746 ;;
9747 *)
9748 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9749 ;;
9750esac
9751
9752else
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9754$as_echo "default" >&6; }
9755fi
9756
9757
Charles-François Natalid30b0222014-05-08 23:08:51 +01009758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9759$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9760
9761# Check whether --with-address_sanitizer was given.
9762if test "${with_address_sanitizer+set}" = set; then :
9763 withval=$with_address_sanitizer;
9764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9765$as_echo "$withval" >&6; }
9766BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9767LDFLAGS="-fsanitize=address $LDFLAGS"
9768
9769else
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9771$as_echo "no" >&6; }
9772fi
9773
9774
Guido van Rossum70c7f481998-03-26 18:44:10 +00009775# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9777$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009778if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009780else
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009782LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786/* Override any GCC internal prototype to avoid an error.
9787 Use char because int might match the return type of a GCC
9788 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009789#ifdef __cplusplus
9790extern "C"
9791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009792char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009793int
9794main ()
9795{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 ;
9798 return 0;
9799}
9800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009801if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009803else
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009806rm -f core conftest.err conftest.$ac_objext \
9807 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009808LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9811$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009812if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009813 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009814fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009815 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9817$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009818if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009820else
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009822LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826/* Override any GCC internal prototype to avoid an error.
9827 Use char because int might match the return type of a GCC
9828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009829#ifdef __cplusplus
9830extern "C"
9831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009832char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009833int
9834main ()
9835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ;
9838 return 0;
9839}
9840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009843else
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009846rm -f core conftest.err conftest.$ac_objext \
9847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009848LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9851$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009852if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009853 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009854fi
9855 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009856
Matthias Kloseb9621712010-04-24 17:59:49 +00009857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9858$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009861if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9864$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009865LIBS="$withval $LIBS"
9866
9867else
Matthias Kloseb9621712010-04-24 17:59:49 +00009868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9869$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870fi
9871
Guido van Rossum7f43da71994-08-01 12:15:30 +00009872
Victor Stinner8291b5e2015-03-20 16:03:14 +01009873
9874
9875
9876
9877
9878
9879
9880if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9881 if test -n "$ac_tool_prefix"; then
9882 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9883set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9885$as_echo_n "checking for $ac_word... " >&6; }
9886if ${ac_cv_path_PKG_CONFIG+:} false; then :
9887 $as_echo_n "(cached) " >&6
9888else
9889 case $PKG_CONFIG in
9890 [\\/]* | ?:[\\/]*)
9891 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9892 ;;
9893 *)
9894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9895for as_dir in $PATH
9896do
9897 IFS=$as_save_IFS
9898 test -z "$as_dir" && as_dir=.
9899 for ac_exec_ext in '' $ac_executable_extensions; do
9900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9901 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9903 break 2
9904 fi
9905done
9906 done
9907IFS=$as_save_IFS
9908
9909 ;;
9910esac
9911fi
9912PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9913if test -n "$PKG_CONFIG"; then
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9915$as_echo "$PKG_CONFIG" >&6; }
9916else
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9918$as_echo "no" >&6; }
9919fi
9920
9921
9922fi
9923if test -z "$ac_cv_path_PKG_CONFIG"; then
9924 ac_pt_PKG_CONFIG=$PKG_CONFIG
9925 # Extract the first word of "pkg-config", so it can be a program name with args.
9926set dummy pkg-config; ac_word=$2
9927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9928$as_echo_n "checking for $ac_word... " >&6; }
9929if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9930 $as_echo_n "(cached) " >&6
9931else
9932 case $ac_pt_PKG_CONFIG in
9933 [\\/]* | ?:[\\/]*)
9934 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9935 ;;
9936 *)
9937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9938for as_dir in $PATH
9939do
9940 IFS=$as_save_IFS
9941 test -z "$as_dir" && as_dir=.
9942 for ac_exec_ext in '' $ac_executable_extensions; do
9943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9944 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9946 break 2
9947 fi
9948done
9949 done
9950IFS=$as_save_IFS
9951
9952 ;;
9953esac
9954fi
9955ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9956if test -n "$ac_pt_PKG_CONFIG"; then
9957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9958$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9959else
9960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9961$as_echo "no" >&6; }
9962fi
9963
9964 if test "x$ac_pt_PKG_CONFIG" = x; then
9965 PKG_CONFIG=""
9966 else
9967 case $cross_compiling:$ac_tool_warned in
9968yes:)
9969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9971ac_tool_warned=yes ;;
9972esac
9973 PKG_CONFIG=$ac_pt_PKG_CONFIG
9974 fi
9975else
9976 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9977fi
9978
9979fi
9980if test -n "$PKG_CONFIG"; then
9981 _pkg_min_version=0.9.0
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9983$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9984 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9986$as_echo "yes" >&6; }
9987 else
9988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
9990 PKG_CONFIG=""
9991 fi
9992fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009993
9994# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9996$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009997
9998# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009999if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010000 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010001else
10002 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010003fi
10004
10005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10007$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010008
10009# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10011$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010012
10013# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010014if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010015 withval=$with_system_ffi;
10016fi
10017
10018
Zachary Waref40d4dd2016-09-17 01:25:24 -050010019if test "$ac_sys_system" = "Darwin"
10020then
10021 case "$with_system_ffi" in
10022 "")
10023 with_system_ffi="no"
10024 ;;
10025 yes|no)
10026 ;;
10027 *)
10028 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10029 ;;
10030 esac
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10032$as_echo "$with_system_ffi" >&6; }
10033else
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10035$as_echo "yes" >&6; }
10036 if test "$with_system_ffi" != ""
10037 then
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10039$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10040 fi
10041 with_system_ffi="yes"
10042fi
Zachary Ware935043d2016-09-09 17:01:21 -070010043
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010044if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010045 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10046else
10047 LIBFFI_INCLUDEDIR=""
10048fi
10049
10050
Stefan Krah60187b52012-03-23 19:06:27 +010010051# Check for use of the system libmpdec library
10052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10053$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10054
10055# Check whether --with-system_libmpdec was given.
10056if test "${with_system_libmpdec+set}" = set; then :
10057 withval=$with_system_libmpdec;
10058else
10059 with_system_libmpdec="no"
10060fi
10061
10062
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10064$as_echo "$with_system_libmpdec" >&6; }
10065
Benjamin Peterson076ed002010-10-31 17:11:02 +000010066# Check for support for loadable sqlite extensions
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10068$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10069# Check whether --enable-loadable-sqlite-extensions was given.
10070if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10071 enableval=$enable_loadable_sqlite_extensions;
10072else
10073 enable_loadable_sqlite_extensions="no"
10074fi
10075
10076
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10078$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10079
Ned Deilyd819b932013-09-06 01:07:05 -070010080# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10081
10082
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10084$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10085
10086# Check whether --with-tcltk-includes was given.
10087if test "${with_tcltk_includes+set}" = set; then :
10088 withval=$with_tcltk_includes;
10089else
10090 with_tcltk_includes="default"
10091fi
10092
10093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10094$as_echo "$with_tcltk_includes" >&6; }
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10096$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10097
10098# Check whether --with-tcltk-libs was given.
10099if test "${with_tcltk_libs+set}" = set; then :
10100 withval=$with_tcltk_libs;
10101else
10102 with_tcltk_libs="default"
10103fi
10104
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10106$as_echo "$with_tcltk_libs" >&6; }
10107if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10108then
10109 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10110 then
10111 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10112 fi
10113 TCLTK_INCLUDES=""
10114 TCLTK_LIBS=""
10115else
10116 TCLTK_INCLUDES="$with_tcltk_includes"
10117 TCLTK_LIBS="$with_tcltk_libs"
10118fi
10119
Matthias Klose55708cc2009-04-30 08:06:49 +000010120# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10122$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010123
10124# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010125if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010126 withval=$with_dbmliborder;
10127if test x$with_dbmliborder = xyes
10128then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010129as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010130else
10131 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10132 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10133 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010134 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010135 fi
10136 done
10137fi
10138fi
10139
Matthias Kloseb9621712010-04-24 17:59:49 +000010140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10141$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143
Martin v. Löwis11437992002-04-12 09:54:03 +000010144
10145# Templates for things AC_DEFINEd more than once.
10146# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010147
10148
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010149if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010150then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010151 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010153
10154 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010155elif test "$ac_cv_kpthread" = "yes"
10156then
10157 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010158 if test "$ac_cv_cxx_thread" = "yes"; then
10159 CXX="$CXX -Kpthread"
10160 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010161 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010162elif test "$ac_cv_kthread" = "yes"
10163then
10164 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010165 if test "$ac_cv_cxx_thread" = "yes"; then
10166 CXX="$CXX -Kthread"
10167 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010168 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010169elif test "$ac_cv_pthread" = "yes"
10170then
10171 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010172 if test "$ac_cv_cxx_thread" = "yes"; then
10173 CXX="$CXX -pthread"
10174 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010175 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010176else
10177 if test ! -z "$with_threads" -a -d "$with_threads"
10178 then LDFLAGS="$LDFLAGS -L$with_threads"
10179 fi
10180 if test ! -z "$withval" -a -d "$withval"
10181 then LDFLAGS="$LDFLAGS -L$withval"
10182 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010183
10184 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010185 # define _POSIX_THREADS in unistd.h. Some apparently don't
10186 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10188$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010190/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010191
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010192#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010193#ifdef _POSIX_THREADS
10194yes
10195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010196
10197_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010200 unistd_defines_pthreads=yes
10201else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010202 unistd_defines_pthreads=no
10203fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010204rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010205
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10207$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010208
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010210
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010211 # Just looking for pthread_create in libpthread is not enough:
10212 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10213 # So we really have to include pthread.h, and then link.
10214 _libs=$LIBS
10215 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10217$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010219/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010220
10221#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010222#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010223
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010224void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010225int
10226main ()
10227{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010228
10229pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ;
10231 return 0;
10232}
10233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010235
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10237$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010238 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010239
Guido van Rossum02a1c402000-02-25 19:26:31 +000010240else
Martin v. Löwis11437992002-04-12 09:54:03 +000010241
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010242 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010244if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010245
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010246 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010247
Guido van Rossumad678af1998-10-02 14:42:15 +000010248else
Guido van Rossumad678af1998-10-02 14:42:15 +000010249
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10251$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010252if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010254else
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010256LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260/* Override any GCC internal prototype to avoid an error.
10261 Use char because int might match the return type of a GCC
10262 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010263#ifdef __cplusplus
10264extern "C"
10265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010266char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010267int
10268main ()
10269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 ;
10272 return 0;
10273}
10274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010277else
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010280rm -f core conftest.err conftest.$ac_objext \
10281 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010282LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10285$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010286if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010287
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010288 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010289 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010290
Greg Steinadf63d62000-07-05 10:38:09 +000010291else
Greg Steinadf63d62000-07-05 10:38:09 +000010292
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10294$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010295if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010297else
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010299LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303/* Override any GCC internal prototype to avoid an error.
10304 Use char because int might match the return type of a GCC
10305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010306#ifdef __cplusplus
10307extern "C"
10308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010309char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010310int
10311main ()
10312{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010313return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ;
10315 return 0;
10316}
10317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010318if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010320else
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010323rm -f core conftest.err conftest.$ac_objext \
10324 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010325LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10328$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010329if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010330
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010331 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010332 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010333
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010334else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010335
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10337$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010338if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010339 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010340else
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010342LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346/* Override any GCC internal prototype to avoid an error.
10347 Use char because int might match the return type of a GCC
10348 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010349#ifdef __cplusplus
10350extern "C"
10351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010352char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010353int
10354main ()
10355{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010356return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ;
10358 return 0;
10359}
10360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010363else
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010366rm -f core conftest.err conftest.$ac_objext \
10367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010368LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10371$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010372if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010373
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010374 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010375 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010376
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010377else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010378
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10380$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010381if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010382 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010383else
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010385LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389/* Override any GCC internal prototype to avoid an error.
10390 Use char because int might match the return type of a GCC
10391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010392#ifdef __cplusplus
10393extern "C"
10394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010395char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010396int
10397main ()
10398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 ;
10401 return 0;
10402}
10403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010406else
Matthias Kloseb9621712010-04-24 17:59:49 +000010407 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010409rm -f core conftest.err conftest.$ac_objext \
10410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010411LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10414$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010415if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010416
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010417 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010418 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010419
Guido van Rossumb93a8621998-05-07 13:27:32 +000010420else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010421
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010422 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10423
Guido van Rossum2d38f911996-06-26 19:47:01 +000010424fi
10425
Guido van Rossum627b2d71993-12-24 10:39:16 +000010426
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010427fi
10428
Guido van Rossum0be3e491997-05-22 20:33:33 +000010429fi
10430
Guido van Rossum49545951997-12-02 19:28:29 +000010431fi
10432
Guido van Rossumb93a8621998-05-07 13:27:32 +000010433fi
10434
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010436rm -f core conftest.err conftest.$ac_objext \
10437 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10440$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010441if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010443else
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010445LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449/* Override any GCC internal prototype to avoid an error.
10450 Use char because int might match the return type of a GCC
10451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010452#ifdef __cplusplus
10453extern "C"
10454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010455char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010456int
10457main ()
10458{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010459return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010466else
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010469rm -f core conftest.err conftest.$ac_objext \
10470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010471LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10474$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010475if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010476
Martin v. Löwis130fb172001-07-19 11:00:41 +000010477 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010478
Guido van Rossum627b2d71993-12-24 10:39:16 +000010479fi
10480
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010481
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010482fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010483
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010484if test "$posix_threads" = "yes"; then
10485 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010486
Matthias Kloseb9621712010-04-24 17:59:49 +000010487$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010488
10489 fi
10490
10491 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10492 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010493 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010494$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010495
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010496 ;;
10497 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010498$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010499
10500 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010501 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010502$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010503
10504 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010505 esac
10506
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10508$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010509 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010511else
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010513 ac_cv_pthread_system_supported=no
10514else
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010516/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010517
10518 #include <stdio.h>
10519 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010520 void *foo(void *parm) {
10521 return NULL;
10522 }
10523 main() {
10524 pthread_attr_t attr;
10525 pthread_t id;
10526 if (pthread_attr_init(&attr)) exit(-1);
10527 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10528 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10529 exit(0);
10530 }
10531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010532if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010533 ac_cv_pthread_system_supported=yes
10534else
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10538 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010539fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010541
Guido van Rossum627b2d71993-12-24 10:39:16 +000010542fi
10543
Matthias Kloseb9621712010-04-24 17:59:49 +000010544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10545$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010546 if test "$ac_cv_pthread_system_supported" = "yes"; then
10547
Matthias Kloseb9621712010-04-24 17:59:49 +000010548$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010549
10550 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 for ac_func in pthread_sigmask
10552do :
10553 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010554if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010555 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010556#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010557_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010558 case $ac_sys_system in
10559 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010560
Matthias Kloseb9621712010-04-24 17:59:49 +000010561$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010562
10563 ;;
10564 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010565fi
10566done
10567
Christian Heimesf77b4b22013-08-21 13:26:05 +020010568 for ac_func in pthread_atfork
10569do :
10570 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10571if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10572 cat >>confdefs.h <<_ACEOF
10573#define HAVE_PTHREAD_ATFORK 1
10574_ACEOF
10575
10576fi
10577done
10578
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010579fi
10580
10581
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010582# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10585$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010587if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010588 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010589 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010592 ipv6=no
10593 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10595$as_echo "yes" >&6; }
10596 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010597
10598 ipv6=yes
10599 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010601else
Martin v. Löwis11437992002-04-12 09:54:03 +000010602
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010604/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010605 /* AF_INET6 available check */
10606#include <sys/types.h>
10607#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010608int
10609main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010610{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010611int domain = AF_INET6;
10612 ;
10613 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010614}
Martin v. Löwis11437992002-04-12 09:54:03 +000010615_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010616if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010617
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10619$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010620 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010621
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010622else
Matthias Kloseb159a552010-04-25 21:00:44 +000010623
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10625$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010626 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010627
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010628fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010631if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10633$as_echo_n "checking if RFC2553 API is available... " >&6; }
10634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010636
10637 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010638#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010639int
10640main ()
10641{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010642struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010643 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 ;
10645 return 0;
10646}
Matthias Kloseb159a552010-04-25 21:00:44 +000010647
Martin v. Löwis11437992002-04-12 09:54:03 +000010648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010649if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010650
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010652$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010653 ipv6=yes
10654
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010655else
Matthias Kloseb159a552010-04-25 21:00:44 +000010656
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010658$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010659 ipv6=no
10660
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010663fi
10664
10665if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010667
10668fi
10669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670fi
10671
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010672
10673ipv6type=unknown
10674ipv6lib=none
10675ipv6trylibc=no
10676
10677if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10679$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010680 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10681 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010682 case $i in
10683 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010685/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010686
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687#include <netinet/in.h>
10688#ifdef IPV6_INRIA_VERSION
10689yes
10690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010691_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010694 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010696rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697
10698 ;;
10699 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010701/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010702
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010703#include <netinet/in.h>
10704#ifdef __KAME__
10705yes
10706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010707_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710 ipv6type=$i;
10711 ipv6lib=inet6
10712 ipv6libdir=/usr/local/v6/lib
10713 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010715rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716
10717 ;;
10718 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010720/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010721
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722#include <features.h>
10723#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10724yes
10725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010726_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729 ipv6type=$i;
10730 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010731fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010732rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733
10734 ;;
10735 linux-inet6)
10736 if test -d /usr/inet6; then
10737 ipv6type=$i
10738 ipv6lib=inet6
10739 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010740 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741 fi
10742 ;;
10743 solaris)
10744 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010745 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010746 ipv6type=$i
10747 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748 fi
10749 fi
10750 ;;
10751 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010753/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010754
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755#include <sys/param.h>
10756#ifdef _TOSHIBA_INET6
10757yes
10758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010759_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762 ipv6type=$i;
10763 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010764 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010766rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767
10768 ;;
10769 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010771/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010772
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773#include </usr/local/v6/include/sys/v6config.h>
10774#ifdef __V6D__
10775yes
10776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010777_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780 ipv6type=$i;
10781 ipv6lib=v6;
10782 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010783 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010785rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786
10787 ;;
10788 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010790/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010791
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792#include <sys/param.h>
10793#ifdef _ZETA_MINAMI_INET6
10794yes
10795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010796_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799 ipv6type=$i;
10800 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010801 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010803rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804
10805 ;;
10806 esac
10807 if test "$ipv6type" != "unknown"; then
10808 break
10809 fi
10810 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10812$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813fi
10814
10815if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10816 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10817 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10818 echo "using lib$ipv6lib"
10819 else
10820 if test $ipv6trylibc = "yes"; then
10821 echo "using libc"
10822 else
10823 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10824 echo "You need to fetch lib$ipv6lib.a from appropriate"
10825 echo 'ipv6 kit and compile beforehand.'
10826 exit 1
10827 fi
10828 fi
10829fi
10830
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10832$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10834/* end confdefs.h. */
10835 /* CAN_RAW_FD_FRAMES available check */
10836#include <linux/can/raw.h>
10837int
10838main ()
10839{
10840int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10841 ;
10842 return 0;
10843}
10844_ACEOF
10845if ac_fn_c_try_compile "$LINENO"; then :
10846
10847
10848$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10849
10850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10851$as_echo "yes" >&6; }
10852
10853else
10854
10855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10856$as_echo "no" >&6; }
10857
10858fi
10859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10860
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010861# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10863$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010865# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010866if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010867 withval=$with_doc_strings;
10868fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010869
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010870
10871if test -z "$with_doc_strings"
10872then with_doc_strings="yes"
10873fi
10874if test "$with_doc_strings" != "no"
10875then
10876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010878
10879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10881$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010882
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010883# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10885$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010887# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010888if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889 withval=$with_pymalloc;
10890fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010891
Neil Schemenauera35c6882001-02-27 04:45:05 +000010892
Neil Schemenauer16c22972002-03-22 15:34:49 +000010893if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010894then
10895 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010896fi
10897if test "$with_pymalloc" != "no"
10898then
Martin v. Löwis11437992002-04-12 09:54:03 +000010899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010901
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010902 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10905$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010906
Nick Coghlan6ea41862017-06-11 13:16:15 +100010907# Check for --with-c-locale-coercion
10908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10909$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10910
10911# Check whether --with-c-locale-coercion was given.
10912if test "${with_c_locale_coercion+set}" = set; then :
10913 withval=$with_c_locale_coercion;
10914fi
10915
10916
10917if test -z "$with_c_locale_coercion"
10918then
10919 with_c_locale_coercion="yes"
10920fi
10921if test "$with_c_locale_coercion" != "no"
10922then
10923
10924$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10925
10926fi
10927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10928$as_echo "$with_c_locale_coercion" >&6; }
10929
10930# Check for --with-c-locale-warning
10931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10932$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10933
10934# Check whether --with-c-locale-warning was given.
10935if test "${with_c_locale_warning+set}" = set; then :
10936 withval=$with_c_locale_warning;
10937fi
10938
10939
10940if test -z "$with_c_locale_warning"
10941then
10942 with_c_locale_warning="yes"
10943fi
10944if test "$with_c_locale_warning" != "no"
10945then
10946
10947$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10948
10949fi
10950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10951$as_echo "$with_c_locale_warning" >&6; }
10952
Benjamin Peterson05159c42009-12-03 03:01:27 +000010953# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10955$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010956
10957# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010958if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010959 withval=$with_valgrind;
10960else
10961 with_valgrind=no
10962fi
10963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10965$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010966if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 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 +020010968if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010969
Matthias Kloseb9621712010-04-24 17:59:49 +000010970$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010971
10972else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010973 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010974
10975fi
10976
10977
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010978 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010979fi
10980
Łukasz Langaa785c872016-09-09 17:37:37 -070010981# Check for DTrace support
10982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
10983$as_echo_n "checking for --with-dtrace... " >&6; }
10984
10985# Check whether --with-dtrace was given.
10986if test "${with_dtrace+set}" = set; then :
10987 withval=$with_dtrace;
10988else
10989 with_dtrace=no
10990fi
10991
10992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
10993$as_echo "$with_dtrace" >&6; }
10994
10995
10996
10997
10998
10999DTRACE=
11000DFLAGS=
11001DTRACE_HEADERS=
11002DTRACE_OBJS=
11003
11004if test "$with_dtrace" = "yes"
11005then
11006 # Extract the first word of "dtrace", so it can be a program name with args.
11007set dummy dtrace; ac_word=$2
11008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11009$as_echo_n "checking for $ac_word... " >&6; }
11010if ${ac_cv_path_DTRACE+:} false; then :
11011 $as_echo_n "(cached) " >&6
11012else
11013 case $DTRACE in
11014 [\\/]* | ?:[\\/]*)
11015 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11016 ;;
11017 *)
11018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11019for as_dir in $PATH
11020do
11021 IFS=$as_save_IFS
11022 test -z "$as_dir" && as_dir=.
11023 for ac_exec_ext in '' $ac_executable_extensions; do
11024 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11025 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11027 break 2
11028 fi
11029done
11030 done
11031IFS=$as_save_IFS
11032
11033 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11034 ;;
11035esac
11036fi
11037DTRACE=$ac_cv_path_DTRACE
11038if test -n "$DTRACE"; then
11039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11040$as_echo "$DTRACE" >&6; }
11041else
11042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11043$as_echo "no" >&6; }
11044fi
11045
11046
11047 if test "$DTRACE" = "not found"; then
11048 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11049 fi
11050
11051$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11052
11053 DTRACE_HEADERS="Include/pydtrace_probes.h"
11054
11055 # On OS X, DTrace providers do not need to be explicitly compiled and
11056 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11057 # generation flag '-G'. We check for presence of this flag, rather than
11058 # hardcoding support by OS, in the interest of robustness.
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11060$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11061if ${ac_cv_dtrace_link+:} false; then :
11062 $as_echo_n "(cached) " >&6
11063else
11064 ac_cv_dtrace_link=no
11065 echo 'BEGIN' > conftest.d
11066 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11067 ac_cv_dtrace_link=yes
11068
11069fi
11070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11071$as_echo "$ac_cv_dtrace_link" >&6; }
11072 if test "$ac_cv_dtrace_link" = "yes"; then
11073 DTRACE_OBJS="Python/pydtrace.o"
11074 fi
11075fi
11076
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011077# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011078
Guido van Rossum98935bf2001-09-05 19:13:16 +000011079DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011080
Guido van Rossume97ee181999-12-20 21:27:22 +000011081# the dlopen() function means we might want to use dynload_shlib.o. some
11082# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011083for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011084do :
11085 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011086if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011089_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011090
Guido van Rossume97ee181999-12-20 21:27:22 +000011091fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011092done
Guido van Rossume97ee181999-12-20 21:27:22 +000011093
Michael W. Hudson54241132001-12-07 15:38:26 +000011094
Guido van Rossume97ee181999-12-20 21:27:22 +000011095# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11096# loading of modules.
11097
Matthias Kloseb9621712010-04-24 17:59:49 +000011098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11099$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011100if test -z "$DYNLOADFILE"
11101then
11102 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011103 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11104 if test "$ac_cv_func_dlopen" = yes
11105 then DYNLOADFILE="dynload_shlib.o"
11106 else DYNLOADFILE="dynload_aix.o"
11107 fi
11108 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011109 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011110 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11111 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011112 *)
11113 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11114 # out any dynamic loading
11115 if test "$ac_cv_func_dlopen" = yes
11116 then DYNLOADFILE="dynload_shlib.o"
11117 else DYNLOADFILE="dynload_stub.o"
11118 fi
11119 ;;
11120 esac
11121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11123$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011124if test "$DYNLOADFILE" != "dynload_stub.o"
11125then
Martin v. Löwis11437992002-04-12 09:54:03 +000011126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011128
11129fi
11130
Neil Schemenauer4e425612001-06-19 15:44:15 +000011131# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11132
Michael W. Hudson54241132001-12-07 15:38:26 +000011133
Matthias Kloseb9621712010-04-24 17:59:49 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11135$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011136if test -z "$MACHDEP_OBJS"
11137then
Jack Jansene578a632001-08-15 01:27:14 +000011138 MACHDEP_OBJS=$extra_machdep_objs
11139else
11140 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011141fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011142if test -z "$MACHDEP_OBJS"; then
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11144$as_echo "none" >&6; }
11145else
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11147$as_echo "$MACHDEP_OBJS" >&6; }
11148fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011149
Guido van Rossum627b2d71993-12-24 10:39:16 +000011150# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011151for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011152 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011153 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011154 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011155 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011156 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011157 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011158 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011159 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011160 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011161 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011162 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011163 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011164 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011165 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11166 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011167 sigaction sigaltstack siginterrupt sigpending sigrelse \
11168 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011169 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011170 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011171 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011172do :
11173 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11174ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011175if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011177#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011178_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011179
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011180fi
11181done
11182
Michael W. Hudson54241132001-12-07 15:38:26 +000011183
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011184ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11185 #include <dirent.h>
11186"
11187if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11188
11189$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11190
11191fi
11192
11193
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011194# For some functions, having a definition is not sufficient, since
11195# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11197$as_echo_n "checking for chroot... " >&6; }
11198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011199/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011200#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011201int
11202main ()
11203{
11204void *x=chroot
11205 ;
11206 return 0;
11207}
11208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011209if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011212
Matthias Kloseb159a552010-04-25 21:00:44 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011214$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011215else
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011218
11219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11222$as_echo_n "checking for link... " >&6; }
11223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011224/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011225#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011226int
11227main ()
11228{
11229void *x=link
11230 ;
11231 return 0;
11232}
11233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011237
Matthias Kloseb159a552010-04-25 21:00:44 +000011238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011240else
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011243
11244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11247$as_echo_n "checking for symlink... " >&6; }
11248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011250#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011251int
11252main ()
11253{
11254void *x=symlink
11255 ;
11256 return 0;
11257}
11258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011259if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011260
Matthias Kloseb9621712010-04-24 17:59:49 +000011261$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011262
Matthias Kloseb159a552010-04-25 21:00:44 +000011263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011265else
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11267$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011268
11269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11272$as_echo_n "checking for fchdir... " >&6; }
11273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011275#include <unistd.h>
11276int
11277main ()
11278{
11279void *x=fchdir
11280 ;
11281 return 0;
11282}
11283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011285
Matthias Kloseb9621712010-04-24 17:59:49 +000011286$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011287
Matthias Kloseb159a552010-04-25 21:00:44 +000011288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011289$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011290else
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11292$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011293
11294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11297$as_echo_n "checking for fsync... " >&6; }
11298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011300#include <unistd.h>
11301int
11302main ()
11303{
11304void *x=fsync
11305 ;
11306 return 0;
11307}
11308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011312
Matthias Kloseb159a552010-04-25 21:00:44 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011315else
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11317$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011318
11319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11322$as_echo_n "checking for fdatasync... " >&6; }
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011325#include <unistd.h>
11326int
11327main ()
11328{
11329void *x=fdatasync
11330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011337
Matthias Kloseb159a552010-04-25 21:00:44 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011339$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011340else
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011343
11344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11347$as_echo_n "checking for epoll... " >&6; }
11348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011349/* end confdefs.h. */
11350#include <sys/epoll.h>
11351int
11352main ()
11353{
11354void *x=epoll_create
11355 ;
11356 return 0;
11357}
11358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011362
Matthias Kloseb159a552010-04-25 21:00:44 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011365else
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011368
11369fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11372$as_echo_n "checking for epoll_create1... " >&6; }
11373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11374/* end confdefs.h. */
11375#include <sys/epoll.h>
11376int
11377main ()
11378{
11379void *x=epoll_create1
11380 ;
11381 return 0;
11382}
11383_ACEOF
11384if ac_fn_c_try_compile "$LINENO"; then :
11385
11386$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11387
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11389$as_echo "yes" >&6; }
11390else
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
11393
11394fi
11395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11397$as_echo_n "checking for kqueue... " >&6; }
11398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011399/* end confdefs.h. */
11400
11401#include <sys/types.h>
11402#include <sys/event.h>
11403
11404int
11405main ()
11406{
11407int x=kqueue()
11408 ;
11409 return 0;
11410}
11411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011412if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011415
Matthias Kloseb159a552010-04-25 21:00:44 +000011416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011417$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011418else
Matthias Kloseb9621712010-04-24 17:59:49 +000011419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11420$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011421
11422fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11425$as_echo_n "checking for prlimit... " >&6; }
11426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11427/* end confdefs.h. */
11428
11429#include <sys/time.h>
11430#include <sys/resource.h>
11431
11432int
11433main ()
11434{
11435void *x=prlimit
11436 ;
11437 return 0;
11438}
11439_ACEOF
11440if ac_fn_c_try_compile "$LINENO"; then :
11441
11442$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11443
11444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11445$as_echo "yes" >&6; }
11446else
11447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11448$as_echo "no" >&6; }
11449
11450fi
11451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11452
Martin v. Löwisd5843682002-11-21 20:41:28 +000011453# On some systems (eg. FreeBSD 5), we would find a definition of the
11454# functions ctermid_r, setgroups in the library, but no prototype
11455# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11456# address to avoid compiler warnings and potential miscompilations
11457# because of the missing prototypes.
11458
Matthias Kloseb9621712010-04-24 17:59:49 +000011459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11460$as_echo_n "checking for ctermid_r... " >&6; }
11461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011462/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011463
Martin v. Löwisd5843682002-11-21 20:41:28 +000011464#include <stdio.h>
11465
Martin v. Löwisd5843682002-11-21 20:41:28 +000011466int
11467main ()
11468{
11469void* p = ctermid_r
11470 ;
11471 return 0;
11472}
11473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011475
Matthias Kloseb9621712010-04-24 17:59:49 +000011476$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011477
Matthias Kloseb159a552010-04-25 21:00:44 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011479$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011480else
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11482$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011483
11484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11486
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11488$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011489if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011490 $as_echo_n "(cached) " >&6
11491else
11492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011493/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011494#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011495int
11496main ()
11497{
11498void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011499
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011500 ;
11501 return 0;
11502}
11503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011504if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011505 ac_cv_flock_decl=yes
11506else
11507 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011508
11509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011511
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011512fi
11513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11514$as_echo "$ac_cv_flock_decl" >&6; }
11515if test "x${ac_cv_flock_decl}" = xyes; then
11516 for ac_func in flock
11517do :
11518 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011519if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011520 cat >>confdefs.h <<_ACEOF
11521#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011522_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011523
Antoine Pitroua3000072010-09-07 14:52:42 +000011524else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011526$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011527if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011528 $as_echo_n "(cached) " >&6
11529else
11530 ac_check_lib_save_LIBS=$LIBS
11531LIBS="-lbsd $LIBS"
11532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11533/* end confdefs.h. */
11534
11535/* Override any GCC internal prototype to avoid an error.
11536 Use char because int might match the return type of a GCC
11537 builtin and then its argument prototype would still apply. */
11538#ifdef __cplusplus
11539extern "C"
11540#endif
11541char flock ();
11542int
11543main ()
11544{
11545return flock ();
11546 ;
11547 return 0;
11548}
11549_ACEOF
11550if ac_fn_c_try_link "$LINENO"; then :
11551 ac_cv_lib_bsd_flock=yes
11552else
11553 ac_cv_lib_bsd_flock=no
11554fi
11555rm -f core conftest.err conftest.$ac_objext \
11556 conftest$ac_exeext conftest.$ac_ext
11557LIBS=$ac_check_lib_save_LIBS
11558fi
11559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11560$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011561if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011562 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011563
11564
11565$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11566
11567
11568fi
11569
11570
11571fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011572done
11573
Antoine Pitroua3000072010-09-07 14:52:42 +000011574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11577$as_echo_n "checking for getpagesize... " >&6; }
11578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011579/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011580
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011581#include <unistd.h>
11582
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011583int
11584main ()
11585{
11586void* p = getpagesize
11587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011594
Matthias Kloseb159a552010-04-25 21:00:44 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011596$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011597else
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011600
11601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011603
Victor Stinner984890f2011-11-24 13:53:38 +010011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11605$as_echo_n "checking for broken unsetenv... " >&6; }
11606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11607/* end confdefs.h. */
11608
11609#include <stdlib.h>
11610
11611int
11612main ()
11613{
11614int res = unsetenv("DUMMY")
11615 ;
11616 return 0;
11617}
11618_ACEOF
11619if ac_fn_c_try_compile "$LINENO"; then :
11620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11621$as_echo "no" >&6; }
11622else
11623
11624$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11625
11626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11627$as_echo "yes" >&6; }
11628
11629fi
11630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11631
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011632for ac_prog in true
11633do
11634 # Extract the first word of "$ac_prog", so it can be a program name with args.
11635set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11637$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011638if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011640else
11641 if test -n "$TRUE"; then
11642 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11643else
11644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11645for as_dir in $PATH
11646do
11647 IFS=$as_save_IFS
11648 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011651 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 $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 +000011653 break 2
11654 fi
11655done
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011658
11659fi
11660fi
11661TRUE=$ac_cv_prog_TRUE
11662if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11664$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11667$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011668fi
11669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011671 test -n "$TRUE" && break
11672done
11673test -n "$TRUE" || TRUE="/bin/true"
11674
11675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11677$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011678if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011680else
11681 ac_check_lib_save_LIBS=$LIBS
11682LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011684/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011686/* Override any GCC internal prototype to avoid an error.
11687 Use char because int might match the return type of a GCC
11688 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011689#ifdef __cplusplus
11690extern "C"
11691#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011692char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011693int
11694main ()
11695{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011697 ;
11698 return 0;
11699}
11700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011701if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011702 ac_cv_lib_c_inet_aton=yes
11703else
Matthias Kloseb9621712010-04-24 17:59:49 +000011704 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011706rm -f core conftest.err conftest.$ac_objext \
11707 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011708LIBS=$ac_check_lib_save_LIBS
11709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11711$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011712if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011713 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011714else
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11716$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011717if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011719else
11720 ac_check_lib_save_LIBS=$LIBS
11721LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011723/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725/* Override any GCC internal prototype to avoid an error.
11726 Use char because int might match the return type of a GCC
11727 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011728#ifdef __cplusplus
11729extern "C"
11730#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011731char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011732int
11733main ()
11734{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011735return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011736 ;
11737 return 0;
11738}
11739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011741 ac_cv_lib_resolv_inet_aton=yes
11742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011745rm -f core conftest.err conftest.$ac_objext \
11746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011747LIBS=$ac_check_lib_save_LIBS
11748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11750$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011751if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011752 cat >>confdefs.h <<_ACEOF
11753#define HAVE_LIBRESOLV 1
11754_ACEOF
11755
11756 LIBS="-lresolv $LIBS"
11757
11758fi
11759
11760
11761fi
11762
11763
Christian Heimesd0764e22007-12-04 15:00:33 +000011764# On Tru64, chflags seems to be present, but calling it will
11765# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11767$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011768if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011770else
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011772 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011775/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011776
Christian Heimesd0764e22007-12-04 15:00:33 +000011777#include <sys/stat.h>
11778#include <unistd.h>
11779int main(int argc, char*argv[])
11780{
11781 if(chflags(argv[0], 0) != 0)
11782 return 1;
11783 return 0;
11784}
Ned Deily3eb67d52011-06-28 00:00:28 -070011785
Christian Heimesd0764e22007-12-04 15:00:33 +000011786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011788 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011794fi
11795
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011796
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11799$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011800if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011802if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011803 ac_cv_have_chflags="yes"
11804else
11805 ac_cv_have_chflags="no"
11806fi
11807
11808fi
11809if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011812
11813fi
11814
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11816$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011821 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011822else
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011824/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011825
Christian Heimesd0764e22007-12-04 15:00:33 +000011826#include <sys/stat.h>
11827#include <unistd.h>
11828int main(int argc, char*argv[])
11829{
11830 if(lchflags(argv[0], 0) != 0)
11831 return 1;
11832 return 0;
11833}
Ned Deily3eb67d52011-06-28 00:00:28 -070011834
Christian Heimesd0764e22007-12-04 15:00:33 +000011835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011837 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011843fi
11844
11845
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11848$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011849if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011851if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011852 ac_cv_have_lchflags="yes"
11853else
11854 ac_cv_have_lchflags="no"
11855fi
11856
11857fi
11858if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011861
11862fi
11863
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011864case $ac_sys_system/$ac_sys_release in
11865Darwin/*)
11866 _CUR_CFLAGS="${CFLAGS}"
11867 _CUR_LDFLAGS="${LDFLAGS}"
11868 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11869 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11870 ;;
11871esac
11872
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11874$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011875if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011877else
11878 ac_check_lib_save_LIBS=$LIBS
11879LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011881/* end confdefs.h. */
11882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011883/* Override any GCC internal prototype to avoid an error.
11884 Use char because int might match the return type of a GCC
11885 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011886#ifdef __cplusplus
11887extern "C"
11888#endif
11889char inflateCopy ();
11890int
11891main ()
11892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011894 ;
11895 return 0;
11896}
11897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011898if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011899 ac_cv_lib_z_inflateCopy=yes
11900else
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011903rm -f core conftest.err conftest.$ac_objext \
11904 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011905LIBS=$ac_check_lib_save_LIBS
11906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11908$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011909if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011912
11913fi
11914
11915
11916case $ac_sys_system/$ac_sys_release in
11917Darwin/*)
11918 CFLAGS="${_CUR_CFLAGS}"
11919 LDFLAGS="${_CUR_LDFLAGS}"
11920 ;;
11921esac
11922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11924$as_echo_n "checking for hstrerror... " >&6; }
11925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011926/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011927
Martin v. Löwise9416172003-05-03 10:12:45 +000011928#include <netdb.h>
11929
Martin v. Löwise9416172003-05-03 10:12:45 +000011930int
11931main ()
11932{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011933void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011934 ;
11935 return 0;
11936}
11937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011938if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011941
Matthias Kloseb159a552010-04-25 21:00:44 +000011942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011943$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011944else
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11946$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011947
11948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011949rm -f core conftest.err conftest.$ac_objext \
11950 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11953$as_echo_n "checking for inet_aton... " >&6; }
11954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011955/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011956
Martin v. Löwis86d66262006-02-17 08:40:11 +000011957#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011958#include <sys/socket.h>
11959#include <netinet/in.h>
11960#include <arpa/inet.h>
11961
Martin v. Löwise9416172003-05-03 10:12:45 +000011962int
11963main ()
11964{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011965void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011966 ;
11967 return 0;
11968}
11969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011973
Matthias Kloseb159a552010-04-25 21:00:44 +000011974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011976else
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11978$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011979
11980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011981rm -f core conftest.err conftest.$ac_objext \
11982 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11985$as_echo_n "checking for inet_pton... " >&6; }
11986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011987/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011988
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011989#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011990#include <sys/socket.h>
11991#include <netinet/in.h>
11992#include <arpa/inet.h>
11993
Martin v. Löwise9416172003-05-03 10:12:45 +000011994int
11995main ()
11996{
11997void* p = inet_pton
11998 ;
11999 return 0;
12000}
12001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012005
Matthias Kloseb159a552010-04-25 21:00:44 +000012006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012007$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12010$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012011
12012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012014
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012015# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12017$as_echo_n "checking for setgroups... " >&6; }
12018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012020
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012021#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012022#ifdef HAVE_GRP_H
12023#include <grp.h>
12024#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012025
Martin v. Löwisd5843682002-11-21 20:41:28 +000012026int
12027main ()
12028{
12029void* p = setgroups
12030 ;
12031 return 0;
12032}
12033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012035
Matthias Kloseb9621712010-04-24 17:59:49 +000012036$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012037
Matthias Kloseb159a552010-04-25 21:00:44 +000012038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012039$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012043
12044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012047# check for openpty and forkpty
12048
12049for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012050do :
12051 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012052if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012053 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012054#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012055_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012056
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012057else
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12059$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012062else
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012064LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068/* Override any GCC internal prototype to avoid an error.
12069 Use char because int might match the return type of a GCC
12070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012071#ifdef __cplusplus
12072extern "C"
12073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012074char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012075int
12076main ()
12077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 ;
12080 return 0;
12081}
12082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012085else
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012088rm -f core conftest.err conftest.$ac_objext \
12089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012090LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12093$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012094if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012096 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12099$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012100if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012102else
12103 ac_check_lib_save_LIBS=$LIBS
12104LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012106/* end confdefs.h. */
12107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108/* Override any GCC internal prototype to avoid an error.
12109 Use char because int might match the return type of a GCC
12110 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012111#ifdef __cplusplus
12112extern "C"
12113#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012114char openpty ();
12115int
12116main ()
12117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012119 ;
12120 return 0;
12121}
12122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012124 ac_cv_lib_bsd_openpty=yes
12125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012128rm -f core conftest.err conftest.$ac_objext \
12129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012130LIBS=$ac_check_lib_save_LIBS
12131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12133$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012134if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012136 LIBS="$LIBS -lbsd"
12137fi
12138
12139
12140fi
12141
Fred Drake8cef4cf2000-06-28 16:40:38 +000012142
12143fi
12144done
12145
12146for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012147do :
12148 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012149if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012152_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153
Fred Drake8cef4cf2000-06-28 16:40:38 +000012154else
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12156$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012157if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012159else
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012161LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165/* Override any GCC internal prototype to avoid an error.
12166 Use char because int might match the return type of a GCC
12167 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012168#ifdef __cplusplus
12169extern "C"
12170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012171char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012172int
12173main ()
12174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012175return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 ;
12177 return 0;
12178}
12179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182else
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012185rm -f core conftest.err conftest.$ac_objext \
12186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012187LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12190$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012193 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12196$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012197if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012199else
12200 ac_check_lib_save_LIBS=$LIBS
12201LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012203/* end confdefs.h. */
12204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205/* Override any GCC internal prototype to avoid an error.
12206 Use char because int might match the return type of a GCC
12207 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012208#ifdef __cplusplus
12209extern "C"
12210#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211char forkpty ();
12212int
12213main ()
12214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012216 ;
12217 return 0;
12218}
12219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012221 ac_cv_lib_bsd_forkpty=yes
12222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012225rm -f core conftest.err conftest.$ac_objext \
12226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012227LIBS=$ac_check_lib_save_LIBS
12228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12230$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012231if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012233 LIBS="$LIBS -lbsd"
12234fi
12235
12236
12237fi
12238
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239
12240fi
12241done
12242
Jack Jansendd19cf82001-12-06 22:36:17 +000012243
Michael W. Hudson54241132001-12-07 15:38:26 +000012244# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012245for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012246do :
12247 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12248ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012249if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012251#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012252_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012253
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012254fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012255done
12256
Michael W. Hudson54241132001-12-07 15:38:26 +000012257
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012258ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012259if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012260 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012261
Martin v. Löwis1142de32002-03-29 16:28:31 +000012262else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012264 *" dup2.$ac_objext "* ) ;;
12265 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012267esac
12268
Martin v. Löwis1142de32002-03-29 16:28:31 +000012269fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012270
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012271ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012272if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012273 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12274
12275else
12276 case " $LIBOBJS " in
12277 *" strdup.$ac_objext "* ) ;;
12278 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12279 ;;
12280esac
12281
12282fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012283
12284
12285for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012286do :
12287 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012288if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012290#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012293/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012294#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012295int
12296main ()
12297{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012298getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 ;
12300 return 0;
12301}
12302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012304
Matthias Kloseb9621712010-04-24 17:59:49 +000012305$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012306
Guido van Rossum627b2d71993-12-24 10:39:16 +000012307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012309
Guido van Rossum627b2d71993-12-24 10:39:16 +000012310fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012311done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012312
Jack Jansen150753c2003-03-29 22:07:47 +000012313for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012314do :
12315 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012316if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012317 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012318#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012321/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012322#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012323int
12324main ()
12325{
12326setpgrp(0,0);
12327 ;
12328 return 0;
12329}
12330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Matthias Kloseb9621712010-04-24 17:59:49 +000012333$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012334
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012337
12338fi
12339done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012340
Thomas Wouters3a584202000-08-05 23:28:51 +000012341for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012342do :
12343 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012344if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012346#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012349/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012350#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012351int
12352main ()
12353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012354gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_compile "$LINENO"; then :
12360
Guido van Rossum627b2d71993-12-24 10:39:16 +000012361else
Skip Montanaro6dead952003-09-25 14:50:04 +000012362
Matthias Kloseb9621712010-04-24 17:59:49 +000012363$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012364
Martin v. Löwis11437992002-04-12 09:54:03 +000012365
Guido van Rossum627b2d71993-12-24 10:39:16 +000012366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012368
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012369fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012370done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371
Michael W. Hudson54241132001-12-07 15:38:26 +000012372
Victor Stinnere0be4232011-10-25 13:06:09 +020012373for ac_func in clock_gettime
12374do :
12375 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12376if test "x$ac_cv_func_clock_gettime" = xyes; then :
12377 cat >>confdefs.h <<_ACEOF
12378#define HAVE_CLOCK_GETTIME 1
12379_ACEOF
12380
12381else
12382
12383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12384$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12385if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12386 $as_echo_n "(cached) " >&6
12387else
12388 ac_check_lib_save_LIBS=$LIBS
12389LIBS="-lrt $LIBS"
12390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12391/* end confdefs.h. */
12392
12393/* Override any GCC internal prototype to avoid an error.
12394 Use char because int might match the return type of a GCC
12395 builtin and then its argument prototype would still apply. */
12396#ifdef __cplusplus
12397extern "C"
12398#endif
12399char clock_gettime ();
12400int
12401main ()
12402{
12403return clock_gettime ();
12404 ;
12405 return 0;
12406}
12407_ACEOF
12408if ac_fn_c_try_link "$LINENO"; then :
12409 ac_cv_lib_rt_clock_gettime=yes
12410else
12411 ac_cv_lib_rt_clock_gettime=no
12412fi
12413rm -f core conftest.err conftest.$ac_objext \
12414 conftest$ac_exeext conftest.$ac_ext
12415LIBS=$ac_check_lib_save_LIBS
12416fi
12417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12418$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12419if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12420
Victor Stinner7efb8332014-08-29 15:41:08 +020012421 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012422 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12423
12424
12425$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12426
12427
12428fi
12429
12430
12431fi
12432done
12433
12434
12435for ac_func in clock_getres
12436do :
12437 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12438if test "x$ac_cv_func_clock_getres" = xyes; then :
12439 cat >>confdefs.h <<_ACEOF
12440#define HAVE_CLOCK_GETRES 1
12441_ACEOF
12442
12443else
12444
12445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12446$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12447if ${ac_cv_lib_rt_clock_getres+:} false; then :
12448 $as_echo_n "(cached) " >&6
12449else
12450 ac_check_lib_save_LIBS=$LIBS
12451LIBS="-lrt $LIBS"
12452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12453/* end confdefs.h. */
12454
12455/* Override any GCC internal prototype to avoid an error.
12456 Use char because int might match the return type of a GCC
12457 builtin and then its argument prototype would still apply. */
12458#ifdef __cplusplus
12459extern "C"
12460#endif
12461char clock_getres ();
12462int
12463main ()
12464{
12465return clock_getres ();
12466 ;
12467 return 0;
12468}
12469_ACEOF
12470if ac_fn_c_try_link "$LINENO"; then :
12471 ac_cv_lib_rt_clock_getres=yes
12472else
12473 ac_cv_lib_rt_clock_getres=no
12474fi
12475rm -f core conftest.err conftest.$ac_objext \
12476 conftest$ac_exeext conftest.$ac_ext
12477LIBS=$ac_check_lib_save_LIBS
12478fi
12479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12480$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12481if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12482
12483 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12484
12485
12486fi
12487
12488
12489fi
12490done
12491
12492
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012493for ac_func in clock_settime
12494do :
12495 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12496if test "x$ac_cv_func_clock_settime" = xyes; then :
12497 cat >>confdefs.h <<_ACEOF
12498#define HAVE_CLOCK_SETTIME 1
12499_ACEOF
12500
12501else
12502
12503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12504$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12505if ${ac_cv_lib_rt_clock_settime+:} false; then :
12506 $as_echo_n "(cached) " >&6
12507else
12508 ac_check_lib_save_LIBS=$LIBS
12509LIBS="-lrt $LIBS"
12510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12511/* end confdefs.h. */
12512
12513/* Override any GCC internal prototype to avoid an error.
12514 Use char because int might match the return type of a GCC
12515 builtin and then its argument prototype would still apply. */
12516#ifdef __cplusplus
12517extern "C"
12518#endif
12519char clock_settime ();
12520int
12521main ()
12522{
12523return clock_settime ();
12524 ;
12525 return 0;
12526}
12527_ACEOF
12528if ac_fn_c_try_link "$LINENO"; then :
12529 ac_cv_lib_rt_clock_settime=yes
12530else
12531 ac_cv_lib_rt_clock_settime=no
12532fi
12533rm -f core conftest.err conftest.$ac_objext \
12534 conftest$ac_exeext conftest.$ac_ext
12535LIBS=$ac_check_lib_save_LIBS
12536fi
12537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12538$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12539if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12540
12541 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12542
12543
12544fi
12545
12546
12547fi
12548done
12549
12550
Matthias Kloseb9621712010-04-24 17:59:49 +000012551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12552$as_echo_n "checking for major... " >&6; }
12553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012554/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012555
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012556#if defined(MAJOR_IN_MKDEV)
12557#include <sys/mkdev.h>
12558#elif defined(MAJOR_IN_SYSMACROS)
12559#include <sys/sysmacros.h>
12560#else
12561#include <sys/types.h>
12562#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012563
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012564int
12565main ()
12566{
12567
12568 makedev(major(0),minor(0));
12569
12570 ;
12571 return 0;
12572}
12573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012574if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012575
12576
Matthias Kloseb9621712010-04-24 17:59:49 +000012577$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012578
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12580$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012581
12582else
Skip Montanaro6dead952003-09-25 14:50:04 +000012583
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12585$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012586
12587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012588rm -f core conftest.err conftest.$ac_objext \
12589 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012590
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012591# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12592# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12594$as_echo_n "checking for if_nameindex... " >&6; }
12595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12596/* end confdefs.h. */
12597
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012598#include <stdio.h>
12599#ifdef STDC_HEADERS
12600# include <stdlib.h>
12601# include <stddef.h>
12602#else
12603# ifdef HAVE_STDLIB_H
12604# include <stdlib.h>
12605# endif
12606#endif
12607#ifdef HAVE_SYS_SOCKET_H
12608# include <sys/socket.h>
12609#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012610#ifdef HAVE_NET_IF_H
12611# include <net/if.h>
12612#endif
12613
12614int
12615main ()
12616{
12617struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12618 ;
12619 return 0;
12620}
12621_ACEOF
12622if ac_fn_c_try_link "$LINENO"; then :
12623
12624$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12625
12626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12627$as_echo "yes" >&6; }
12628else
12629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12630$as_echo "no" >&6; }
12631
12632fi
12633rm -f core conftest.err conftest.$ac_objext \
12634 conftest$ac_exeext conftest.$ac_ext
12635
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012636# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12637# macro is not defined in android-ndk-r13.
12638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12639$as_echo_n "checking for lockf... " >&6; }
12640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12641/* end confdefs.h. */
12642#include <unistd.h>
12643int
12644main ()
12645{
12646lockf(0, F_LOCK, 0);
12647 ;
12648 return 0;
12649}
12650_ACEOF
12651if ac_fn_c_try_link "$LINENO"; then :
12652
12653$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12654
12655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12656$as_echo "yes" >&6; }
12657else
12658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12659$as_echo "no" >&6; }
12660
12661fi
12662rm -f core conftest.err conftest.$ac_objext \
12663 conftest$ac_exeext conftest.$ac_ext
12664
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012665# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012666# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12668$as_echo_n "checking for getaddrinfo... " >&6; }
12669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012670/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012671
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012672#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012673#include <sys/socket.h>
12674#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012675#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012676
Martin v. Löwis11437992002-04-12 09:54:03 +000012677int
12678main ()
12679{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012680getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ;
12682 return 0;
12683}
12684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012685if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012686 have_getaddrinfo=yes
12687else
Matthias Kloseb9621712010-04-24 17:59:49 +000012688 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012690rm -f core conftest.err conftest.$ac_objext \
12691 conftest$ac_exeext conftest.$ac_ext
12692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12693$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012694if test $have_getaddrinfo = yes
12695then
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12697$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012698 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012700else
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012702
12703if test "${enable_ipv6+set}" = set; then
12704 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12705else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012706 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012707fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012708else
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012710/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012711
Stefan Krah19c21392012-11-22 23:47:32 +010012712#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012713#include <sys/types.h>
12714#include <netdb.h>
12715#include <string.h>
12716#include <sys/socket.h>
12717#include <netinet/in.h>
12718
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012719int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012720{
12721 int passive, gaierr, inet4 = 0, inet6 = 0;
12722 struct addrinfo hints, *ai, *aitop;
12723 char straddr[INET6_ADDRSTRLEN], strport[16];
12724
12725 for (passive = 0; passive <= 1; passive++) {
12726 memset(&hints, 0, sizeof(hints));
12727 hints.ai_family = AF_UNSPEC;
12728 hints.ai_flags = passive ? AI_PASSIVE : 0;
12729 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012730 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012731 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12732 (void)gai_strerror(gaierr);
12733 goto bad;
12734 }
12735 for (ai = aitop; ai; ai = ai->ai_next) {
12736 if (ai->ai_addr == NULL ||
12737 ai->ai_addrlen == 0 ||
12738 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12739 straddr, sizeof(straddr), strport, sizeof(strport),
12740 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12741 goto bad;
12742 }
12743 switch (ai->ai_family) {
12744 case AF_INET:
12745 if (strcmp(strport, "54321") != 0) {
12746 goto bad;
12747 }
12748 if (passive) {
12749 if (strcmp(straddr, "0.0.0.0") != 0) {
12750 goto bad;
12751 }
12752 } else {
12753 if (strcmp(straddr, "127.0.0.1") != 0) {
12754 goto bad;
12755 }
12756 }
12757 inet4++;
12758 break;
12759 case AF_INET6:
12760 if (strcmp(strport, "54321") != 0) {
12761 goto bad;
12762 }
12763 if (passive) {
12764 if (strcmp(straddr, "::") != 0) {
12765 goto bad;
12766 }
12767 } else {
12768 if (strcmp(straddr, "::1") != 0) {
12769 goto bad;
12770 }
12771 }
12772 inet6++;
12773 break;
12774 case AF_UNSPEC:
12775 goto bad;
12776 break;
12777 default:
12778 /* another family support? */
12779 break;
12780 }
12781 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012782 freeaddrinfo(aitop);
12783 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012784 }
12785
12786 if (!(inet4 == 0 || inet4 == 2))
12787 goto bad;
12788 if (!(inet6 == 0 || inet6 == 2))
12789 goto bad;
12790
12791 if (aitop)
12792 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012793 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012794
12795 bad:
12796 if (aitop)
12797 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012798 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012799}
12800
Martin v. Löwis11437992002-04-12 09:54:03 +000012801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012802if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012803 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012804else
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012811fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012812
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012814
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12816$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12817
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012818if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012819then
12820 if test $ipv6 = yes
12821 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012822 echo 'Fatal: You must get working getaddrinfo() function.'
12823 echo ' or you can specify "--disable-ipv6"'.
12824 exit 1
12825 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012826else
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012829
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012830fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012831
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012832for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012833do :
12834 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012835if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012837#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012838_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012839
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012840fi
12841done
12842
Michael W. Hudson54241132001-12-07 15:38:26 +000012843
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012844# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12846$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012847if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012849else
Matthias Kloseb9621712010-04-24 17:59:49 +000012850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012851/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012852#include <sys/types.h>
12853#include <sys/time.h>
12854#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012855
Martin v. Löwis11437992002-04-12 09:54:03 +000012856int
12857main ()
12858{
12859if ((struct tm *) 0)
12860return 0;
12861 ;
12862 return 0;
12863}
12864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012865if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012866 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012867else
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12873$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012874if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877
12878fi
12879
Matthias Kloseb9621712010-04-24 17:59:49 +000012880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12881$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012882if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012884else
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012886/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887#include <sys/types.h>
12888#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
Martin v. Löwis11437992002-04-12 09:54:03 +000012890int
12891main ()
12892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893struct tm tm;
12894 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ;
12897 return 0;
12898}
12899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012900if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901 ac_cv_struct_tm=time.h
12902else
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12908$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012909if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012912
12913fi
12914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915ac_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 +000012916#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918"
Victor Stinnere0be4232011-10-25 13:06:09 +020012919if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012920
12921cat >>confdefs.h <<_ACEOF
12922#define HAVE_STRUCT_TM_TM_ZONE 1
12923_ACEOF
12924
12925
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012926fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012927
Martin v. Löwis11437992002-04-12 09:54:03 +000012928if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12929
Matthias Kloseb9621712010-04-24 17:59:49 +000012930$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012931
12932else
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12934"
Victor Stinnere0be4232011-10-25 13:06:09 +020012935if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937else
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939fi
12940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012942#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943_ACEOF
12944
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12946$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012947if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949else
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012951/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012952#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953#if !HAVE_DECL_TZNAME
12954extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012956
Martin v. Löwis11437992002-04-12 09:54:03 +000012957int
12958main ()
12959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 ;
12962 return 0;
12963}
12964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012965if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012966 ac_cv_var_tzname=yes
12967else
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012970rm -f core conftest.err conftest.$ac_objext \
12971 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12974$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012975 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012978
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012979 fi
12980fi
12981
Matthias Kloseb9621712010-04-24 17:59:49 +000012982ac_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 +020012983if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012984
12985cat >>confdefs.h <<_ACEOF
12986#define HAVE_STRUCT_STAT_ST_RDEV 1
12987_ACEOF
12988
12989
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012990fi
12991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992ac_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 +020012993if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012994
Martin v. Löwis11437992002-04-12 09:54:03 +000012995cat >>confdefs.h <<_ACEOF
12996#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12997_ACEOF
12998
12999
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013000fi
13001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002ac_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 +020013003if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013004
13005cat >>confdefs.h <<_ACEOF
13006#define HAVE_STRUCT_STAT_ST_FLAGS 1
13007_ACEOF
13008
13009
13010fi
13011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012ac_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 +020013013if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013014
13015cat >>confdefs.h <<_ACEOF
13016#define HAVE_STRUCT_STAT_ST_GEN 1
13017_ACEOF
13018
13019
13020fi
13021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022ac_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 +020013023if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013024
13025cat >>confdefs.h <<_ACEOF
13026#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13027_ACEOF
13028
13029
13030fi
13031
Matthias Kloseb9621712010-04-24 17:59:49 +000013032ac_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 +020013033if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013034
Martin v. Löwis11437992002-04-12 09:54:03 +000013035cat >>confdefs.h <<_ACEOF
13036#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13037_ACEOF
13038
13039
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013040fi
13041
Stefan Krah267b6392016-04-26 01:09:18 +020013042ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13043 #include <sys/types.h>
13044 #include <pwd.h>
13045
13046"
13047if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13048
13049cat >>confdefs.h <<_ACEOF
13050#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13051_ACEOF
13052
13053
13054fi
13055ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13056 #include <sys/types.h>
13057 #include <pwd.h>
13058
13059"
13060if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13061
13062cat >>confdefs.h <<_ACEOF
13063#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13064_ACEOF
13065
13066
13067fi
13068
Zachary Ware6a6967e2016-10-01 00:47:27 -050013069# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13070ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13071"
13072if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13073
13074cat >>confdefs.h <<_ACEOF
13075#define HAVE_SIGINFO_T_SI_BAND 1
13076_ACEOF
13077
13078
13079fi
13080
Michael W. Hudson54241132001-12-07 15:38:26 +000013081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13083$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013084if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013086else
Matthias Kloseb159a552010-04-25 21:00:44 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013089/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013090#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013091int
13092main ()
13093{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013094return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013095 ;
13096 return 0;
13097}
13098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013099if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013100 ac_cv_header_time_altzone=yes
13101else
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013106fi
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13109$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013110if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113
13114fi
13115
Guido van Rossumda88dad1995-01-26 00:46:29 +000013116was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13118$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013120/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013121
13122#include <sys/types.h>
13123#include <sys/select.h>
13124#include <sys/time.h>
13125
Martin v. Löwis11437992002-04-12 09:54:03 +000013126int
13127main ()
13128{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013129;
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 ;
13131 return 0;
13132}
13133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013135
13136
Matthias Kloseb9621712010-04-24 17:59:49 +000013137$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013138
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013139 was_it_defined=yes
13140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13144$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13147$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013148if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013152/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013153#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013154int
13155main ()
13156{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013158 ;
13159 return 0;
13160}
13161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013163 ac_cv_struct_addrinfo=yes
13164else
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13168fi
13169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13171$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013172if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013175
13176fi
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13179$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013180if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013182else
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013184/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013185
13186# include <sys/types.h>
13187# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013188int
13189main ()
13190{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013191struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013192 ;
13193 return 0;
13194}
13195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013197 ac_cv_struct_sockaddr_storage=yes
13198else
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13202fi
13203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13205$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013206if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013209
13210fi
13211
Christian Heimesdffa3942016-09-05 23:54:41 +020013212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13213$as_echo_n "checking for sockaddr_alg... " >&6; }
13214if ${ac_cv_struct_sockaddr_alg+:} false; then :
13215 $as_echo_n "(cached) " >&6
13216else
13217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13218/* end confdefs.h. */
13219
13220# include <sys/types.h>
13221# include <sys/socket.h>
13222# include <linux/if_alg.h>
13223int
13224main ()
13225{
13226struct sockaddr_alg s
13227 ;
13228 return 0;
13229}
13230_ACEOF
13231if ac_fn_c_try_compile "$LINENO"; then :
13232 ac_cv_struct_sockaddr_alg=yes
13233else
13234 ac_cv_struct_sockaddr_alg=no
13235fi
13236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13237fi
13238
13239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13240$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13241if test $ac_cv_struct_sockaddr_alg = yes; then
13242
13243$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13244
13245fi
13246
Guido van Rossum627b2d71993-12-24 10:39:16 +000013247# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13250$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013251if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013256$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013257int
13258main ()
13259{
13260static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013261test_array [0] = 0;
13262return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
13264 ;
13265 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013266}
Martin v. Löwis11437992002-04-12 09:54:03 +000013267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013268if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013269 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013270else
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13276$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013277if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279
13280fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013281
Matthias Kloseb9621712010-04-24 17:59:49 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13283$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013284if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013286else
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013288/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289
Martin v. Löwis11437992002-04-12 09:54:03 +000013290int
13291main ()
13292{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013293
Martin v. Löwis11437992002-04-12 09:54:03 +000013294#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013295 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013296 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013297 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013299 char const *const *pcpcc;
13300 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 /* NEC SVR4.0.2 mips cc rejects this. */
13302 struct point {int x, y;};
13303 static struct point const zero = {0,0};
13304 /* AIX XL C 1.02.0.0 rejects this.
13305 It does not let you subtract one const X* pointer from another in
13306 an arm of an if-expression whose if-part is not a constant
13307 expression */
13308 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311 ++pcpcc;
13312 ppc = (char**) pcpcc;
13313 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013314 { /* SCO 3.2v4 cc rejects this sort of thing. */
13315 char tx;
13316 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013321 }
13322 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13323 int x[] = {25, 17};
13324 const int *foo = &x[0];
13325 ++foo;
13326 }
13327 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13328 typedef const int *iptr;
13329 iptr p = 0;
13330 ++p;
13331 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013332 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013334 struct s { int j; const int *ap[3]; } bx;
13335 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013336 }
13337 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13338 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013342#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013343
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 ;
13345 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013346}
Martin v. Löwis11437992002-04-12 09:54:03 +000013347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013348if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349 ac_cv_c_const=yes
13350else
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13356$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013357if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360
13361fi
13362
Michael W. Hudson54241132001-12-07 15:38:26 +000013363
Guido van Rossumda88dad1995-01-26 00:46:29 +000013364works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13366$as_echo_n "checking for working signed char... " >&6; }
13367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013368/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013369
Martin v. Löwis11437992002-04-12 09:54:03 +000013370int
13371main ()
13372{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013373signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013379 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013380else
Skip Montanaro6dead952003-09-25 14:50:04 +000013381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013383
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013384
Guido van Rossum7f43da71994-08-01 12:15:30 +000013385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13388$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013389
Guido van Rossumda88dad1995-01-26 00:46:29 +000013390have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13392$as_echo_n "checking for prototypes... " >&6; }
13393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013394/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013395int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013396int
13397main ()
13398{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013399return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 ;
13401 return 0;
13402}
13403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
Matthias Kloseb159a552010-04-25 21:00:44 +000013408 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13412$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013413
Guido van Rossumda88dad1995-01-26 00:46:29 +000013414works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13416$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013418/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013419
13420#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013421int foo(int x, ...) {
13422 va_list va;
13423 va_start(va, x);
13424 va_arg(va, int);
13425 va_arg(va, char *);
13426 va_arg(va, double);
13427 return 0;
13428}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430int
13431main ()
13432{
Guido van Rossum90eea071996-08-30 20:58:57 +000013433return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 ;
13435 return 0;
13436}
13437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013439
13440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013442
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013443 works=yes
13444
Guido van Rossum627b2d71993-12-24 10:39:16 +000013445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13448$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013449
Martin v. Löwisd6320502004-08-12 13:45:08 +000013450# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13452$as_echo_n "checking for socketpair... " >&6; }
13453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013454/* end confdefs.h. */
13455
13456#include <sys/types.h>
13457#include <sys/socket.h>
13458
13459int
13460main ()
13461{
13462void *x=socketpair
13463 ;
13464 return 0;
13465}
13466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013470
Matthias Kloseb159a552010-04-25 21:00:44 +000013471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013472$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013473else
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13475$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013476
13477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013479
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013480# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13482$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013484/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013485#include <sys/types.h>
13486#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013487int
13488main ()
13489{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013490struct sockaddr x;
13491x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 ;
13493 return 0;
13494}
13495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013496if ac_fn_c_try_compile "$LINENO"; then :
13497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13498$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013501
13502else
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13504$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013505
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013508
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013509# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
13511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013513if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13518$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013519 OLD_CFLAGS=$CFLAGS
13520 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013522/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013523
13524# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526int
13527main ()
13528{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013529
13530 char *name;
13531 struct hostent *he, *res;
13532 char buffer[2048];
13533 int buflen = 2048;
13534 int h_errnop;
13535
13536 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013537
13538 ;
13539 return 0;
13540}
13541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013545
Martin v. Löwis11437992002-04-12 09:54:03 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13550$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013552else
Skip Montanaro6dead952003-09-25 14:50:04 +000013553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13555$as_echo "no" >&6; }
13556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13557$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013559/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013560
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013561# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013562
Martin v. Löwis11437992002-04-12 09:54:03 +000013563int
13564main ()
13565{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013566
13567 char *name;
13568 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013569 char buffer[2048];
13570 int buflen = 2048;
13571 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013572
Matthias Kloseb159a552010-04-25 21:00:44 +000013573 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013574
13575 ;
13576 return 0;
13577}
13578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013582
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Matthias Kloseb159a552010-04-25 21:00:44 +000013584$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13587$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013589else
Skip Montanaro6dead952003-09-25 14:50:04 +000013590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13592$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13594$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13596/* end confdefs.h. */
13597
13598# include <netdb.h>
13599
13600int
13601main ()
13602{
13603
13604 char *name;
13605 struct hostent *he;
13606 struct hostent_data data;
13607
13608 (void) gethostbyname_r(name, he, &data);
13609
13610 ;
13611 return 0;
13612}
13613_ACEOF
13614if ac_fn_c_try_compile "$LINENO"; then :
13615
13616 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13617
13618
13619$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13620
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13622$as_echo "yes" >&6; }
13623
13624else
13625
13626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13627$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013631
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013634
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013637 CFLAGS=$OLD_CFLAGS
13638
13639else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 for ac_func in gethostbyname
13642do :
13643 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013644if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013645 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013646#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013647_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013648
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013649fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013650done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013651
Michael W. Hudson54241132001-12-07 15:38:26 +000013652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013653fi
13654
Michael W. Hudson54241132001-12-07 15:38:26 +000013655
13656
13657
13658
13659
13660
Guido van Rossum627b2d71993-12-24 10:39:16 +000013661# checks for system services
13662# (none yet)
13663
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013664# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013665ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013666if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013667
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013668else
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13670$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013671if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013673else
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013675LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013679/* Override any GCC internal prototype to avoid an error.
13680 Use char because int might match the return type of a GCC
13681 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013682#ifdef __cplusplus
13683extern "C"
13684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013685char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013686int
13687main ()
13688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013689return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013690 ;
13691 return 0;
13692}
13693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013694if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013696else
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013699rm -f core conftest.err conftest.$ac_objext \
13700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013701LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13704$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013705if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013706 cat >>confdefs.h <<_ACEOF
13707#define HAVE_LIBIEEE 1
13708_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013709
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013710 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013711
Guido van Rossum627b2d71993-12-24 10:39:16 +000013712fi
13713
Michael W. Hudson54241132001-12-07 15:38:26 +000013714
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013715fi
13716
Michael W. Hudson54241132001-12-07 15:38:26 +000013717
Guido van Rossum7f253911997-05-09 02:42:48 +000013718# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13720$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013722# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013723if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013725if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013726then
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13731$as_echo "yes" >&6; }
13732else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13733$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013734fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013735else
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13737$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738fi
13739
Guido van Rossum7f253911997-05-09 02:42:48 +000013740
Guido van Rossum7f43da71994-08-01 12:15:30 +000013741# check for --with-libm=...
13742
Guido van Rossum563e7081996-09-10 18:20:48 +000013743case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013744Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013745*) LIBM=-lm
13746esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13748$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013751if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013752 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013753if test "$withval" = no
13754then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13756$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013757elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013758then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13760$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013761else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013762fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13765$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766fi
13767
Guido van Rossum7f43da71994-08-01 12:15:30 +000013768
13769# check for --with-libc=...
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13772$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013775if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013777if test "$withval" = no
13778then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13780$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013781elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013782then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13784$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013785else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013786fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013787else
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13789$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790fi
13791
Guido van Rossum7f43da71994-08-01 12:15:30 +000013792
Stefan Krah1919b7e2012-03-21 18:25:23 +010013793# **************************************
13794# * Check for gcc x64 inline assembler *
13795# **************************************
13796
13797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13798$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13800/* end confdefs.h. */
13801
13802int
13803main ()
13804{
13805
13806 __asm__ __volatile__ ("movq %rcx, %rax");
13807
13808 ;
13809 return 0;
13810}
13811_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013812if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013813 have_gcc_asm_for_x64=yes
13814else
13815 have_gcc_asm_for_x64=no
13816fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013817rm -f core conftest.err conftest.$ac_objext \
13818 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13820$as_echo "$have_gcc_asm_for_x64" >&6; }
13821if test "$have_gcc_asm_for_x64" = yes
13822then
13823
13824$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13825
13826fi
13827
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013828# **************************************************
13829# * Check for various properties of floating point *
13830# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13833$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013834if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013836else
13837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013839 ac_cv_little_endian_double=no
13840else
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013842/* end confdefs.h. */
13843
13844#include <string.h>
13845int main() {
13846 double x = 9006104071832581.0;
13847 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13848 return 0;
13849 else
13850 return 1;
13851}
13852
13853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013854if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013855 ac_cv_little_endian_double=yes
13856else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861fi
13862
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863fi
13864
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13866$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013867if test "$ac_cv_little_endian_double" = yes
13868then
13869
Matthias Kloseb9621712010-04-24 17:59:49 +000013870$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013871
13872fi
13873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13875$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013876if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013878else
13879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013881 ac_cv_big_endian_double=no
13882else
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013884/* end confdefs.h. */
13885
13886#include <string.h>
13887int main() {
13888 double x = 9006104071832581.0;
13889 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13890 return 0;
13891 else
13892 return 1;
13893}
13894
13895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013896if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013897 ac_cv_big_endian_double=yes
13898else
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903fi
13904
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013905fi
13906
Matthias Kloseb9621712010-04-24 17:59:49 +000013907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13908$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013909if test "$ac_cv_big_endian_double" = yes
13910then
13911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013913
13914fi
13915
13916# Some ARM platforms use a mixed-endian representation for doubles.
13917# While Python doesn't currently have full support for these platforms
13918# (see e.g., issue 1762561), we can at least make sure that float <-> string
13919# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13921$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013922if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924else
13925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013927 ac_cv_mixed_endian_double=no
13928else
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013930/* end confdefs.h. */
13931
13932#include <string.h>
13933int main() {
13934 double x = 9006104071832581.0;
13935 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13936 return 0;
13937 else
13938 return 1;
13939}
13940
13941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013942if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013943 ac_cv_mixed_endian_double=yes
13944else
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949fi
13950
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951fi
13952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13954$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013955if test "$ac_cv_mixed_endian_double" = yes
13956then
13957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013959
13960fi
13961
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013962# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013963# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013964# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013965# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013966# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013967# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013968
13969# This inline assembler syntax may also work for suncc and icc,
13970# so we try it on all platforms.
13971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13973$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013975/* end confdefs.h. */
13976
13977int
13978main ()
13979{
13980
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013981 unsigned short cw;
13982 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13983 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984
13985 ;
13986 return 0;
13987}
13988_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013989if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013990 have_gcc_asm_for_x87=yes
13991else
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013993fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013994rm -f core conftest.err conftest.$ac_objext \
13995 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13997$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013998if test "$have_gcc_asm_for_x87" = yes
13999then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014002
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014003fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014004
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14006$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008/* end confdefs.h. */
14009
14010int
14011main ()
14012{
14013
14014 unsigned int fpcr;
14015 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14016 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14017
14018 ;
14019 return 0;
14020}
14021_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014022if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014023 have_gcc_asm_for_mc68881=yes
14024else
14025 have_gcc_asm_for_mc68881=no
14026fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014027rm -f core conftest.err conftest.$ac_objext \
14028 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14030$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14031if test "$have_gcc_asm_for_mc68881" = yes
14032then
14033
14034$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14035
14036fi
14037
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014038# Detect whether system arithmetic is subject to x87-style double
14039# rounding issues. The result of this test has little meaning on non
14040# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14041# mode is round-to-nearest and double rounding issues are present, and
14042# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14044$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014045# $BASECFLAGS may affect the result
14046ac_save_cc="$CC"
14047CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014048if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014049 ac_cv_x87_double_rounding=no
14050else
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014052/* end confdefs.h. */
14053
14054#include <stdlib.h>
14055#include <math.h>
14056int main() {
14057 volatile double x, y, z;
14058 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14059 x = 0.99999999999999989; /* 1-2**-53 */
14060 y = 1./x;
14061 if (y != 1.)
14062 exit(0);
14063 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14064 x = 1e16;
14065 y = 2.99999;
14066 z = x + y;
14067 if (z != 1e16+4.)
14068 exit(0);
14069 /* both tests show evidence of double rounding */
14070 exit(1);
14071}
14072
14073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014074if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014075 ac_cv_x87_double_rounding=no
14076else
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14080 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014081fi
14082
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014083CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14085$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014086if test "$ac_cv_x87_double_rounding" = yes
14087then
14088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014090
14091fi
14092
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014093# ************************************
14094# * Check for mathematical functions *
14095# ************************************
14096
14097LIBS_SAVE=$LIBS
14098LIBS="$LIBS $LIBM"
14099
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014100for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14101do :
14102 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14103ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014104if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014105 cat >>confdefs.h <<_ACEOF
14106#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14107_ACEOF
14108
14109fi
14110done
14111
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014112for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014113do :
14114 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14115ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014116if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014117 cat >>confdefs.h <<_ACEOF
14118#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14119_ACEOF
14120
14121fi
14122done
14123
14124ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14125"
Victor Stinnere0be4232011-10-25 13:06:09 +020014126if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014127 ac_have_decl=1
14128else
14129 ac_have_decl=0
14130fi
14131
14132cat >>confdefs.h <<_ACEOF
14133#define HAVE_DECL_ISINF $ac_have_decl
14134_ACEOF
14135ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14136"
Victor Stinnere0be4232011-10-25 13:06:09 +020014137if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014138 ac_have_decl=1
14139else
14140 ac_have_decl=0
14141fi
14142
14143cat >>confdefs.h <<_ACEOF
14144#define HAVE_DECL_ISNAN $ac_have_decl
14145_ACEOF
14146ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14147"
Victor Stinnere0be4232011-10-25 13:06:09 +020014148if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014149 ac_have_decl=1
14150else
14151 ac_have_decl=0
14152fi
14153
14154cat >>confdefs.h <<_ACEOF
14155#define HAVE_DECL_ISFINITE $ac_have_decl
14156_ACEOF
14157
14158
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014159# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14160# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14162$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014163if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014165else
14166
Matthias Kloseb9621712010-04-24 17:59:49 +000014167if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014168 ac_cv_tanh_preserves_zero_sign=no
14169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014171/* end confdefs.h. */
14172
14173#include <math.h>
14174#include <stdlib.h>
14175int main() {
14176 /* return 0 if either negative zeros don't exist
14177 on this platform or if negative zeros exist
14178 and tanh(-0.) == -0. */
14179 if (atan2(0., -1.) == atan2(-0., -1.) ||
14180 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14181 else exit(1);
14182}
14183
14184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014185if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014186 ac_cv_tanh_preserves_zero_sign=yes
14187else
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014192fi
14193
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014194fi
14195
Matthias Kloseb9621712010-04-24 17:59:49 +000014196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14197$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014198if test "$ac_cv_tanh_preserves_zero_sign" = yes
14199then
14200
Matthias Kloseb9621712010-04-24 17:59:49 +000014201$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014202
14203fi
14204
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014205if test "$ac_cv_func_log1p" = yes
14206then
14207 # On some versions of AIX, log1p(-0.) returns 0. instead of
14208 # -0. See issue #9920.
14209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14210$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014211 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014212 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014213else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014214
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014215 if test "$cross_compiling" = yes; then :
14216 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014217else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14219/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014220
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014221 #include <math.h>
14222 #include <stdlib.h>
14223 int main() {
14224 /* Fail if the signs of log1p(-0.) and -0. can be
14225 distinguished. */
14226 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14227 return 0;
14228 else
14229 return 1;
14230 }
14231
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014232_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014233if ac_fn_c_try_run "$LINENO"; then :
14234 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014235else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014236 ac_cv_log1p_drops_zero_sign=yes
14237fi
14238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14239 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014240fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014241
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014242fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014243
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14245$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14246fi
14247if test "$ac_cv_log1p_drops_zero_sign" = yes
14248then
14249
14250$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14251
14252fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014253
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014254LIBS=$LIBS_SAVE
14255
Mark Dickinsona614f042009-11-28 12:48:43 +000014256# For multiprocessing module, check that sem_open
14257# actually works. For FreeBSD versions <= 7.2,
14258# the kernel module that provides POSIX semaphores
14259# isn't loaded by default, so an attempt to call
14260# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14262$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014263if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014265else
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014267 ac_cv_posix_semaphores_enabled=yes
14268else
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014270/* end confdefs.h. */
14271
14272#include <unistd.h>
14273#include <fcntl.h>
14274#include <stdio.h>
14275#include <semaphore.h>
14276#include <sys/stat.h>
14277
14278int main(void) {
14279 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14280 if (a == SEM_FAILED) {
14281 perror("sem_open");
14282 return 1;
14283 }
14284 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014285 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014286 return 0;
14287}
14288
14289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014291 ac_cv_posix_semaphores_enabled=yes
14292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014297fi
14298
14299
Mark Dickinsona614f042009-11-28 12:48:43 +000014300fi
14301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14303$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014304if test $ac_cv_posix_semaphores_enabled = no
14305then
14306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014308
14309fi
14310
Mark Dickinson10683072009-04-18 21:18:19 +000014311# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14313$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014314if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014315 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014316else
Matthias Kloseb9621712010-04-24 17:59:49 +000014317 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014318 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014319else
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014321/* end confdefs.h. */
14322
14323#include <unistd.h>
14324#include <fcntl.h>
14325#include <stdio.h>
14326#include <semaphore.h>
14327#include <sys/stat.h>
14328
14329int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014330 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014331 int count;
14332 int res;
14333 if(a==SEM_FAILED){
14334 perror("sem_open");
14335 return 1;
14336
14337 }
14338 res = sem_getvalue(a, &count);
14339 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014340 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014341 return res==-1 ? 1 : 0;
14342}
14343
Mark Dickinson10683072009-04-18 21:18:19 +000014344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014345if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014346 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014347else
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14351 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014352fi
14353
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014354
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014355fi
14356
Matthias Kloseb9621712010-04-24 17:59:49 +000014357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14358$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014359if test $ac_cv_broken_sem_getvalue = yes
14360then
14361
Matthias Kloseb9621712010-04-24 17:59:49 +000014362$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014363
14364fi
14365
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014366ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14367"
14368if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14369 ac_have_decl=1
14370else
14371 ac_have_decl=0
14372fi
14373
14374cat >>confdefs.h <<_ACEOF
14375#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14376_ACEOF
14377ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14378"
14379if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14380 ac_have_decl=1
14381else
14382 ac_have_decl=0
14383fi
14384
14385cat >>confdefs.h <<_ACEOF
14386#define HAVE_DECL_RTLD_NOW $ac_have_decl
14387_ACEOF
14388ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14389"
14390if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14391 ac_have_decl=1
14392else
14393 ac_have_decl=0
14394fi
14395
14396cat >>confdefs.h <<_ACEOF
14397#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14398_ACEOF
14399ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14400"
14401if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14402 ac_have_decl=1
14403else
14404 ac_have_decl=0
14405fi
14406
14407cat >>confdefs.h <<_ACEOF
14408#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14409_ACEOF
14410ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14411"
14412if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14413 ac_have_decl=1
14414else
14415 ac_have_decl=0
14416fi
14417
14418cat >>confdefs.h <<_ACEOF
14419#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14420_ACEOF
14421ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14422"
14423if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14424 ac_have_decl=1
14425else
14426 ac_have_decl=0
14427fi
14428
14429cat >>confdefs.h <<_ACEOF
14430#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14431_ACEOF
14432ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14433"
14434if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14435 ac_have_decl=1
14436else
14437 ac_have_decl=0
14438fi
14439
14440cat >>confdefs.h <<_ACEOF
14441#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14442_ACEOF
14443
14444
Mark Dickinsonbd792642009-03-18 20:06:12 +000014445# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14447$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014448# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014449if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014450 enableval=$enable_big_digits; case $enable_big_digits in
14451yes)
14452 enable_big_digits=30 ;;
14453no)
14454 enable_big_digits=15 ;;
1445515|30)
14456 ;;
14457*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014458 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 +000014459esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14461$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014462
14463cat >>confdefs.h <<_ACEOF
14464#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14465_ACEOF
14466
14467
14468else
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14470$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014471fi
14472
14473
Guido van Rossumef2255b2000-03-10 22:30:29 +000014474# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014475ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014476if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
14478
Matthias Kloseb9621712010-04-24 17:59:49 +000014479$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014481 wchar_h="yes"
14482
Guido van Rossumef2255b2000-03-10 22:30:29 +000014483else
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014485
14486fi
14487
Michael W. Hudson54241132001-12-07 15:38:26 +000014488
Martin v. Löwis11437992002-04-12 09:54:03 +000014489
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014490# determine wchar_t size
14491if test "$wchar_h" = yes
14492then
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14495# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14496# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14498$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014499if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014500 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014501else
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14503"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014504
Martin v. Löwis11437992002-04-12 09:54:03 +000014505else
Matthias Kloseb9621712010-04-24 17:59:49 +000014506 if test "$ac_cv_type_wchar_t" = yes; then
14507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014509as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014510See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511 else
14512 ac_cv_sizeof_wchar_t=0
14513 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014515
Martin v. Löwis11437992002-04-12 09:54:03 +000014516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14518$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519
14520
14521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014523#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014524_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014525
Michael W. Hudson54241132001-12-07 15:38:26 +000014526
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014527fi
14528
Matthias Kloseb9621712010-04-24 17:59:49 +000014529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14530$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014531have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014533/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014534
14535#include <tcl.h>
14536#if TCL_UTF_MAX != 6
14537# error "NOT UCS4_TCL"
14538#endif
14539int
14540main ()
14541{
14542
14543 ;
14544 return 0;
14545}
14546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014547if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014548
14549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014551
14552 have_ucs4_tcl=yes
14553
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14557$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014558
Skip Montanaro6dead952003-09-25 14:50:04 +000014559# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014560if test "$wchar_h" = yes
14561then
14562 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14564$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014565 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014566 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014567else
14568
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014570 ac_cv_wchar_t_signed=yes
14571else
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014573/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014574
14575 #include <wchar.h>
14576 int main()
14577 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014578 /* Success: exit code 0 */
14579 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014580 }
14581
14582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014583if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014584 ac_cv_wchar_t_signed=yes
14585else
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014590fi
14591
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014592fi
14593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14595$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596fi
14597
Georg Brandl52d168a2008-01-07 18:10:24 +000014598# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014599if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014600 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014601then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014602 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014603
Matthias Kloseb9621712010-04-24 17:59:49 +000014604$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014605
Georg Brandl52d168a2008-01-07 18:10:24 +000014606else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014607 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014608fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14610$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014611
14612# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14614$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014615if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014617else
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 ac_cv_c_bigendian=unknown
14619 # See if we're dealing with a universal compiler.
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621/* end confdefs.h. */
14622#ifndef __APPLE_CC__
14623 not a universal capable compiler
14624 #endif
14625 typedef int dummy;
14626
Skip Montanaro6dead952003-09-25 14:50:04 +000014627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014628if ac_fn_c_try_compile "$LINENO"; then :
14629
14630 # Check for potential -arch flags. It is not universal unless
14631 # there are at least two -arch flags with different values.
14632 ac_arch=
14633 ac_prev=
14634 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14635 if test -n "$ac_prev"; then
14636 case $ac_word in
14637 i?86 | x86_64 | ppc | ppc64)
14638 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14639 ac_arch=$ac_word
14640 else
14641 ac_cv_c_bigendian=universal
14642 break
14643 fi
14644 ;;
14645 esac
14646 ac_prev=
14647 elif test "x$ac_word" = "x-arch"; then
14648 ac_prev=arch
14649 fi
14650 done
14651fi
14652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14653 if test $ac_cv_c_bigendian = unknown; then
14654 # See if sys/param.h defines the BYTE_ORDER macro.
14655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014656/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014657#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014659
Martin v. Löwis11437992002-04-12 09:54:03 +000014660int
14661main ()
14662{
Matthias Kloseb9621712010-04-24 17:59:49 +000014663#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14664 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14665 && LITTLE_ENDIAN)
14666 bogus endian macros
14667 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014668
14669 ;
14670 return 0;
14671}
14672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014673if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014674 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014676/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014677#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014678 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014679
Martin v. Löwis11437992002-04-12 09:54:03 +000014680int
14681main ()
14682{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014683#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 not big endian
14685 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014686
14687 ;
14688 return 0;
14689}
14690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014691if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014692 ac_cv_c_bigendian=yes
14693else
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014697fi
14698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14699 fi
14700 if test $ac_cv_c_bigendian = unknown; then
14701 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014703/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014704#include <limits.h>
14705
Martin v. Löwis11437992002-04-12 09:54:03 +000014706int
14707main ()
14708{
Matthias Kloseb9621712010-04-24 17:59:49 +000014709#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14710 bogus endian macros
14711 #endif
14712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713 ;
14714 return 0;
14715}
14716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014717if ac_fn_c_try_compile "$LINENO"; then :
14718 # It does; now see whether it defined to _BIG_ENDIAN or not.
14719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14720/* end confdefs.h. */
14721#include <limits.h>
14722
14723int
14724main ()
14725{
14726#ifndef _BIG_ENDIAN
14727 not big endian
14728 #endif
14729
14730 ;
14731 return 0;
14732}
14733_ACEOF
14734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014736else
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14740fi
14741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14742 fi
14743 if test $ac_cv_c_bigendian = unknown; then
14744 # Compile a test program.
14745 if test "$cross_compiling" = yes; then :
14746 # Try to guess by grepping values from an object file.
14747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14748/* end confdefs.h. */
14749short int ascii_mm[] =
14750 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14751 short int ascii_ii[] =
14752 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14753 int use_ascii (int i) {
14754 return ascii_mm[i] + ascii_ii[i];
14755 }
14756 short int ebcdic_ii[] =
14757 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14758 short int ebcdic_mm[] =
14759 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14760 int use_ebcdic (int i) {
14761 return ebcdic_mm[i] + ebcdic_ii[i];
14762 }
14763 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765int
14766main ()
14767{
14768return use_ascii (foo) == use_ebcdic (foo);
14769 ;
14770 return 0;
14771}
14772_ACEOF
14773if ac_fn_c_try_compile "$LINENO"; then :
14774 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14775 ac_cv_c_bigendian=yes
14776 fi
14777 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14778 if test "$ac_cv_c_bigendian" = unknown; then
14779 ac_cv_c_bigendian=no
14780 else
14781 # finding both strings is unlikely to happen, but who knows?
14782 ac_cv_c_bigendian=unknown
14783 fi
14784 fi
14785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014787else
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014789/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014791int
14792main ()
14793{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 /* Are we little or big endian? From Harbison&Steele. */
14796 union
14797 {
14798 long int l;
14799 char c[sizeof (long int)];
14800 } u;
14801 u.l = 1;
14802 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803
14804 ;
14805 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014806}
Martin v. Löwis11437992002-04-12 09:54:03 +000014807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014808if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014809 ac_cv_c_bigendian=no
14810else
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14820$as_echo "$ac_cv_c_bigendian" >&6; }
14821 case $ac_cv_c_bigendian in #(
14822 yes)
14823 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14824;; #(
14825 no)
14826 ;; #(
14827 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014828
Matthias Kloseb9621712010-04-24 17:59:49 +000014829$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014830
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 ;; #(
14832 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014833 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014834 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014836
Michael W. Hudson54241132001-12-07 15:38:26 +000014837
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014838# ABI version string for Python extension modules. This appears between the
14839# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14840# from the following attributes which affect the ABI of this Python build (in
14841# this order):
14842#
14843# * The Python implementation (always 'cpython-' for us)
14844# * The major and minor version numbers
14845# * --with-pydebug (adds a 'd')
14846# * --with-pymalloc (adds a 'm')
14847# * --with-wide-unicode (adds a 'u')
14848#
14849# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014850# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14851# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014852
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14854$as_echo_n "checking ABIFLAGS... " >&6; }
14855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14856$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14858$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014859SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14861$as_echo "$SOABI" >&6; }
14862
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014863
14864case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014865 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014866 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14867 *)
14868 EXT_SUFFIX=${SHLIB_SUFFIX};;
14869esac
14870
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14872$as_echo_n "checking LDVERSION... " >&6; }
14873LDVERSION='$(VERSION)$(ABIFLAGS)'
14874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14875$as_echo "$LDVERSION" >&6; }
14876
doko@python.org87421192013-01-26 11:39:31 +010014877
doko@ubuntu.com55532312016-06-14 08:55:19 +020014878if test x$PLATFORM_TRIPLET = x; then
14879 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14880else
14881 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14882fi
doko@python.org87421192013-01-26 11:39:31 +010014883
14884
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014885# Check whether right shifting a negative integer extends the sign bit
14886# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14888$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014889if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014891else
Martin v. Löwis11437992002-04-12 09:54:03 +000014892
Matthias Kloseb9621712010-04-24 17:59:49 +000014893if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014894 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014895else
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014897/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014898
14899int main()
14900{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014901 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014902}
14903
Martin v. Löwis11437992002-04-12 09:54:03 +000014904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014905if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014906 ac_cv_rshift_extends_sign=yes
14907else
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014912fi
14913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914fi
14915
Matthias Kloseb9621712010-04-24 17:59:49 +000014916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14917$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014918if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014919then
Martin v. Löwis11437992002-04-12 09:54:03 +000014920
Matthias Kloseb9621712010-04-24 17:59:49 +000014921$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014922
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014923fi
14924
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014925# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14927$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014928if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014930else
Martin v. Löwis11437992002-04-12 09:54:03 +000014931
Matthias Kloseb9621712010-04-24 17:59:49 +000014932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014933/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014934#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014935int
14936main ()
14937{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014938
14939 FILE *f = fopen("/dev/null", "r");
14940 flockfile(f);
14941 getc_unlocked(f);
14942 funlockfile(f);
14943
Martin v. Löwis11437992002-04-12 09:54:03 +000014944 ;
14945 return 0;
14946}
14947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014948if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014949 ac_cv_have_getc_unlocked=yes
14950else
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 ac_cv_have_getc_unlocked=no
14952fi
14953rm -f core conftest.err conftest.$ac_objext \
14954 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956
Matthias Kloseb9621712010-04-24 17:59:49 +000014957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14958$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014959if test "$ac_cv_have_getc_unlocked" = yes
14960then
Martin v. Löwis11437992002-04-12 09:54:03 +000014961
Matthias Kloseb9621712010-04-24 17:59:49 +000014962$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014963
14964fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014965
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014966# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014967# save the value of LIBS so we don't actually link Python with readline
14968LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014969
Gregory P. Smith18820942008-09-07 06:24:49 +000014970# On some systems we need to link readline to a termcap compatible
14971# library. NOTE: Keep the precedence of listed libraries synchronised
14972# with setup.py.
14973py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14975$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014976for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014977 if test -z "$py_libtermcap"; then
14978 READLINE_LIBS="-lreadline"
14979 else
14980 READLINE_LIBS="-lreadline -l$py_libtermcap"
14981 fi
14982 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014984/* end confdefs.h. */
14985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986/* Override any GCC internal prototype to avoid an error.
14987 Use char because int might match the return type of a GCC
14988 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014989#ifdef __cplusplus
14990extern "C"
14991#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014992char readline ();
14993int
14994main ()
14995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014997 ;
14998 return 0;
14999}
15000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015001if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015002 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015004rm -f core conftest.err conftest.$ac_objext \
15005 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015006 if test $py_cv_lib_readline = yes; then
15007 break
15008 fi
15009done
15010# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15011#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015012if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15014$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015015else
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15017$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015020
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015021fi
15022
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015023# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015025/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015026#include <readline/readline.h>
15027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015028if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015029 have_readline=yes
15030else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015031 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015032
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015033fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015034rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015035if test $have_readline = yes
15036then
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015038/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015039#include <readline/readline.h>
15040
15041_ACEOF
15042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015046
15047fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015048rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015051/* end confdefs.h. */
15052#include <readline/readline.h>
15053
15054_ACEOF
15055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015059
15060fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015061rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015062
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015063fi
15064
Martin v. Löwis0daad592001-09-30 21:09:59 +000015065# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15067$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015068if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015070else
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015072LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076/* Override any GCC internal prototype to avoid an error.
15077 Use char because int might match the return type of a GCC
15078 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015079#ifdef __cplusplus
15080extern "C"
15081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015082char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015083int
15084main ()
15085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 ;
15088 return 0;
15089}
15090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015091if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015093else
Matthias Kloseb9621712010-04-24 17:59:49 +000015094 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015096rm -f core conftest.err conftest.$ac_objext \
15097 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015098LIBS=$ac_check_lib_save_LIBS
15099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15101$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015102if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015103
Matthias Kloseb9621712010-04-24 17:59:49 +000015104$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015105
Martin v. Löwis0daad592001-09-30 21:09:59 +000015106fi
15107
Michael W. Hudson54241132001-12-07 15:38:26 +000015108
Thomas Wouters89d996e2007-09-08 17:39:28 +000015109# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15111$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015112if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015114else
15115 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015116LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015118/* end confdefs.h. */
15119
15120/* Override any GCC internal prototype to avoid an error.
15121 Use char because int might match the return type of a GCC
15122 builtin and then its argument prototype would still apply. */
15123#ifdef __cplusplus
15124extern "C"
15125#endif
15126char rl_completion_display_matches_hook ();
15127int
15128main ()
15129{
15130return rl_completion_display_matches_hook ();
15131 ;
15132 return 0;
15133}
15134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015135if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015136 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15137else
Matthias Kloseb9621712010-04-24 17:59:49 +000015138 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015140rm -f core conftest.err conftest.$ac_objext \
15141 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015142LIBS=$ac_check_lib_save_LIBS
15143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15145$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015146if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015147
Matthias Kloseb9621712010-04-24 17:59:49 +000015148$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015149
15150fi
15151
15152
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015153# also in 4.0, but not in editline
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15155$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15156if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15157 $as_echo_n "(cached) " >&6
15158else
15159 ac_check_lib_save_LIBS=$LIBS
15160LIBS="-lreadline $READLINE_LIBS $LIBS"
15161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15162/* end confdefs.h. */
15163
15164/* Override any GCC internal prototype to avoid an error.
15165 Use char because int might match the return type of a GCC
15166 builtin and then its argument prototype would still apply. */
15167#ifdef __cplusplus
15168extern "C"
15169#endif
15170char rl_resize_terminal ();
15171int
15172main ()
15173{
15174return rl_resize_terminal ();
15175 ;
15176 return 0;
15177}
15178_ACEOF
15179if ac_fn_c_try_link "$LINENO"; then :
15180 ac_cv_lib_readline_rl_resize_terminal=yes
15181else
15182 ac_cv_lib_readline_rl_resize_terminal=no
15183fi
15184rm -f core conftest.err conftest.$ac_objext \
15185 conftest$ac_exeext conftest.$ac_ext
15186LIBS=$ac_check_lib_save_LIBS
15187fi
15188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15189$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15190if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15191
15192$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15193
15194fi
15195
15196
Martin v. Löwis0daad592001-09-30 21:09:59 +000015197# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15199$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015200if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015202else
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015204LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208/* Override any GCC internal prototype to avoid an error.
15209 Use char because int might match the return type of a GCC
15210 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015211#ifdef __cplusplus
15212extern "C"
15213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015214char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015215int
15216main ()
15217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 ;
15220 return 0;
15221}
15222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015223if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015225else
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015228rm -f core conftest.err conftest.$ac_objext \
15229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015230LIBS=$ac_check_lib_save_LIBS
15231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15233$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015234if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015235
Matthias Kloseb9621712010-04-24 17:59:49 +000015236$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015237
Guido van Rossum353ae582001-07-10 16:45:32 +000015238fi
15239
Jack Jansendd19cf82001-12-06 22:36:17 +000015240
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015241# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015243/* end confdefs.h. */
15244#include <readline/readline.h>
15245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015246if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015247 have_readline=yes
15248else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015249 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015250
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015251fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015252rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015253if test $have_readline = yes
15254then
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015256/* end confdefs.h. */
15257#include <readline/readline.h>
15258
15259_ACEOF
15260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015264
15265fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015266rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015267
15268fi
15269
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15271$as_echo_n "checking for append_history in -lreadline... " >&6; }
15272if ${ac_cv_lib_readline_append_history+:} false; then :
15273 $as_echo_n "(cached) " >&6
15274else
15275 ac_check_lib_save_LIBS=$LIBS
15276LIBS="-lreadline $READLINE_LIBS $LIBS"
15277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15278/* end confdefs.h. */
15279
15280/* Override any GCC internal prototype to avoid an error.
15281 Use char because int might match the return type of a GCC
15282 builtin and then its argument prototype would still apply. */
15283#ifdef __cplusplus
15284extern "C"
15285#endif
15286char append_history ();
15287int
15288main ()
15289{
15290return append_history ();
15291 ;
15292 return 0;
15293}
15294_ACEOF
15295if ac_fn_c_try_link "$LINENO"; then :
15296 ac_cv_lib_readline_append_history=yes
15297else
15298 ac_cv_lib_readline_append_history=no
15299fi
15300rm -f core conftest.err conftest.$ac_objext \
15301 conftest$ac_exeext conftest.$ac_ext
15302LIBS=$ac_check_lib_save_LIBS
15303fi
15304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15305$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15306if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15307
15308$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15309
15310fi
15311
15312
Martin v. Löwis82bca632006-02-10 20:49:30 +000015313# End of readline checks: restore LIBS
15314LIBS=$LIBS_no_readline
15315
Matthias Kloseb9621712010-04-24 17:59:49 +000015316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15317$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015318if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015320else
Martin v. Löwis11437992002-04-12 09:54:03 +000015321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015323 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015324else
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015326/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015327
15328int main()
15329{
15330 int val1 = nice(1);
15331 if (val1 != -1 && val1 == nice(2))
15332 exit(0);
15333 exit(1);
15334}
15335
Martin v. Löwis11437992002-04-12 09:54:03 +000015336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015337if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015338 ac_cv_broken_nice=yes
15339else
Matthias Kloseb9621712010-04-24 17:59:49 +000015340 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15343 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015344fi
15345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346fi
15347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15349$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015350if test "$ac_cv_broken_nice" = yes
15351then
Martin v. Löwis11437992002-04-12 09:54:03 +000015352
Matthias Kloseb9621712010-04-24 17:59:49 +000015353$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015354
15355fi
15356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15358$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015359if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015361else
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015363 ac_cv_broken_poll=no
15364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015366/* end confdefs.h. */
15367
15368#include <poll.h>
15369
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015370int main()
15371{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015372 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015373 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015374
15375 close (42);
15376
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015377 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015378 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015379 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015380 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015381 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015382 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015383 return 1;
15384}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015385
15386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015387if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015388 ac_cv_broken_poll=yes
15389else
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015396fi
15397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15399$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015400if test "$ac_cv_broken_poll" = yes
15401then
15402
Matthias Kloseb9621712010-04-24 17:59:49 +000015403$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015404
15405fi
15406
Brett Cannon43802422005-02-10 20:48:03 +000015407# 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 +000015408# (which is not required by ISO C or UNIX spec) and/or if we support
15409# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015410ac_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 +000015411#include <$ac_cv_struct_tm>
15412
Matthias Kloseb9621712010-04-24 17:59:49 +000015413"
Victor Stinnere0be4232011-10-25 13:06:09 +020015414if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015415
15416cat >>confdefs.h <<_ACEOF
15417#define HAVE_STRUCT_TM_TM_ZONE 1
15418_ACEOF
15419
15420
15421fi
15422
15423if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15424
Matthias Kloseb9621712010-04-24 17:59:49 +000015425$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015426
15427else
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15429"
Victor Stinnere0be4232011-10-25 13:06:09 +020015430if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015431 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015432else
Matthias Kloseb9621712010-04-24 17:59:49 +000015433 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015434fi
15435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015437#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015438_ACEOF
15439
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15441$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015442if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444else
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015446/* end confdefs.h. */
15447#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015448#if !HAVE_DECL_TZNAME
15449extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015450#endif
15451
15452int
15453main ()
15454{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015456 ;
15457 return 0;
15458}
15459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015460if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015461 ac_cv_var_tzname=yes
15462else
Matthias Kloseb9621712010-04-24 17:59:49 +000015463 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015465rm -f core conftest.err conftest.$ac_objext \
15466 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15469$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015470 if test $ac_cv_var_tzname = yes; then
15471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015473
15474 fi
15475fi
15476
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015477
Martin v. Löwis1d459062005-03-14 21:23:33 +000015478# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15480$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015481if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015483else
15484
Matthias Kloseb9621712010-04-24 17:59:49 +000015485if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015486 ac_cv_working_tzset=no
15487else
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015489/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015490
15491#include <stdlib.h>
15492#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015493#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015494
15495#if HAVE_TZNAME
15496extern char *tzname[];
15497#endif
15498
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015499int main()
15500{
Brett Cannon18367812003-09-19 00:59:16 +000015501 /* Note that we need to ensure that not only does tzset(3)
15502 do 'something' with localtime, but it works as documented
15503 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015504 This includes making sure that tzname is set properly if
15505 tm->tm_zone does not exist since it is the alternative way
15506 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015507
15508 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015509 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015510 */
15511
Martin v. Löwis1d459062005-03-14 21:23:33 +000015512 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015513 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15514
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015515 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015516 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015517 if (localtime(&groundhogday)->tm_hour != 0)
15518 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015519#if HAVE_TZNAME
15520 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15521 if (strcmp(tzname[0], "UTC") ||
15522 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15523 exit(1);
15524#endif
Brett Cannon18367812003-09-19 00:59:16 +000015525
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015526 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015527 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015528 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015529 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015530#if HAVE_TZNAME
15531 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15532 exit(1);
15533#endif
Brett Cannon18367812003-09-19 00:59:16 +000015534
15535 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15536 tzset();
15537 if (localtime(&groundhogday)->tm_hour != 11)
15538 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015539#if HAVE_TZNAME
15540 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15541 exit(1);
15542#endif
15543
15544#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015545 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15546 exit(1);
15547 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15548 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015549#endif
Brett Cannon18367812003-09-19 00:59:16 +000015550
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015551 exit(0);
15552}
15553
15554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015555if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015556 ac_cv_working_tzset=yes
15557else
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015562fi
15563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015564fi
15565
Matthias Kloseb9621712010-04-24 17:59:49 +000015566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15567$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015568if test "$ac_cv_working_tzset" = yes
15569then
15570
Matthias Kloseb9621712010-04-24 17:59:49 +000015571$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015572
15573fi
15574
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015575# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15577$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015578if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015580else
Matthias Kloseb9621712010-04-24 17:59:49 +000015581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015582/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015583#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015584int
15585main ()
15586{
15587
15588struct stat st;
15589st.st_mtim.tv_nsec = 1;
15590
15591 ;
15592 return 0;
15593}
15594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015596 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015597else
Matthias Kloseb9621712010-04-24 17:59:49 +000015598 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15601fi
15602
Matthias Kloseb9621712010-04-24 17:59:49 +000015603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15604$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015605if test "$ac_cv_stat_tv_nsec" = yes
15606then
15607
Matthias Kloseb9621712010-04-24 17:59:49 +000015608$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015609
15610fi
15611
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015612# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15614$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015615if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015617else
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015619/* end confdefs.h. */
15620#include <sys/stat.h>
15621int
15622main ()
15623{
15624
15625struct stat st;
15626st.st_mtimespec.tv_nsec = 1;
15627
15628 ;
15629 return 0;
15630}
15631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015632if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015633 ac_cv_stat_tv_nsec2=yes
15634else
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15638fi
15639
Matthias Kloseb9621712010-04-24 17:59:49 +000015640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15641$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015642if test "$ac_cv_stat_tv_nsec2" = yes
15643then
15644
Matthias Kloseb9621712010-04-24 17:59:49 +000015645$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015646
15647fi
15648
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015649# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015650ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015651if test "$cross_compiling" = no; then
15652 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15653fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015654
15655for ac_header in curses.h ncurses.h
15656do :
15657 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15658ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15659if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15660 cat >>confdefs.h <<_ACEOF
15661#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15662_ACEOF
15663
15664fi
15665
15666done
15667
15668
15669# On Solaris, term.h requires curses.h
15670for ac_header in term.h
15671do :
15672 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15673#ifdef HAVE_CURSES_H
15674#include <curses.h>
15675#endif
15676
15677"
15678if test "x$ac_cv_header_term_h" = xyes; then :
15679 cat >>confdefs.h <<_ACEOF
15680#define HAVE_TERM_H 1
15681_ACEOF
15682
15683fi
15684
15685done
15686
15687
Jack Jansen666b1e72001-10-31 12:11:48 +000015688# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15690$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015691if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015693else
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015695/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015696#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015697int
15698main ()
15699{
Jack Jansen666b1e72001-10-31 12:11:48 +000015700
15701 int rtn;
15702 rtn = mvwdelch(0,0,0);
15703
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 ;
15705 return 0;
15706}
15707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015708if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015709 ac_cv_mvwdelch_is_expression=yes
15710else
Matthias Kloseb9621712010-04-24 17:59:49 +000015711 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15714fi
15715
Matthias Kloseb9621712010-04-24 17:59:49 +000015716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15717$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015718
15719if test "$ac_cv_mvwdelch_is_expression" = yes
15720then
Martin v. Löwis11437992002-04-12 09:54:03 +000015721
Matthias Kloseb9621712010-04-24 17:59:49 +000015722$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015723
15724fi
15725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15727$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015728if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015729 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015730else
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015732/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015733#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015734int
15735main ()
15736{
Jack Jansen666b1e72001-10-31 12:11:48 +000015737
15738 WINDOW *w;
15739 w->_flags = 0;
15740
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 ;
15742 return 0;
15743}
15744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015745if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015746 ac_cv_window_has_flags=yes
15747else
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15751fi
15752
Matthias Kloseb9621712010-04-24 17:59:49 +000015753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15754$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015755
Jack Jansen666b1e72001-10-31 12:11:48 +000015756
15757if test "$ac_cv_window_has_flags" = yes
15758then
Martin v. Löwis11437992002-04-12 09:54:03 +000015759
Matthias Kloseb9621712010-04-24 17:59:49 +000015760$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015761
15762fi
15763
Matthias Kloseb9621712010-04-24 17:59:49 +000015764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15765$as_echo_n "checking for is_term_resized... " >&6; }
15766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015767/* end confdefs.h. */
15768#include <curses.h>
15769int
15770main ()
15771{
15772void *x=is_term_resized
15773 ;
15774 return 0;
15775}
15776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015778
Matthias Kloseb9621712010-04-24 17:59:49 +000015779$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015780
Matthias Kloseb159a552010-04-25 21:00:44 +000015781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015782$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015783else
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15785$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015786
15787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15789
Matthias Kloseb9621712010-04-24 17:59:49 +000015790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15791$as_echo_n "checking for resize_term... " >&6; }
15792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015793/* end confdefs.h. */
15794#include <curses.h>
15795int
15796main ()
15797{
15798void *x=resize_term
15799 ;
15800 return 0;
15801}
15802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015803if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015804
Matthias Kloseb9621712010-04-24 17:59:49 +000015805$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015806
Matthias Kloseb159a552010-04-25 21:00:44 +000015807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015808$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015809else
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15811$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015812
15813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15815
Matthias Kloseb9621712010-04-24 17:59:49 +000015816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15817$as_echo_n "checking for resizeterm... " >&6; }
15818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015819/* end confdefs.h. */
15820#include <curses.h>
15821int
15822main ()
15823{
15824void *x=resizeterm
15825 ;
15826 return 0;
15827}
15828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015829if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015832
Matthias Kloseb159a552010-04-25 21:00:44 +000015833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015834$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015835else
Matthias Kloseb9621712010-04-24 17:59:49 +000015836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15837$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015838
15839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015841# last curses configure check
15842CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015843
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15845$as_echo "$as_me: checking for device files" >&6;}
15846
15847if test "x$cross_compiling" = xyes; then
15848 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15850$as_echo_n "checking for /dev/ptmx... " >&6; }
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15852$as_echo "not set" >&6; }
15853 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15854 fi
15855 if test "${ac_cv_file__dev_ptc+set}" != set; then
15856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15857$as_echo_n "checking for /dev/ptc... " >&6; }
15858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15859$as_echo "not set" >&6; }
15860 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15861 fi
15862fi
15863
Matthias Kloseb9621712010-04-24 17:59:49 +000015864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15865$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015866if ${ac_cv_file__dev_ptmx+:} false; then :
15867 $as_echo_n "(cached) " >&6
15868else
15869 test "$cross_compiling" = yes &&
15870 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15871if test -r "/dev/ptmx"; then
15872 ac_cv_file__dev_ptmx=yes
15873else
15874 ac_cv_file__dev_ptmx=no
15875fi
15876fi
15877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15878$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15879if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015880
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015881fi
15882
15883if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015886
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15889$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015890if ${ac_cv_file__dev_ptc+:} false; then :
15891 $as_echo_n "(cached) " >&6
15892else
15893 test "$cross_compiling" = yes &&
15894 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15895if test -r "/dev/ptc"; then
15896 ac_cv_file__dev_ptc=yes
15897else
15898 ac_cv_file__dev_ptc=no
15899fi
15900fi
15901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15902$as_echo "$ac_cv_file__dev_ptc" >&6; }
15903if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015904
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015905fi
15906
15907if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015908
Matthias Kloseb9621712010-04-24 17:59:49 +000015909$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015910
Neal Norwitz865400f2003-03-21 01:42:58 +000015911fi
15912
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015913if test $ac_sys_system = Darwin
15914then
15915 LIBS="$LIBS -framework CoreFoundation"
15916fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015917
Matthias Kloseb9621712010-04-24 17:59:49 +000015918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15919$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015920if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015921 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015922else
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015924 ac_cv_have_size_t_format="cross -- assuming yes"
15925
Thomas Wouters477c8d52006-05-27 19:21:47 +000015926else
Matthias Kloseb9621712010-04-24 17:59:49 +000015927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015928/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015929
Thomas Wouters477c8d52006-05-27 19:21:47 +000015930#include <stdio.h>
15931#include <stddef.h>
15932#include <string.h>
15933
Christian Heimes2c181612007-12-17 20:04:13 +000015934#ifdef HAVE_SYS_TYPES_H
15935#include <sys/types.h>
15936#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015937
15938#ifdef HAVE_SSIZE_T
15939typedef ssize_t Py_ssize_t;
15940#elif SIZEOF_VOID_P == SIZEOF_LONG
15941typedef long Py_ssize_t;
15942#else
15943typedef int Py_ssize_t;
15944#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015945
Christian Heimes2c181612007-12-17 20:04:13 +000015946int main()
15947{
15948 char buffer[256];
15949
Thomas Wouters477c8d52006-05-27 19:21:47 +000015950 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15951 return 1;
15952
Thomas Wouters89f507f2006-12-13 04:49:30 +000015953 if (strcmp(buffer, "123"))
15954 return 1;
15955
15956 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15957 return 1;
15958
15959 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015960 return 1;
15961
15962 return 0;
15963}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015964
Thomas Wouters477c8d52006-05-27 19:21:47 +000015965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015966if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015967 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015968else
Matthias Kloseb9621712010-04-24 17:59:49 +000015969 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015973fi
15974
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15977$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015978if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015979
Matthias Kloseb9621712010-04-24 17:59:49 +000015980$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015981
15982fi
15983
Matthias Kloseb9621712010-04-24 17:59:49 +000015984ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015985#ifdef HAVE_SYS_TYPES_H
15986#include <sys/types.h>
15987#endif
15988#ifdef HAVE_SYS_SOCKET_H
15989#include <sys/socket.h>
15990#endif
15991
Matthias Kloseb9621712010-04-24 17:59:49 +000015992"
Victor Stinnere0be4232011-10-25 13:06:09 +020015993if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015994
Martin v. Löwis11437992002-04-12 09:54:03 +000015995else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015996
Matthias Kloseb9621712010-04-24 17:59:49 +000015997$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015998
15999fi
16000
Michael W. Hudson54241132001-12-07 15:38:26 +000016001
Matthias Kloseb9621712010-04-24 17:59:49 +000016002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16003$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016004if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016005 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016006else
Matthias Kloseb9621712010-04-24 17:59:49 +000016007 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016008 ac_cv_broken_mbstowcs=no
16009else
Matthias Kloseb9621712010-04-24 17:59:49 +000016010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016011/* end confdefs.h. */
16012
Stefan Krah19c21392012-11-22 23:47:32 +010016013#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016014#include<stdlib.h>
16015int main() {
16016 size_t len = -1;
16017 const char *str = "text";
16018 len = mbstowcs(NULL, str, 0);
16019 return (len != 4);
16020}
16021
16022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016023if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016024 ac_cv_broken_mbstowcs=no
16025else
Matthias Kloseb9621712010-04-24 17:59:49 +000016026 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16029 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016030fi
16031
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016032fi
16033
Matthias Kloseb9621712010-04-24 17:59:49 +000016034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16035$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016036if test "$ac_cv_broken_mbstowcs" = yes
16037then
16038
Matthias Kloseb9621712010-04-24 17:59:49 +000016039$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016040
16041fi
16042
Antoine Pitroub52ec782009-01-25 16:34:23 +000016043# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16045$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016046
16047# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016048if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016049 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016050if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016051then
16052
Matthias Kloseb9621712010-04-24 17:59:49 +000016053$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16056$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016057fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016058if test "$withval" = no
16059then
16060
16061$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16062
Matthias Kloseb9621712010-04-24 17:59:49 +000016063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16064$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016065fi
16066
Antoine Pitrou042b1282010-08-13 21:15:58 +000016067else
16068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16069$as_echo "no value specified" >&6; }
16070fi
16071
Antoine Pitroub52ec782009-01-25 16:34:23 +000016072
Matthias Kloseb17289e2012-03-15 19:51:34 +010016073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16074$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16075if ${ac_cv_computed_gotos+:} false; then :
16076 $as_echo_n "(cached) " >&6
16077else
16078 if test "$cross_compiling" = yes; then :
16079 if test "${with_computed_gotos+set}" = set; then
16080 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16081 else
16082 ac_cv_computed_gotos=no
16083 fi
16084else
16085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16086/* end confdefs.h. */
16087
16088int main(int argc, char **argv)
16089{
16090 static void *targets[1] = { &&LABEL1 };
16091 goto LABEL2;
16092LABEL1:
16093 return 0;
16094LABEL2:
16095 goto *targets[0];
16096 return 1;
16097}
16098
16099_ACEOF
16100if ac_fn_c_try_run "$LINENO"; then :
16101 ac_cv_computed_gotos=yes
16102else
16103 ac_cv_computed_gotos=no
16104fi
16105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16106 conftest.$ac_objext conftest.beam conftest.$ac_ext
16107fi
16108
16109fi
16110
16111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16112$as_echo "$ac_cv_computed_gotos" >&6; }
16113case "$ac_cv_computed_gotos" in yes*)
16114
16115$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16116
16117esac
16118
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016119case $ac_sys_system in
16120AIX*)
16121
16122$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16123 ;;
16124esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016125
Michael W. Hudson54241132001-12-07 15:38:26 +000016126
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016127
16128
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016129for h in `(cd $srcdir;echo Python/thread_*.h)`
16130do
16131 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16132done
16133
Michael W. Hudson54241132001-12-07 15:38:26 +000016134
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016135SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16137$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016138for dir in $SRCDIRS; do
16139 if test ! -d $dir; then
16140 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016141 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016142done
Matthias Kloseb9621712010-04-24 17:59:49 +000016143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16144$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016145
Stefan Krah1919b7e2012-03-21 18:25:23 +010016146# Availability of -O2:
16147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16148$as_echo_n "checking for -O2... " >&6; }
16149saved_cflags="$CFLAGS"
16150CFLAGS="-O2"
16151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16152/* end confdefs.h. */
16153
16154int
16155main ()
16156{
16157
16158
16159 ;
16160 return 0;
16161}
16162_ACEOF
16163if ac_fn_c_try_compile "$LINENO"; then :
16164 have_O2=yes
16165else
16166 have_O2=no
16167fi
16168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16170$as_echo "$have_O2" >&6; }
16171CFLAGS="$saved_cflags"
16172
16173# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16174# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16176$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16177saved_cflags="$CFLAGS"
16178CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16179if test "$have_O2" = no; then
16180 CFLAGS=""
16181fi
16182if test "$cross_compiling" = yes; then :
16183 have_glibc_memmove_bug=undefined
16184else
16185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16186/* end confdefs.h. */
16187
16188#include <stdio.h>
16189#include <stdlib.h>
16190#include <string.h>
16191void foo(void *p, void *q) { memmove(p, q, 19); }
16192int main() {
16193 char a[32] = "123456789000000000";
16194 foo(&a[9], a);
16195 if (strcmp(a, "123456789123456789000000000") != 0)
16196 return 1;
16197 foo(a, &a[9]);
16198 if (strcmp(a, "123456789000000000") != 0)
16199 return 1;
16200 return 0;
16201}
16202
16203_ACEOF
16204if ac_fn_c_try_run "$LINENO"; then :
16205 have_glibc_memmove_bug=no
16206else
16207 have_glibc_memmove_bug=yes
16208fi
16209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16210 conftest.$ac_objext conftest.beam conftest.$ac_ext
16211fi
16212
16213CFLAGS="$saved_cflags"
16214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16215$as_echo "$have_glibc_memmove_bug" >&6; }
16216if test "$have_glibc_memmove_bug" = yes; then
16217
16218$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16219
16220fi
16221
16222if test "$have_gcc_asm_for_x87" = yes; then
16223 # Some versions of gcc miscompile inline asm:
16224 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16225 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16226 case $CC in
16227 *gcc*)
16228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16229$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16230 saved_cflags="$CFLAGS"
16231 CFLAGS="-O2"
16232 if test "$cross_compiling" = yes; then :
16233 have_ipa_pure_const_bug=undefined
16234else
16235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16236/* end confdefs.h. */
16237
16238 __attribute__((noinline)) int
16239 foo(int *p) {
16240 int r;
16241 asm ( "movl \$6, (%1)\n\t"
16242 "xorl %0, %0\n\t"
16243 : "=r" (r) : "r" (p) : "memory"
16244 );
16245 return r;
16246 }
16247 int main() {
16248 int p = 8;
16249 if ((foo(&p) ? : p) != 6)
16250 return 1;
16251 return 0;
16252 }
16253
16254_ACEOF
16255if ac_fn_c_try_run "$LINENO"; then :
16256 have_ipa_pure_const_bug=no
16257else
16258 have_ipa_pure_const_bug=yes
16259fi
16260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16261 conftest.$ac_objext conftest.beam conftest.$ac_ext
16262fi
16263
16264 CFLAGS="$saved_cflags"
16265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16266$as_echo "$have_ipa_pure_const_bug" >&6; }
16267 if test "$have_ipa_pure_const_bug" = yes; then
16268
16269$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16270
16271 fi
16272 ;;
16273 esac
16274fi
16275
Victor Stinner4f5366e2015-01-09 02:13:19 +010016276# Check for stdatomic.h
16277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16278$as_echo_n "checking for stdatomic.h... " >&6; }
16279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16280/* end confdefs.h. */
16281
16282
16283 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016284 atomic_int value = ATOMIC_VAR_INIT(1);
16285 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016286 int main() {
16287 int loaded_value = atomic_load(&value);
16288 return 0;
16289 }
16290
16291
16292_ACEOF
16293if ac_fn_c_try_link "$LINENO"; then :
16294 have_stdatomic_h=yes
16295else
16296 have_stdatomic_h=no
16297fi
16298rm -f core conftest.err conftest.$ac_objext \
16299 conftest$ac_exeext conftest.$ac_ext
16300
16301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16302$as_echo "$have_stdatomic_h" >&6; }
16303
16304if test "$have_stdatomic_h" = yes; then
16305
16306$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16307
16308fi
16309
16310# Check for GCC >= 4.7 __atomic builtins
16311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16312$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16314/* end confdefs.h. */
16315
16316
16317 volatile int val = 1;
16318 int main() {
16319 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16320 return 0;
16321 }
16322
16323
16324_ACEOF
16325if ac_fn_c_try_link "$LINENO"; then :
16326 have_builtin_atomic=yes
16327else
16328 have_builtin_atomic=no
16329fi
16330rm -f core conftest.err conftest.$ac_objext \
16331 conftest$ac_exeext conftest.$ac_ext
16332
16333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16334$as_echo "$have_builtin_atomic" >&6; }
16335
16336if test "$have_builtin_atomic" = yes; then
16337
16338$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16339
16340fi
16341
Ned Deily322f5ba2013-11-21 23:01:59 -080016342# ensurepip option
16343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16344$as_echo_n "checking for ensurepip... " >&6; }
16345
16346# Check whether --with-ensurepip was given.
16347if test "${with_ensurepip+set}" = set; then :
16348 withval=$with_ensurepip;
16349else
16350 with_ensurepip=upgrade
16351fi
16352
16353case $with_ensurepip in #(
16354 yes|upgrade) :
16355 ENSUREPIP=upgrade ;; #(
16356 install) :
16357 ENSUREPIP=install ;; #(
16358 no) :
16359 ENSUREPIP=no ;; #(
16360 *) :
16361 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16362esac
16363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16364$as_echo "$ENSUREPIP" >&6; }
16365
16366
Victor Stinner35a97c02015-03-08 02:59:09 +010016367# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16369$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16371/* end confdefs.h. */
16372
16373
16374 #include <dirent.h>
16375
16376 int main() {
16377 struct dirent entry;
16378 return entry.d_type == DT_UNKNOWN;
16379 }
16380
16381
16382_ACEOF
16383if ac_fn_c_try_link "$LINENO"; then :
16384 have_dirent_d_type=yes
16385else
16386 have_dirent_d_type=no
16387fi
16388rm -f core conftest.err conftest.$ac_objext \
16389 conftest$ac_exeext conftest.$ac_ext
16390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16391$as_echo "$have_dirent_d_type" >&6; }
16392
16393if test "$have_dirent_d_type" = yes; then
16394
16395$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16396
16397fi
16398
Victor Stinner9eb57c52015-03-19 22:21:49 +010016399# check if the Linux getrandom() syscall is available
16400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16401$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16403/* end confdefs.h. */
16404
16405
Victor Stinner1b80b242016-04-12 22:34:58 +020016406 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016407 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016408 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016409
16410 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016411 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016412 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016413 const int flags = GRND_NONBLOCK;
16414 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016415 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016416 return 0;
16417 }
16418
16419
16420_ACEOF
16421if ac_fn_c_try_link "$LINENO"; then :
16422 have_getrandom_syscall=yes
16423else
16424 have_getrandom_syscall=no
16425fi
16426rm -f core conftest.err conftest.$ac_objext \
16427 conftest$ac_exeext conftest.$ac_ext
16428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16429$as_echo "$have_getrandom_syscall" >&6; }
16430
16431if test "$have_getrandom_syscall" = yes; then
16432
16433$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16434
16435fi
16436
Victor Stinner3abf44e2015-09-18 15:38:37 +020016437# check if the getrandom() function is available
16438# the test was written for the Solaris function of <sys/random.h>
16439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16440$as_echo_n "checking for the getrandom() function... " >&6; }
16441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16442/* end confdefs.h. */
16443
16444
16445 #include <sys/random.h>
16446
16447 int main() {
16448 char buffer[1];
16449 const size_t buflen = sizeof(buffer);
16450 const int flags = 0;
16451 /* ignore the result, Python checks for ENOSYS at runtime */
16452 (void)getrandom(buffer, buflen, flags);
16453 return 0;
16454 }
16455
16456
16457_ACEOF
16458if ac_fn_c_try_link "$LINENO"; then :
16459 have_getrandom=yes
16460else
16461 have_getrandom=no
16462fi
16463rm -f core conftest.err conftest.$ac_objext \
16464 conftest$ac_exeext conftest.$ac_ext
16465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16466$as_echo "$have_getrandom" >&6; }
16467
16468if test "$have_getrandom" = yes; then
16469
16470$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16471
16472fi
16473
Guido van Rossum627b2d71993-12-24 10:39:16 +000016474# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016475ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016476
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016477ac_config_files="$ac_config_files Modules/ld_so_aix"
16478
Martin v. Löwis11437992002-04-12 09:54:03 +000016479cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016480# This file is a shell script that caches the results of configure
16481# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016482# scripts and configure runs, see configure's option --config-cache.
16483# It is not useful on other systems. If it contains results you don't
16484# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016485#
Martin v. Löwis11437992002-04-12 09:54:03 +000016486# config.status only pays attention to the cache file if you give it
16487# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016488#
Skip Montanaro6dead952003-09-25 14:50:04 +000016489# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016490# loading this file, other *unset* `ac_cv_foo' will be assigned the
16491# following values.
16492
16493_ACEOF
16494
Guido van Rossumf78abae1997-01-21 22:02:36 +000016495# The following way of writing the cache mishandles newlines in values,
16496# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016497# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016498# Ultrix sh set writes to stderr and can't be redirected directly,
16499# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016500(
16501 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16502 eval ac_val=\$$ac_var
16503 case $ac_val in #(
16504 *${as_nl}*)
16505 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016506 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16507$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508 esac
16509 case $ac_var in #(
16510 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016511 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16512 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 esac ;;
16514 esac
16515 done
16516
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16519 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016520 # `set' does not quote correctly, so add quotes: double-quote
16521 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016522 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016523 "s/'/'\\\\''/g;
16524 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016526 *)
16527 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016530 esac |
16531 sort
16532) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016533 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016535 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016536 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016537 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16538 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016539 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16540 :end' >>confcache
16541if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16542 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016543 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016544 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16545$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016546 if test ! -f "$cache_file" || test -h "$cache_file"; then
16547 cat confcache >"$cache_file"
16548 else
16549 case $cache_file in #(
16550 */* | ?:*)
16551 mv -f confcache "$cache_file"$$ &&
16552 mv -f "$cache_file"$$ "$cache_file" ;; #(
16553 *)
16554 mv -f confcache "$cache_file" ;;
16555 esac
16556 fi
16557 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016558 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016559 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16560$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016561 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016562fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016563rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016564
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016565test "x$prefix" = xNONE && prefix=$ac_default_prefix
16566# Let make expand exec_prefix.
16567test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016568
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016569DEFS=-DHAVE_CONFIG_H
16570
Skip Montanaro6dead952003-09-25 14:50:04 +000016571ac_libobjs=
16572ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016573U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016574for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16575 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016577 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16579 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016580 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16581 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016582done
16583LIBOBJS=$ac_libobjs
16584
16585LTLIBOBJS=$ac_ltlibobjs
16586
16587
Martin v. Löwis11437992002-04-12 09:54:03 +000016588
Matthias Kloseb9621712010-04-24 17:59:49 +000016589
Victor Stinnere0be4232011-10-25 13:06:09 +020016590: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016591ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016592ac_clean_files_save=$ac_clean_files
16593ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016594{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16595$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16596as_write_fail=0
16597cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016598#! $SHELL
16599# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016600# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016601# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016602# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016603
Martin v. Löwis11437992002-04-12 09:54:03 +000016604debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016605ac_cs_recheck=false
16606ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016607
Matthias Kloseb9621712010-04-24 17:59:49 +000016608SHELL=\${CONFIG_SHELL-$SHELL}
16609export SHELL
16610_ASEOF
16611cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16612## -------------------- ##
16613## M4sh Initialization. ##
16614## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616# Be more Bourne compatible
16617DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016618if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016619 emulate sh
16620 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016621 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016622 # is contrary to our usage. Disable this feature.
16623 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016624 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016625else
Matthias Kloseb9621712010-04-24 17:59:49 +000016626 case `(set -o) 2>/dev/null` in #(
16627 *posix*) :
16628 set -o posix ;; #(
16629 *) :
16630 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016632fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016633
16634
Matthias Kloseb9621712010-04-24 17:59:49 +000016635as_nl='
16636'
16637export as_nl
16638# Printing a long string crashes Solaris 7 /usr/bin/printf.
16639as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16640as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16641as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16642# Prefer a ksh shell builtin over an external printf program on Solaris,
16643# but without wasting forks for bash or zsh.
16644if test -z "$BASH_VERSION$ZSH_VERSION" \
16645 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16646 as_echo='print -r --'
16647 as_echo_n='print -rn --'
16648elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16649 as_echo='printf %s\n'
16650 as_echo_n='printf %s'
16651else
16652 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16653 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16654 as_echo_n='/usr/ucb/echo -n'
16655 else
16656 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16657 as_echo_n_body='eval
16658 arg=$1;
16659 case $arg in #(
16660 *"$as_nl"*)
16661 expr "X$arg" : "X\\(.*\\)$as_nl";
16662 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16663 esac;
16664 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16665 '
16666 export as_echo_n_body
16667 as_echo_n='sh -c $as_echo_n_body as_echo'
16668 fi
16669 export as_echo_body
16670 as_echo='sh -c $as_echo_body as_echo'
16671fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016672
16673# The user is always right.
16674if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 PATH_SEPARATOR=:
16676 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16677 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16678 PATH_SEPARATOR=';'
16679 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016682
16683# IFS
16684# We need space, tab and new line, in precisely that order. Quoting is
16685# there to prevent editors from complaining about space-tab.
16686# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16687# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688IFS=" "" $as_nl"
16689
16690# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016691as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016692case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 *[\\/]* ) as_myself=$0 ;;
16694 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016695for as_dir in $PATH
16696do
16697 IFS=$as_save_IFS
16698 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016699 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16700 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703 ;;
16704esac
16705# We did not find ourselves, most probably we were run as `sh COMMAND'
16706# in which case we are not to be found in the path.
16707if test "x$as_myself" = x; then
16708 as_myself=$0
16709fi
16710if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016711 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16712 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713fi
16714
Matthias Kloseb9621712010-04-24 17:59:49 +000016715# Unset variables that we do not need and which cause bugs (e.g. in
16716# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16717# suppresses any "Segmentation fault" message there. '((' could
16718# trigger a bug in pdksh 5.2.14.
16719for as_var in BASH_ENV ENV MAIL MAILPATH
16720do eval test x\${$as_var+set} = xset \
16721 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722done
16723PS1='$ '
16724PS2='> '
16725PS4='+ '
16726
16727# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016728LC_ALL=C
16729export LC_ALL
16730LANGUAGE=C
16731export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732
Matthias Kloseb9621712010-04-24 17:59:49 +000016733# CDPATH.
16734(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16735
16736
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016737# as_fn_error STATUS ERROR [LINENO LOG_FD]
16738# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016739# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16740# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016741# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016742as_fn_error ()
16743{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016744 as_status=$1; test $as_status -eq 0 && as_status=1
16745 if test "$4"; then
16746 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16747 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016748 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016749 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016750 as_fn_exit $as_status
16751} # as_fn_error
16752
16753
16754# as_fn_set_status STATUS
16755# -----------------------
16756# Set $? to STATUS, without forking.
16757as_fn_set_status ()
16758{
16759 return $1
16760} # as_fn_set_status
16761
16762# as_fn_exit STATUS
16763# -----------------
16764# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16765as_fn_exit ()
16766{
16767 set +e
16768 as_fn_set_status $1
16769 exit $1
16770} # as_fn_exit
16771
16772# as_fn_unset VAR
16773# ---------------
16774# Portably unset VAR.
16775as_fn_unset ()
16776{
16777 { eval $1=; unset $1;}
16778}
16779as_unset=as_fn_unset
16780# as_fn_append VAR VALUE
16781# ----------------------
16782# Append the text in VALUE to the end of the definition contained in VAR. Take
16783# advantage of any shell optimizations that allow amortized linear growth over
16784# repeated appends, instead of the typical quadratic growth present in naive
16785# implementations.
16786if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16787 eval 'as_fn_append ()
16788 {
16789 eval $1+=\$2
16790 }'
16791else
16792 as_fn_append ()
16793 {
16794 eval $1=\$$1\$2
16795 }
16796fi # as_fn_append
16797
16798# as_fn_arith ARG...
16799# ------------------
16800# Perform arithmetic evaluation on the ARGs, and store the result in the
16801# global $as_val. Take advantage of shells that can avoid forks. The arguments
16802# must be portable across $(()) and expr.
16803if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16804 eval 'as_fn_arith ()
16805 {
16806 as_val=$(( $* ))
16807 }'
16808else
16809 as_fn_arith ()
16810 {
16811 as_val=`expr "$@" || test $? -eq 1`
16812 }
16813fi # as_fn_arith
16814
16815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816if expr a : '\(a\)' >/dev/null 2>&1 &&
16817 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16818 as_expr=expr
16819else
16820 as_expr=false
16821fi
16822
16823if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16824 as_basename=basename
16825else
16826 as_basename=false
16827fi
16828
Matthias Kloseb9621712010-04-24 17:59:49 +000016829if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16830 as_dirname=dirname
16831else
16832 as_dirname=false
16833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016835as_me=`$as_basename -- "$0" ||
16836$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16837 X"$0" : 'X\(//\)$' \| \
16838 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016839$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840 sed '/^.*\/\([^/][^/]*\)\/*$/{
16841 s//\1/
16842 q
16843 }
16844 /^X\/\(\/\/\)$/{
16845 s//\1/
16846 q
16847 }
16848 /^X\/\(\/\).*/{
16849 s//\1/
16850 q
16851 }
16852 s/.*/./; q'`
16853
Matthias Kloseb9621712010-04-24 17:59:49 +000016854# Avoid depending upon Character Ranges.
16855as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16856as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16857as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16858as_cr_digits='0123456789'
16859as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860
16861ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016862case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016864 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016866 xy) ECHO_C='\c';;
16867 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16868 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869 esac;;
16870*)
16871 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016873
Martin v. Löwis11437992002-04-12 09:54:03 +000016874rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875if test -d conf$$.dir; then
16876 rm -f conf$$.dir/conf$$.file
16877else
16878 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016879 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016881if (echo >conf$$.file) 2>/dev/null; then
16882 if ln -s conf$$.file conf$$ 2>/dev/null; then
16883 as_ln_s='ln -s'
16884 # ... but there are two gotchas:
16885 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16886 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016887 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016888 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016889 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016890 elif ln conf$$.file conf$$ 2>/dev/null; then
16891 as_ln_s=ln
16892 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016893 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016894 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016895else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016896 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016898rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16899rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016900
Matthias Kloseb9621712010-04-24 17:59:49 +000016901
16902# as_fn_mkdir_p
16903# -------------
16904# Create "$as_dir" as a directory, including parents if necessary.
16905as_fn_mkdir_p ()
16906{
16907
16908 case $as_dir in #(
16909 -*) as_dir=./$as_dir;;
16910 esac
16911 test -d "$as_dir" || eval $as_mkdir_p || {
16912 as_dirs=
16913 while :; do
16914 case $as_dir in #(
16915 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16916 *) as_qdir=$as_dir;;
16917 esac
16918 as_dirs="'$as_qdir' $as_dirs"
16919 as_dir=`$as_dirname -- "$as_dir" ||
16920$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16921 X"$as_dir" : 'X\(//\)[^/]' \| \
16922 X"$as_dir" : 'X\(//\)$' \| \
16923 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16924$as_echo X"$as_dir" |
16925 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16926 s//\1/
16927 q
16928 }
16929 /^X\(\/\/\)[^/].*/{
16930 s//\1/
16931 q
16932 }
16933 /^X\(\/\/\)$/{
16934 s//\1/
16935 q
16936 }
16937 /^X\(\/\).*/{
16938 s//\1/
16939 q
16940 }
16941 s/.*/./; q'`
16942 test -d "$as_dir" && break
16943 done
16944 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016945 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016946
16947
16948} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016949if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016950 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016951else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016952 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016953 as_mkdir_p=false
16954fi
16955
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016956
16957# as_fn_executable_p FILE
16958# -----------------------
16959# Test if FILE is an executable regular file.
16960as_fn_executable_p ()
16961{
16962 test -f "$1" && test -x "$1"
16963} # as_fn_executable_p
16964as_test_x='test -x'
16965as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016966
16967# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016968as_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 +000016969
16970# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016971as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016972
16973
Martin v. Löwis11437992002-04-12 09:54:03 +000016974exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016975## ----------------------------------- ##
16976## Main body of $CONFIG_STATUS script. ##
16977## ----------------------------------- ##
16978_ASEOF
16979test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016980
Matthias Kloseb9621712010-04-24 17:59:49 +000016981cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16982# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016983# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984# values after options handling.
16985ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040016986This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016987generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016988
16989 CONFIG_FILES = $CONFIG_FILES
16990 CONFIG_HEADERS = $CONFIG_HEADERS
16991 CONFIG_LINKS = $CONFIG_LINKS
16992 CONFIG_COMMANDS = $CONFIG_COMMANDS
16993 $ $0 $@
16994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016995on `(hostname || uname -n) 2>/dev/null | sed 1q`
16996"
16997
Martin v. Löwis11437992002-04-12 09:54:03 +000016998_ACEOF
16999
Matthias Kloseb9621712010-04-24 17:59:49 +000017000case $ac_config_files in *"
17001"*) set x $ac_config_files; shift; ac_config_files=$*;;
17002esac
17003
17004case $ac_config_headers in *"
17005"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17006esac
17007
17008
17009cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017010# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017011config_files="$ac_config_files"
17012config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017015
Matthias Kloseb9621712010-04-24 17:59:49 +000017016cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017017ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017018\`$as_me' instantiates files and other configuration actions
17019from templates according to the current configuration. Unless the files
17020and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017021
Matthias Kloseb9621712010-04-24 17:59:49 +000017022Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017023
17024 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017025 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017026 --config print configuration, then exit
17027 -q, --quiet, --silent
17028 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 -d, --debug don't remove temporary files
17030 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017031 --file=FILE[:TEMPLATE]
17032 instantiate the configuration file FILE
17033 --header=FILE[:TEMPLATE]
17034 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017035
17036Configuration files:
17037$config_files
17038
17039Configuration headers:
17040$config_headers
17041
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017042Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017045cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17046ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017047ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017048python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017049configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017050 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017051
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017052Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017053This config.status script is free software; the Free Software Foundation
17054gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055
17056ac_pwd='$ac_pwd'
17057srcdir='$srcdir'
17058INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017059MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017060test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017061_ACEOF
17062
Matthias Kloseb9621712010-04-24 17:59:49 +000017063cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17064# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017065ac_need_defaults=:
17066while test $# != 0
17067do
17068 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017069 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017070 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17071 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017072 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017073 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017074 --*=)
17075 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17076 ac_optarg=
17077 ac_shift=:
17078 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017080 ac_option=$1
17081 ac_optarg=$2
17082 ac_shift=shift
17083 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017084 esac
17085
Skip Montanaro6dead952003-09-25 14:50:04 +000017086 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017088 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17089 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017091 $as_echo "$ac_cs_version"; exit ;;
17092 --config | --confi | --conf | --con | --co | --c )
17093 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 debug=: ;;
17096 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017097 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017098 case $ac_optarg in
17099 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017100 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017101 esac
17102 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 ac_need_defaults=false;;
17104 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017105 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017106 case $ac_optarg in
17107 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17108 esac
17109 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017110 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017111 --he | --h)
17112 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017113 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017114Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017116 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017117 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17118 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17119 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017120
17121 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017122 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017123Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017124
Matthias Kloseb9621712010-04-24 17:59:49 +000017125 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017127
17128 esac
17129 shift
17130done
17131
Skip Montanaro6dead952003-09-25 14:50:04 +000017132ac_configure_extra_args=
17133
17134if $ac_cs_silent; then
17135 exec 6>/dev/null
17136 ac_configure_extra_args="$ac_configure_extra_args --silent"
17137fi
17138
17139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017140cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017141if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017142 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017143 shift
17144 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17145 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017146 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017147 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017148fi
17149
Martin v. Löwis11437992002-04-12 09:54:03 +000017150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017152exec 5>>config.log
17153{
17154 echo
17155 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17156## Running $as_me. ##
17157_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017158 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017159} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017162cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017164
Matthias Kloseb9621712010-04-24 17:59:49 +000017165cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166
17167# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017168for ac_config_target in $ac_config_targets
17169do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170 case $ac_config_target in
17171 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17172 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17173 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017174 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17175 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017177 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017178 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017179 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180
Victor Stinnere0be4232011-10-25 13:06:09 +020017181 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017182 esac
17183done
17184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185
Martin v. Löwis11437992002-04-12 09:54:03 +000017186# If the user did not use the arguments to specify the items to instantiate,
17187# then the envvar interface is used. Set only those that are not.
17188# We use the long form for the default assignment because of an extremely
17189# bizarre bug on SunOS 4.1.3.
17190if $ac_need_defaults; then
17191 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17192 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17193fi
17194
Skip Montanaro6dead952003-09-25 14:50:04 +000017195# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017197# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198# Hook for its removal unless debugging.
17199# Note that there is a small window in which the directory will not be cleaned:
17200# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017201$debug ||
17202{
Victor Stinnere0be4232011-10-25 13:06:09 +020017203 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017205 : "${ac_tmp:=$tmp}"
17206 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017208 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017209}
Martin v. Löwis11437992002-04-12 09:54:03 +000017210# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017211
Martin v. Löwis11437992002-04-12 09:54:03 +000017212{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017213 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017214 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017215} ||
17216{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217 tmp=./conf$$-$RANDOM
17218 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017219} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017220ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017221
Matthias Kloseb9621712010-04-24 17:59:49 +000017222# Set up the scripts for CONFIG_FILES section.
17223# No need to generate them if there are no CONFIG_FILES.
17224# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017225if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017226
Matthias Kloseb9621712010-04-24 17:59:49 +000017227
17228ac_cr=`echo X | tr X '\015'`
17229# On cygwin, bash can eat \r inside `` if the user requested igncr.
17230# But we know of no other shell where ac_cr would be empty at this
17231# point, so we can use a bashism as a fallback.
17232if test "x$ac_cr" = x; then
17233 eval ac_cr=\$\'\\r\'
17234fi
17235ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17236if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017237 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017238else
17239 ac_cs_awk_cr=$ac_cr
17240fi
17241
Victor Stinnere0be4232011-10-25 13:06:09 +020017242echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017243_ACEOF
17244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017245
Matthias Kloseb9621712010-04-24 17:59:49 +000017246{
17247 echo "cat >conf$$subs.awk <<_ACEOF" &&
17248 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17249 echo "_ACEOF"
17250} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017251 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17252ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253ac_delim='%!_!# '
17254for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017255 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017256 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257
Matthias Kloseb9621712010-04-24 17:59:49 +000017258 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17259 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260 break
17261 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017262 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017263 else
17264 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017266done
Matthias Kloseb9621712010-04-24 17:59:49 +000017267rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268
Matthias Kloseb9621712010-04-24 17:59:49 +000017269cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017270cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017272sed -n '
17273h
17274s/^/S["/; s/!.*/"]=/
17275p
17276g
17277s/^[^!]*!//
17278:repl
17279t repl
17280s/'"$ac_delim"'$//
17281t delim
17282:nl
17283h
17284s/\(.\{148\}\)..*/\1/
17285t more1
17286s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17287p
17288n
17289b repl
17290:more1
17291s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17292p
17293g
17294s/.\{148\}//
17295t nl
17296:delim
17297h
17298s/\(.\{148\}\)..*/\1/
17299t more2
17300s/["\\]/\\&/g; s/^/"/; s/$/"/
17301p
17302b
17303:more2
17304s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17305p
17306g
17307s/.\{148\}//
17308t delim
17309' <conf$$subs.awk | sed '
17310/^[^""]/{
17311 N
17312 s/\n//
17313}
17314' >>$CONFIG_STATUS || ac_write_fail=1
17315rm -f conf$$subs.awk
17316cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17317_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017318cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017319 for (key in S) S_is_set[key] = 1
17320 FS = ""
17321
17322}
17323{
17324 line = $ 0
17325 nfields = split(line, field, "@")
17326 substed = 0
17327 len = length(field[1])
17328 for (i = 2; i < nfields; i++) {
17329 key = field[i]
17330 keylen = length(key)
17331 if (S_is_set[key]) {
17332 value = S[key]
17333 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17334 len += length(value) + length(field[++i])
17335 substed = 1
17336 } else
17337 len += 1 + keylen
17338 }
17339
17340 print line
17341}
17342
17343_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017345cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17346if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17347 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17348else
17349 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017350fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017351 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017352_ACEOF
17353
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017354# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17355# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356# trailing colons and then remove the whole line if VPATH becomes empty
17357# (actually we leave an empty line to preserve line numbers).
17358if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017359 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17360h
17361s///
17362s/^/:/
17363s/[ ]*$/:/
17364s/:\$(srcdir):/:/g
17365s/:\${srcdir}:/:/g
17366s/:@srcdir@:/:/g
17367s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017369x
17370s/\(=[ ]*\).*/\1/
17371G
17372s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373s/^[^=]*=[ ]*$//
17374}'
17375fi
17376
Matthias Kloseb9621712010-04-24 17:59:49 +000017377cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017378fi # test -n "$CONFIG_FILES"
17379
Matthias Kloseb9621712010-04-24 17:59:49 +000017380# Set up the scripts for CONFIG_HEADERS section.
17381# No need to generate them if there are no CONFIG_HEADERS.
17382# This happens for instance with `./config.status Makefile'.
17383if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017384cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017385BEGIN {
17386_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387
Matthias Kloseb9621712010-04-24 17:59:49 +000017388# Transform confdefs.h into an awk script `defines.awk', embedded as
17389# here-document in config.status, that substitutes the proper values into
17390# config.h.in to produce config.h.
17391
17392# Create a delimiter string that does not exist in confdefs.h, to ease
17393# handling of long lines.
17394ac_delim='%!_!# '
17395for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017396 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17397 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017398 break
17399 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017400 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017401 else
17402 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17403 fi
17404done
17405
17406# For the awk script, D is an array of macro values keyed by name,
17407# likewise P contains macro parameters if any. Preserve backslash
17408# newline sequences.
17409
17410ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17411sed -n '
17412s/.\{148\}/&'"$ac_delim"'/g
17413t rset
17414:rset
17415s/^[ ]*#[ ]*define[ ][ ]*/ /
17416t def
17417d
17418:def
17419s/\\$//
17420t bsnl
17421s/["\\]/\\&/g
17422s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17423D["\1"]=" \3"/p
17424s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17425d
17426:bsnl
17427s/["\\]/\\&/g
17428s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17429D["\1"]=" \3\\\\\\n"\\/p
17430t cont
17431s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17432t cont
17433d
17434:cont
17435n
17436s/.\{148\}/&'"$ac_delim"'/g
17437t clear
17438:clear
17439s/\\$//
17440t bsnlc
17441s/["\\]/\\&/g; s/^/"/; s/$/"/p
17442d
17443:bsnlc
17444s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17445b cont
17446' <confdefs.h | sed '
17447s/'"$ac_delim"'/"\\\
17448"/g' >>$CONFIG_STATUS || ac_write_fail=1
17449
17450cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17451 for (key in D) D_is_set[key] = 1
17452 FS = ""
17453}
17454/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17455 line = \$ 0
17456 split(line, arg, " ")
17457 if (arg[1] == "#") {
17458 defundef = arg[2]
17459 mac1 = arg[3]
17460 } else {
17461 defundef = substr(arg[1], 2)
17462 mac1 = arg[2]
17463 }
17464 split(mac1, mac2, "(") #)
17465 macro = mac2[1]
17466 prefix = substr(line, 1, index(line, defundef) - 1)
17467 if (D_is_set[macro]) {
17468 # Preserve the white space surrounding the "#".
17469 print prefix "define", macro P[macro] D[macro]
17470 next
17471 } else {
17472 # Replace #undef with comments. This is necessary, for example,
17473 # in the case of _POSIX_SOURCE, which is predefined and required
17474 # on some systems where configure will not decide to define it.
17475 if (defundef == "undef") {
17476 print "/*", prefix defundef, macro, "*/"
17477 next
17478 }
17479 }
17480}
17481{ print }
17482_ACAWK
17483_ACEOF
17484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017485 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017486fi # test -n "$CONFIG_HEADERS"
17487
17488
17489eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17490shift
17491for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492do
17493 case $ac_tag in
17494 :[FHLC]) ac_mode=$ac_tag; continue;;
17495 esac
17496 case $ac_mode$ac_tag in
17497 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017498 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017499 :[FH]-) ac_tag=-:-;;
17500 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17501 esac
17502 ac_save_IFS=$IFS
17503 IFS=:
17504 set x $ac_tag
17505 IFS=$ac_save_IFS
17506 shift
17507 ac_file=$1
17508 shift
17509
17510 case $ac_mode in
17511 :L) ac_source=$1;;
17512 :[FH])
17513 ac_file_inputs=
17514 for ac_f
17515 do
17516 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017517 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518 *) # Look for the file first in the build tree, then in the source tree
17519 # (if the path is not absolute). The absolute path cannot be DOS-style,
17520 # because $ac_f cannot contain `:'.
17521 test -f "$ac_f" ||
17522 case $ac_f in
17523 [\\/$]*) false;;
17524 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17525 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017526 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017528 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17529 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530 done
17531
17532 # Let's still pretend it is `configure' which instantiates (i.e., don't
17533 # use $as_me), people would be surprised to read:
17534 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017535 configure_input='Generated from '`
17536 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17537 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538 if test x"$ac_file" != x-; then
17539 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017540 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17541$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017543 # Neutralize special characters interpreted by sed in replacement strings.
17544 case $configure_input in #(
17545 *\&* | *\|* | *\\* )
17546 ac_sed_conf_input=`$as_echo "$configure_input" |
17547 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17548 *) ac_sed_conf_input=$configure_input;;
17549 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550
17551 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017552 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17553 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554 esac
17555 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 esac
17557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017559$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017560 X"$ac_file" : 'X\(//\)[^/]' \| \
17561 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017563$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17565 s//\1/
17566 q
17567 }
17568 /^X\(\/\/\)[^/].*/{
17569 s//\1/
17570 q
17571 }
17572 /^X\(\/\/\)$/{
17573 s//\1/
17574 q
17575 }
17576 /^X\(\/\).*/{
17577 s//\1/
17578 q
17579 }
17580 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017581 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017582 ac_builddir=.
17583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584case "$ac_dir" in
17585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17586*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590 case $ac_top_builddir_sub in
17591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17593 esac ;;
17594esac
17595ac_abs_top_builddir=$ac_pwd
17596ac_abs_builddir=$ac_pwd$ac_dir_suffix
17597# for backward compatibility:
17598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017599
17600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603 ac_top_srcdir=$ac_top_builddir_sub
17604 ac_abs_top_srcdir=$ac_pwd ;;
17605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607 ac_top_srcdir=$srcdir
17608 ac_abs_top_srcdir=$srcdir ;;
17609 *) # Relative name.
17610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17611 ac_top_srcdir=$ac_top_build_prefix$srcdir
17612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017615
Martin v. Löwis11437992002-04-12 09:54:03 +000017616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017617 case $ac_mode in
17618 :F)
17619 #
17620 # CONFIG_FILE
17621 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017622
17623 case $INSTALL in
17624 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017626 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017627 ac_MKDIR_P=$MKDIR_P
17628 case $MKDIR_P in
17629 [\\/$]* | ?:[\\/]* ) ;;
17630 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17631 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017632_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633
Matthias Kloseb9621712010-04-24 17:59:49 +000017634cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635# If the template does not know about datarootdir, expand it.
17636# FIXME: This hack should be removed a few years after 2.60.
17637ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017638ac_sed_dataroot='
17639/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640 p
17641 q
17642}
17643/@datadir@/p
17644/@docdir@/p
17645/@infodir@/p
17646/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017647/@mandir@/p'
17648case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649*datarootdir*) ac_datarootdir_seen=yes;;
17650*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17652$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017654cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655 ac_datarootdir_hack='
17656 s&@datadir@&$datadir&g
17657 s&@docdir@&$docdir&g
17658 s&@infodir@&$infodir&g
17659 s&@localedir@&$localedir&g
17660 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017661 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662esac
17663_ACEOF
17664
17665# Neutralize VPATH when `$srcdir' = `.'.
17666# Shell code in configure.ac might set extrasub.
17667# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017668cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17669ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017670$extrasub
17671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017672cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017673:t
17674/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017675s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017676s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017677s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678s&@srcdir@&$ac_srcdir&;t t
17679s&@abs_srcdir@&$ac_abs_srcdir&;t t
17680s&@top_srcdir@&$ac_top_srcdir&;t t
17681s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17682s&@builddir@&$ac_builddir&;t t
17683s&@abs_builddir@&$ac_abs_builddir&;t t
17684s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17685s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017686s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017688"
Victor Stinnere0be4232011-10-25 13:06:09 +020017689eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17690 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017693 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17694 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17695 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017697which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017698$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017699which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017700
Victor Stinnere0be4232011-10-25 13:06:09 +020017701 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017702 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017703 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17704 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017705 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017706 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707 ;;
17708 :H)
17709 #
17710 # CONFIG_HEADER
17711 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017713 {
17714 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017715 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17716 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017717 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017718 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017719 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17720$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017722 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017723 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017724 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017725 fi
17726 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017727 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017728 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017729 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017730 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733
17734 esac
17735
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017736
17737 case $ac_file$ac_mode in
17738 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17739
17740 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741done # for ac_tag
17742
Guido van Rossum627b2d71993-12-24 10:39:16 +000017743
Matthias Kloseb9621712010-04-24 17:59:49 +000017744as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017745_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017746ac_clean_files=$ac_clean_files_save
17747
Matthias Kloseb9621712010-04-24 17:59:49 +000017748test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017749 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017750
Martin v. Löwis11437992002-04-12 09:54:03 +000017751
17752# configure is writing to config.log, and then calls config.status.
17753# config.status does its own redirection, appending to config.log.
17754# Unfortunately, on DOS this fails, as config.log is still kept open
17755# by configure, so config.status won't be able to write to it; its
17756# output is simply discarded. So we exec the FD to /dev/null,
17757# effectively closing config.log, so it can be properly (re)opened and
17758# appended to by config.status. When coming back to configure, we
17759# need to make the FD available again.
17760if test "$no_create" != yes; then
17761 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017762 ac_config_status_args=
17763 test "$silent" = yes &&
17764 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017766 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017767 exec 5>>config.log
17768 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17769 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017770 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017771fi
17772if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17774$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017775fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017776
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017777
Christian Heimes75ed8902013-11-20 01:11:18 +010017778echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017779if test ! -f Modules/Setup
17780then
17781 cp $srcdir/Modules/Setup.dist Modules/Setup
17782fi
17783
Christian Heimes75ed8902013-11-20 01:11:18 +010017784echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017785if test ! -f Modules/Setup.local
17786then
17787 echo "# Edit this file for local setup changes" >Modules/Setup.local
17788fi
17789
Christian Heimes75ed8902013-11-20 01:11:18 +010017790echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017791$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017792 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017793 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017794mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017795
17796if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17797 echo "" >&6
17798 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017799 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 +000017800 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017801 echo "" >&6
17802 echo "" >&6
17803fi
17804