blob: 3880421dba13bc63fc9c8253263d46f0ee0eae62 [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 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674target_os
675target_vendor
676target_cpu
677target
678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700684LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
698RANLIB
699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
811with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600812with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_cxx_main
814with_suffix
815enable_shared
816enable_profiling
817with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_libs
824with_system_expat
825with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100826with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000827enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700828with_tcltk_includes
829with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_threads
832with_thread
833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
837with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_fpectl
841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100856CPP
857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001199 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ;;
1248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 export $ac_envvar ;;
1258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001264 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ;;
1266
1267 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268done
1269
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273fi
1274
Matthias Kloseb9621712010-04-24 17:59:49 +00001275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280 esac
1281fi
1282
1283# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimes75b96182017-09-05 15:53:09 +02001287 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001297 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001302done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 elif test "x$build_alias" != "x$host_alias"; then
1316 cross_compiling=yes
1317 fi
1318fi
1319
1320ac_tool_prefix=
1321test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323test "$silent" = yes && exec 6>/dev/null
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327ac_ls_di=`ls -di .` &&
1328ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334# Find the source files, if location was not specified.
1335if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 ac_confdir=`$as_dirname -- "$as_myself" ||
1339$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340 X"$as_myself" : 'X\(//\)[^/]' \| \
1341 X"$as_myself" : 'X\(//\)$' \| \
1342 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)[^/].*/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\).*/{
1357 s//\1/
1358 q
1359 }
1360 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001361 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363 srcdir=..
1364 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365else
1366 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368if test ! -r "$srcdir/$ac_unique_file"; then
1369 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001370 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 pwd)`
1376# When building in place, set srcdir=.
1377if test "$ac_abs_confdir" = "$ac_pwd"; then
1378 srcdir=.
1379fi
1380# Remove unnecessary trailing slashes from srcdir.
1381# Double slashes in file names in object file debugging info
1382# mess up M-x gdb in Emacs.
1383case $srcdir in
1384*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385esac
1386for ac_var in $ac_precious_vars; do
1387 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_env_${ac_var}_value=\$${ac_var}
1389 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393#
1394# Report the --help message.
1395#
1396if test "$ac_init_help" = "long"; then
1397 # Omit some internal or obsolete options to make the list less imposing.
1398 # This message is too long to be a string in the A/UX 3.1 sh.
1399 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001400\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405VAR=VALUE. See below for descriptions of some of the useful variables.
1406
1407Defaults for the options are specified in brackets.
1408
1409Configuration:
1410 -h, --help display this help and exit
1411 --help=short display options specific to this package
1412 --help=recursive display the short help of all the included packages
1413 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001414 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --cache-file=FILE cache test results in FILE [disabled]
1416 -C, --config-cache alias for \`--cache-file=config.cache'
1417 -n, --no-create do not create output files
1418 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1419
Martin v. Löwis11437992002-04-12 09:54:03 +00001420Installation directories:
1421 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426By default, \`make install' will install all the files in
1427\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1428an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429for instance \`--prefix=\$HOME'.
1430
1431For better control, use the options below.
1432
1433Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 --bindir=DIR user executables [EPREFIX/bin]
1435 --sbindir=DIR system admin executables [EPREFIX/sbin]
1436 --libexecdir=DIR program executables [EPREFIX/libexec]
1437 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1438 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1439 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1440 --libdir=DIR object code libraries [EPREFIX/lib]
1441 --includedir=DIR C header files [PREFIX/include]
1442 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1443 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1444 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1445 --infodir=DIR info documentation [DATAROOTDIR/info]
1446 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1447 --mandir=DIR man documentation [DATAROOTDIR/man]
1448 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1449 --htmldir=DIR html documentation [DOCDIR]
1450 --dvidir=DIR dvi documentation [DOCDIR]
1451 --pdfdir=DIR pdf documentation [DOCDIR]
1452 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001453_ACEOF
1454
1455 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001456
1457System types:
1458 --build=BUILD configure for building on BUILD [guessed]
1459 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001460 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
1462fi
1463
1464if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001465 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001466 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 cat <<\_ACEOF
1469
1470Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001471 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1473 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001474 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001475 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --enable-framework[=INSTALLDIR]
1477 Build (MacOSX|Darwin) framework
1478 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001479 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001480 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1481 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001482 --enable-loadable-sqlite-extensions
1483 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --enable-ipv6 Enable ipv6 (with ipv4) support
1485 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001486 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001487 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001488
1489Optional Packages:
1490 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1491 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001492 --with-universal-archs=ARCH
1493 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001494 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001495 --with-framework-name=FRAMEWORK
1496 specify an alternate name of the framework built
1497 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001499 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001500 --with-cxx-main=<compiler>
1501 compile main() and link python executable with C++
1502 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-suffix=.exe set executable suffix
1504 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001505 --with-assertions build with C assertions enabled
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001506 --with-lto Enable Link Time Optimization in PGO builds.
1507 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001508 --with-hash-algorithm=[fnv|siphash24]
1509 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001510 --with-address-sanitizer
1511 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001513 --with-system-expat build pyexpat module using an installed expat
1514 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001515 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001516 --with-system-libmpdec build _decimal module using an installed libmpdec
1517 library
Ned Deilyd819b932013-09-06 01:07:05 -07001518 --with-tcltk-includes='-I...'
1519 override search for Tcl and Tk include files
1520 --with-tcltk-libs='-L...'
1521 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001522 --with-dbmliborder=db1:db2:...
1523 order to check db backends for dbm. Valid value is a
1524 colon separated string with the backend names
1525 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with(out)-threads[=DIRECTORY]
1527 disable/enable thread support
1528 --with(out)-thread[=DIRECTORY]
1529 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with(out)-doc-strings disable/enable documentation strings
1531 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001532 --with(out)-c-locale-coercion
1533 disable/enable C locale coercion to a UTF-8 based
1534 locale
1535 --with(out)-c-locale-warning
1536 disable/enable locale compatibility warning in the C
1537 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001538 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001539 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with-fpectl enable SIGFPE catching
1541 --with-libm=STRING math library
1542 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001543 --with(out)-computed-gotos
1544 Use computed gotos in evaluation loop (enabled by
1545 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001546 --with(out)-ensurepip=[=upgrade]
1547 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
1549Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001550 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CC C compiler command
1552 CFLAGS C compiler flags
1553 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1554 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001559 PKG_CONFIG path to pkg-config utility
1560 PKG_CONFIG_PATH
1561 directories to add to pkg-config's search path
1562 PKG_CONFIG_LIBDIR
1563 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565Use these variables to override the choices made by `configure' or to help
1566it to find libraries and programs with nonstandard names/locations.
1567
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001568Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001569_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001571fi
1572
1573if test "$ac_init_help" = "recursive"; then
1574 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 test -d "$ac_dir" ||
1577 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1578 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 ac_builddir=.
1580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581case "$ac_dir" in
1582.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 case $ac_top_builddir_sub in
1588 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1589 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1590 esac ;;
1591esac
1592ac_abs_top_builddir=$ac_pwd
1593ac_abs_builddir=$ac_pwd$ac_dir_suffix
1594# for backward compatibility:
1595ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
1597case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 ac_top_srcdir=$ac_top_builddir_sub
1601 ac_abs_top_srcdir=$ac_pwd ;;
1602 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$srcdir
1605 ac_abs_top_srcdir=$srcdir ;;
1606 *) # Relative name.
1607 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1608 ac_top_srcdir=$ac_top_build_prefix$srcdir
1609 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001610esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 cd "$ac_dir" || { ac_status=$?; continue; }
1614 # Check for guested configure.
1615 if test -f "$ac_srcdir/configure.gnu"; then
1616 echo &&
1617 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1618 elif test -f "$ac_srcdir/configure"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 fi || ac_status=$?
1624 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 done
1626fi
1627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001629if $ac_init_version; then
1630 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001631python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001633
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001635This configure script is free software; the Free Software Foundation
1636gives unlimited permission to copy, distribute and modify it.
1637_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001640
1641## ------------------------ ##
1642## Autoconf initialization. ##
1643## ------------------------ ##
1644
1645# ac_fn_c_try_compile LINENO
1646# --------------------------
1647# Try to compile conftest.$ac_ext, and return whether this succeeded.
1648ac_fn_c_try_compile ()
1649{
1650 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1651 rm -f conftest.$ac_objext
1652 if { { ac_try="$ac_compile"
1653case "(($ac_try" in
1654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1655 *) ac_try_echo=$ac_try;;
1656esac
1657eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1658$as_echo "$ac_try_echo"; } >&5
1659 (eval "$ac_compile") 2>conftest.err
1660 ac_status=$?
1661 if test -s conftest.err; then
1662 grep -v '^ *+' conftest.err >conftest.er1
1663 cat conftest.er1 >&5
1664 mv -f conftest.er1 conftest.err
1665 fi
1666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1667 test $ac_status = 0; } && {
1668 test -z "$ac_c_werror_flag" ||
1669 test ! -s conftest.err
1670 } && test -s conftest.$ac_objext; then :
1671 ac_retval=0
1672else
1673 $as_echo "$as_me: failed program was:" >&5
1674sed 's/^/| /' conftest.$ac_ext >&5
1675
1676 ac_retval=1
1677fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001678 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 as_fn_set_status $ac_retval
1680
1681} # ac_fn_c_try_compile
1682
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001683# ac_fn_c_try_cpp LINENO
1684# ----------------------
1685# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1686ac_fn_c_try_cpp ()
1687{
1688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1689 if { { ac_try="$ac_cpp conftest.$ac_ext"
1690case "(($ac_try" in
1691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1692 *) ac_try_echo=$ac_try;;
1693esac
1694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1695$as_echo "$ac_try_echo"; } >&5
1696 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1697 ac_status=$?
1698 if test -s conftest.err; then
1699 grep -v '^ *+' conftest.err >conftest.er1
1700 cat conftest.er1 >&5
1701 mv -f conftest.er1 conftest.err
1702 fi
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } > conftest.i && {
1705 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1706 test ! -s conftest.err
1707 }; then :
1708 ac_retval=0
1709else
1710 $as_echo "$as_me: failed program was:" >&5
1711sed 's/^/| /' conftest.$ac_ext >&5
1712
1713 ac_retval=1
1714fi
1715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1716 as_fn_set_status $ac_retval
1717
1718} # ac_fn_c_try_cpp
1719
Matthias Kloseb9621712010-04-24 17:59:49 +00001720# ac_fn_c_try_link LINENO
1721# -----------------------
1722# Try to link conftest.$ac_ext, and return whether this succeeded.
1723ac_fn_c_try_link ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 rm -f conftest.$ac_objext conftest$ac_exeext
1727 if { { ac_try="$ac_link"
1728case "(($ac_try" in
1729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1730 *) ac_try_echo=$ac_try;;
1731esac
1732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1733$as_echo "$ac_try_echo"; } >&5
1734 (eval "$ac_link") 2>conftest.err
1735 ac_status=$?
1736 if test -s conftest.err; then
1737 grep -v '^ *+' conftest.err >conftest.er1
1738 cat conftest.er1 >&5
1739 mv -f conftest.er1 conftest.err
1740 fi
1741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1742 test $ac_status = 0; } && {
1743 test -z "$ac_c_werror_flag" ||
1744 test ! -s conftest.err
1745 } && test -s conftest$ac_exeext && {
1746 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001747 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001748 }; then :
1749 ac_retval=0
1750else
1751 $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=1
1755fi
1756 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1757 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1758 # interfere with the next link command; also delete a directory that is
1759 # left behind by Apple's compiler. We do this before executing the actions.
1760 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 as_fn_set_status $ac_retval
1763
1764} # ac_fn_c_try_link
1765
Matthias Kloseb9621712010-04-24 17:59:49 +00001766# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1767# -------------------------------------------------------
1768# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1769# the include files in INCLUDES and setting the cache variable VAR
1770# accordingly.
1771ac_fn_c_check_header_mongrel ()
1772{
1773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001774 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1776$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001777if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 $as_echo_n "(cached) " >&6
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783else
1784 # Is the header compilable?
1785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1786$as_echo_n "checking $2 usability... " >&6; }
1787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1788/* end confdefs.h. */
1789$4
1790#include <$2>
1791_ACEOF
1792if ac_fn_c_try_compile "$LINENO"; then :
1793 ac_header_compiler=yes
1794else
1795 ac_header_compiler=no
1796fi
1797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1799$as_echo "$ac_header_compiler" >&6; }
1800
1801# Is the header present?
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1803$as_echo_n "checking $2 presence... " >&6; }
1804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1805/* end confdefs.h. */
1806#include <$2>
1807_ACEOF
1808if ac_fn_c_try_cpp "$LINENO"; then :
1809 ac_header_preproc=yes
1810else
1811 ac_header_preproc=no
1812fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001813rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1815$as_echo "$ac_header_preproc" >&6; }
1816
1817# So? What about this header?
1818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1819 yes:no: )
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1821$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1823$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1824 ;;
1825 no:yes:* )
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1827$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1829$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1831$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1833$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1835$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001836( $as_echo "## --------------------------------------- ##
1837## Report this to https://bugs.python.org/ ##
1838## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 ) | sed "s/^/$as_me: WARNING: /" >&2
1840 ;;
1841esac
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1843$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001844if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001845 $as_echo_n "(cached) " >&6
1846else
1847 eval "$3=\$ac_header_compiler"
1848fi
1849eval ac_res=\$$3
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1851$as_echo "$ac_res" >&6; }
1852fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001853 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001854
1855} # ac_fn_c_check_header_mongrel
1856
1857# ac_fn_c_try_run LINENO
1858# ----------------------
1859# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1860# that executables *can* be run.
1861ac_fn_c_try_run ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 if { { ac_try="$ac_link"
1865case "(($ac_try" in
1866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1867 *) ac_try_echo=$ac_try;;
1868esac
1869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1870$as_echo "$ac_try_echo"; } >&5
1871 (eval "$ac_link") 2>&5
1872 ac_status=$?
1873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1874 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1875 { { case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878esac
1879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880$as_echo "$ac_try_echo"; } >&5
1881 (eval "$ac_try") 2>&5
1882 ac_status=$?
1883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1884 test $ac_status = 0; }; }; then :
1885 ac_retval=0
1886else
1887 $as_echo "$as_me: program exited with status $ac_status" >&5
1888 $as_echo "$as_me: failed program was:" >&5
1889sed 's/^/| /' conftest.$ac_ext >&5
1890
1891 ac_retval=$ac_status
1892fi
1893 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001894 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001895 as_fn_set_status $ac_retval
1896
1897} # ac_fn_c_try_run
1898
1899# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1900# -------------------------------------------------------
1901# Tests whether HEADER exists and can be compiled using the include files in
1902# INCLUDES, setting the cache variable VAR accordingly.
1903ac_fn_c_check_header_compile ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1907$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914#include <$2>
1915_ACEOF
1916if ac_fn_c_try_compile "$LINENO"; then :
1917 eval "$3=yes"
1918else
1919 eval "$3=no"
1920fi
1921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001926 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001927
1928} # ac_fn_c_check_header_compile
1929
Matthias Kloseb9621712010-04-24 17:59:49 +00001930# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1931# -------------------------------------------
1932# Tests whether TYPE exists after having included INCLUDES, setting cache
1933# variable VAR accordingly.
1934ac_fn_c_check_type ()
1935{
1936 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001939if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=no"
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$4
1946int
1947main ()
1948{
1949if (sizeof ($2))
1950 return 0;
1951 ;
1952 return 0;
1953}
1954_ACEOF
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$4
1959int
1960main ()
1961{
1962if (sizeof (($2)))
1963 return 0;
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969
1970else
1971 eval "$3=yes"
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977eval ac_res=\$$3
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1979$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001980 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982} # ac_fn_c_check_type
1983
Matthias Kloseb9621712010-04-24 17:59:49 +00001984# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1985# --------------------------------------------
1986# Tries to find the compile-time value of EXPR in a program that includes
1987# INCLUDES, setting VAR accordingly. Returns whether the value could be
1988# computed
1989ac_fn_c_compute_int ()
1990{
1991 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992 if test "$cross_compiling" = yes; then
1993 # Depending upon the size, compute the lo and hi bounds.
1994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002001test_array [0] = 0;
2002return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 ac_lo=0 ac_mid=0
2010 while :; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002018test_array [0] = 0;
2019return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_hi=$ac_mid; break
2027else
2028 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2029 if test $ac_lo -le $ac_mid; then
2030 ac_lo= ac_hi=
2031 break
2032 fi
2033 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 done
2037else
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=$ac_mid; break
2071else
2072 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2073 if test $ac_mid -le $ac_hi; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 ac_lo= ac_hi=
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087# Binary search between lo and hi bounds.
2088while test "x$ac_lo" != "x$ac_hi"; do
2089 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002097test_array [0] = 0;
2098return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002099
2100 ;
2101 return 0;
2102}
2103_ACEOF
2104if ac_fn_c_try_compile "$LINENO"; then :
2105 ac_hi=$ac_mid
2106else
2107 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110done
2111case $ac_lo in #((
2112?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2113'') ac_retval=1 ;;
2114esac
2115 else
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119static long int longval () { return $2; }
2120static unsigned long int ulongval () { return $2; }
2121#include <stdio.h>
2122#include <stdlib.h>
2123int
2124main ()
2125{
2126
2127 FILE *f = fopen ("conftest.val", "w");
2128 if (! f)
2129 return 1;
2130 if (($2) < 0)
2131 {
2132 long int i = longval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%ld", i);
2136 }
2137 else
2138 {
2139 unsigned long int i = ulongval ();
2140 if (i != ($2))
2141 return 1;
2142 fprintf (f, "%lu", i);
2143 }
2144 /* Do not output a trailing newline, as this causes \r\n confusion
2145 on some platforms. */
2146 return ferror (f) || fclose (f) != 0;
2147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_run "$LINENO"; then :
2153 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2154else
2155 ac_retval=1
2156fi
2157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2158 conftest.$ac_objext conftest.beam conftest.$ac_ext
2159rm -f conftest.val
2160
2161 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002162 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002163 as_fn_set_status $ac_retval
2164
2165} # ac_fn_c_compute_int
2166
2167# ac_fn_c_check_func LINENO FUNC VAR
2168# ----------------------------------
2169# Tests whether FUNC exists, setting the cache variable VAR accordingly
2170ac_fn_c_check_func ()
2171{
2172 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2174$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002175if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 $as_echo_n "(cached) " >&6
2177else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2181 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2182#define $2 innocuous_$2
2183
2184/* System header to define __stub macros and hopefully few prototypes,
2185 which can conflict with char $2 (); below.
2186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2187 <limits.h> exists even on freestanding compilers. */
2188
2189#ifdef __STDC__
2190# include <limits.h>
2191#else
2192# include <assert.h>
2193#endif
2194
2195#undef $2
2196
2197/* Override any GCC internal prototype to avoid an error.
2198 Use char because int might match the return type of a GCC
2199 builtin and then its argument prototype would still apply. */
2200#ifdef __cplusplus
2201extern "C"
2202#endif
2203char $2 ();
2204/* The GNU C library defines this for functions which it implements
2205 to always fail with ENOSYS. Some functions are actually named
2206 something starting with __ and the normal name is an alias. */
2207#if defined __stub_$2 || defined __stub___$2
2208choke me
2209#endif
2210
2211int
2212main ()
2213{
2214return $2 ();
2215 ;
2216 return 0;
2217}
2218_ACEOF
2219if ac_fn_c_try_link "$LINENO"; then :
2220 eval "$3=yes"
2221else
2222 eval "$3=no"
2223fi
2224rm -f core conftest.err conftest.$ac_objext \
2225 conftest$ac_exeext conftest.$ac_ext
2226fi
2227eval ac_res=\$$3
2228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2229$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002230 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002231
2232} # ac_fn_c_check_func
2233
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002234# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2235# ---------------------------------------------
2236# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2237# accordingly.
2238ac_fn_c_check_decl ()
2239{
2240 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241 as_decl_name=`echo $2|sed 's/ *(.*//'`
2242 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2244$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2245if eval \${$3+:} false; then :
2246 $as_echo_n "(cached) " >&6
2247else
2248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h. */
2250$4
2251int
2252main ()
2253{
2254#ifndef $as_decl_name
2255#ifdef __cplusplus
2256 (void) $as_decl_use;
2257#else
2258 (void) $as_decl_name;
2259#endif
2260#endif
2261
2262 ;
2263 return 0;
2264}
2265_ACEOF
2266if ac_fn_c_try_compile "$LINENO"; then :
2267 eval "$3=yes"
2268else
2269 eval "$3=no"
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272fi
2273eval ac_res=\$$3
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2275$as_echo "$ac_res" >&6; }
2276 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2277
2278} # ac_fn_c_check_decl
2279
Matthias Kloseb9621712010-04-24 17:59:49 +00002280# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2281# ----------------------------------------------------
2282# Tries to find if the field MEMBER exists in type AGGR, after including
2283# INCLUDES, setting cache variable VAR accordingly.
2284ac_fn_c_check_member ()
2285{
2286 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2288$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002289if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002290 $as_echo_n "(cached) " >&6
2291else
2292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h. */
2294$5
2295int
2296main ()
2297{
2298static $2 ac_aggr;
2299if (ac_aggr.$3)
2300return 0;
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305if ac_fn_c_try_compile "$LINENO"; then :
2306 eval "$4=yes"
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$5
2311int
2312main ()
2313{
2314static $2 ac_aggr;
2315if (sizeof ac_aggr.$3)
2316return 0;
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$4=yes"
2323else
2324 eval "$4=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330eval ac_res=\$$4
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2332$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002333 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002334
2335} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002337This file contains any messages produced by compilers while
2338running configure, to aid debugging if configure makes a mistake.
2339
Ned Deily4829bc62016-09-12 17:29:04 -04002340It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002341generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002342
2343 $ $0 $@
2344
2345_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002347{
2348cat <<_ASUNAME
2349## --------- ##
2350## Platform. ##
2351## --------- ##
2352
2353hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2354uname -m = `(uname -m) 2>/dev/null || echo unknown`
2355uname -r = `(uname -r) 2>/dev/null || echo unknown`
2356uname -s = `(uname -s) 2>/dev/null || echo unknown`
2357uname -v = `(uname -v) 2>/dev/null || echo unknown`
2358
2359/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2360/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2361
2362/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2363/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2364/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002366/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2367/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2368/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2369
2370_ASUNAME
2371
2372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002377 $as_echo "PATH: $as_dir"
2378 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381} >&5
2382
2383cat >&5 <<_ACEOF
2384
2385
2386## ----------- ##
2387## Core tests. ##
2388## ----------- ##
2389
2390_ACEOF
2391
2392
2393# Keep a trace of the command line.
2394# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_configure_args0=
2400ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_must_keep_next=false
2402for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002403do
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 for ac_arg
2405 do
2406 case $ac_arg in
2407 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2408 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2409 | -silent | --silent | --silen | --sile | --sil)
2410 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 esac
2414 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 case $ac_arg in
2422 *=* | --config-cache | -C | -disable-* | --disable-* \
2423 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2424 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2425 | -with-* | --with-* | -without-* | --without-* | --x)
2426 case "$ac_configure_args0 " in
2427 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2428 esac
2429 ;;
2430 -* ) ac_must_keep_next=true ;;
2431 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 ;;
2435 esac
2436 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002437done
Matthias Kloseb9621712010-04-24 17:59:49 +00002438{ ac_configure_args0=; unset ac_configure_args0;}
2439{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441# When interrupted or exit'd, cleanup temporary files, and complete
2442# config.log. We remove comments because anyway the quotes in there
2443# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444# WARNING: Use '\'' to represent an apostrophe within the trap.
2445# 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 +00002446trap 'exit_status=$?
2447 # Save into config.log some information that might help in debugging.
2448 {
2449 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002450
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002452## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 echo
2455 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456(
2457 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2458 eval ac_val=\$$ac_var
2459 case $ac_val in #(
2460 *${as_nl}*)
2461 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2463$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 esac
2465 case $ac_var in #(
2466 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2468 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac ;;
2470 esac
2471 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2474 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 "s/'\''/'\''\\\\'\'''\''/g;
2477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2478 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac |
2483 sort
2484)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002488## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 echo
2491 for ac_var in $ac_subst_vars
2492 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 eval ac_val=\$$ac_var
2494 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 done | sort
2499 echo
2500
2501 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_files
2507 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515 fi
2516
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002519## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
2524 fi
2525 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$as_me: caught signal $ac_signal"
2527 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 rm -f core *.core core.conftest.* &&
2530 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002533for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
2536ac_signal=0
2537
2538# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Matthias Kloseb9621712010-04-24 17:59:49 +00002541$as_echo "/* confdefs.h */" > confdefs.h
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543# Predefined preprocessor variables.
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_NAME "$PACKAGE_NAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_VERSION "$PACKAGE_VERSION"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_STRING "$PACKAGE_STRING"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2563_ACEOF
2564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_URL "$PACKAGE_URL"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
2570# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002571# Prefer an explicitly selected file to automatically selected ones.
2572ac_site_file1=NONE
2573ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575 # We do not want a PATH search for config.site.
2576 case $CONFIG_SITE in #((
2577 -*) ac_site_file1=./$CONFIG_SITE;;
2578 */*) ac_site_file1=$CONFIG_SITE;;
2579 *) ac_site_file1=./$CONFIG_SITE;;
2580 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 ac_site_file1=$prefix/share/config.site
2583 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584else
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$ac_default_prefix/share/config.site
2586 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002588for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589do
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 test "x$ac_site_file" = xNONE && continue
2591 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2593$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002595 . "$ac_site_file" \
2596 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2598as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002599See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600 fi
2601done
2602
2603if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 # Some versions of bash will fail to source /dev/null (special files
2605 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2606 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2608$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2611 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 esac
2613 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614else
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2616$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 >$cache_file
2618fi
2619
2620# Check that the precious variables saved in the cache have kept the same
2621# value.
2622ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2625 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2627 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 case $ac_old_set,$ac_new_set in
2629 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2631$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 +00002632 ac_cache_corrupted=: ;;
2633 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2635$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 ac_cache_corrupted=: ;;
2637 ,);;
2638 *)
2639 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 # differences in whitespace do not lead to failure.
2641 ac_old_val_w=`echo x $ac_old_val`
2642 ac_new_val_w=`echo x $ac_new_val`
2643 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2645$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2646 ac_cache_corrupted=:
2647 else
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2649$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2650 eval $ac_var=\$ac_old_val
2651 fi
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2653$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2655$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 fi;;
2657 esac
2658 # Pass precious variables to config.status.
2659 if test "$ac_new_set" = set; then
2660 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 *) ac_arg=$ac_var=$ac_new_val ;;
2663 esac
2664 case " $ac_configure_args " in
2665 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 esac
2668 fi
2669done
2670if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2674$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002675 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002677## -------------------- ##
2678## Main body of script. ##
2679## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680
Guido van Rossum7f43da71994-08-01 12:15:30 +00002681ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2685ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686
Guido van Rossum627b2d71993-12-24 10:39:16 +00002687
Michael W. Hudson54241132001-12-07 15:38:26 +00002688
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002690if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691 # If we're building out-of-tree, we need to make sure the following
2692 # resources get picked up before their $srcdir counterparts.
2693 # Objects/ -> typeslots.inc
2694 # Include/ -> Python-ast.h, graminit.h
2695 # Python/ -> importlib.h
2696 # (A side effect of this is that these resources will automatically be
2697 # regenerated when building out-of-tree, regardless of whether or not
2698 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2699 # off.)
2700 BASECPPFLAGS="-IObjects -IInclude -IPython"
2701else
2702 BASECPPFLAGS=""
2703fi
2704
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705
2706
2707
2708
Victor Stinner9ed34a82017-05-02 22:35:58 +02002709if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002711# Extract the first word of "git", so it can be a program name with args.
2712set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2714$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716 $as_echo_n "(cached) " >&6
2717else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718 if test -n "$HAS_GIT"; then
2719 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720else
2721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2722for as_dir in $PATH
2723do
2724 IFS=$as_save_IFS
2725 test -z "$as_dir" && as_dir=.
2726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2730 break 2
2731 fi
2732done
2733 done
2734IFS=$as_save_IFS
2735
Ned Deily5c4b0d02017-03-04 00:19:55 -05002736 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002737fi
2738fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739HAS_GIT=$ac_cv_prog_HAS_GIT
2740if test -n "$HAS_GIT"; then
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2742$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743else
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2745$as_echo "no" >&6; }
2746fi
2747
2748
2749else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002750HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753then
Ned Deily554626a2017-03-20 23:41:52 -04002754 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2755 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758 GITVERSION=""
2759 GITTAG=""
2760 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761fi
2762
2763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002764ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002765
2766
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002767ac_aux_dir=
2768for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2769 if test -f "$ac_dir/install-sh"; then
2770 ac_aux_dir=$ac_dir
2771 ac_install_sh="$ac_aux_dir/install-sh -c"
2772 break
2773 elif test -f "$ac_dir/install.sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install.sh -c"
2776 break
2777 elif test -f "$ac_dir/shtool"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/shtool install -c"
2780 break
2781 fi
2782done
2783if test -z "$ac_aux_dir"; then
2784 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2785fi
2786
2787# These three variables are undocumented and unsupported,
2788# and are intended to be withdrawn in a future Autoconf release.
2789# They can cause serious problems if a builder's source tree is in a directory
2790# whose full name contains unusual characters.
2791ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2792ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2793ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2794
2795
2796# Make sure we can run config.sub.
2797$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2798 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2799
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2801$as_echo_n "checking build system type... " >&6; }
2802if ${ac_cv_build+:} false; then :
2803 $as_echo_n "(cached) " >&6
2804else
2805 ac_build_alias=$build_alias
2806test "x$ac_build_alias" = x &&
2807 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2808test "x$ac_build_alias" = x &&
2809 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2810ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2811 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2812
2813fi
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2815$as_echo "$ac_cv_build" >&6; }
2816case $ac_cv_build in
2817*-*-*) ;;
2818*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2819esac
2820build=$ac_cv_build
2821ac_save_IFS=$IFS; IFS='-'
2822set x $ac_cv_build
2823shift
2824build_cpu=$1
2825build_vendor=$2
2826shift; shift
2827# Remember, the first character of IFS is used to create $*,
2828# except with old shells:
2829build_os=$*
2830IFS=$ac_save_IFS
2831case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2832
2833
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2835$as_echo_n "checking host system type... " >&6; }
2836if ${ac_cv_host+:} false; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 if test "x$host_alias" = x; then
2840 ac_cv_host=$ac_cv_build
2841else
2842 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2843 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2844fi
2845
2846fi
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2848$as_echo "$ac_cv_host" >&6; }
2849case $ac_cv_host in
2850*-*-*) ;;
2851*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2852esac
2853host=$ac_cv_host
2854ac_save_IFS=$IFS; IFS='-'
2855set x $ac_cv_host
2856shift
2857host_cpu=$1
2858host_vendor=$2
2859shift; shift
2860# Remember, the first character of IFS is used to create $*,
2861# except with old shells:
2862host_os=$*
2863IFS=$ac_save_IFS
2864case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2865
2866
2867
doko@python.orga10e4a92013-01-25 18:45:12 +01002868
2869
Ned Deilyfcbc2462014-08-22 13:32:49 -07002870# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2871rm -f pybuilddir.txt
2872
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002873for ac_prog in python$PACKAGE_VERSION python3 python
2874do
2875 # Extract the first word of "$ac_prog", so it can be a program name with args.
2876set dummy $ac_prog; ac_word=$2
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2878$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002879if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002880 $as_echo_n "(cached) " >&6
2881else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882 if test -n "$PYTHON_FOR_REGEN"; then
2883 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002884else
2885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2886for as_dir in $PATH
2887do
2888 IFS=$as_save_IFS
2889 test -z "$as_dir" && as_dir=.
2890 for ac_exec_ext in '' $ac_executable_extensions; do
2891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2894 break 2
2895 fi
2896done
2897 done
2898IFS=$as_save_IFS
2899
2900fi
2901fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002902PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2903if test -n "$PYTHON_FOR_REGEN"; then
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2905$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906else
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2908$as_echo "no" >&6; }
2909fi
2910
2911
Victor Stinnera5c62a82017-05-03 18:21:48 +02002912 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002913done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
2917
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002918if test "$cross_compiling" = yes; then
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2920$as_echo_n "checking for python interpreter for cross build... " >&6; }
2921 if test -z "$PYTHON_FOR_BUILD"; then
2922 for interp in python$PACKAGE_VERSION python3 python; do
2923 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002924 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002925 break
2926 fi
2927 interp=
2928 done
2929 if test x$interp = x; then
2930 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2931 fi
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2933$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002934 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002935 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002936elif test "$cross_compiling" = maybe; then
2937 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938else
2939 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Benjamin Petersond23f8222009-04-05 19:13:16 +00002944if test "$prefix" != "/"; then
2945 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
2950
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002951# We don't use PACKAGE_ variables, and they cause conflicts
2952# with other autoconf-based packages that include Python.h
2953grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2954rm confdefs.h
2955mv confdefs.h.new confdefs.h
2956
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002957
Ned Deily4829bc62016-09-12 17:29:04 -04002958VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002959
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002960# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002961
2962SOVERSION=1.0
2963
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002964# The later defininition of _XOPEN_SOURCE disables certain features
2965# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2966
Matthias Kloseb9621712010-04-24 17:59:49 +00002967$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968
2969
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002970# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2971# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2972# them.
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975
2976
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982
2983
Martin v. Löwisd6320502004-08-12 13:45:08 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002985# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989
2990
2991
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002992define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002993
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002994# Arguments passed to configure.
2995
2996CONFIG_ARGS="$ac_configure_args"
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2999$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003001if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003003 case $enableval in
3004 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003005 # Locate the best usable SDK, see Mac/README.txt for more
3006 # information
3007 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003008 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003009 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003010 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3011 if test ! -d "${enableval}"
3012 then
3013 enableval=/
3014 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 ;;
3017 esac
3018 case $enableval in
3019 no)
3020 UNIVERSALSDK=
3021 enable_universalsdk=
3022 ;;
3023 *)
3024 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 if test ! -d "${UNIVERSALSDK}"
3026 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003027 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003031
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033else
3034
3035 UNIVERSALSDK=
3036 enable_universalsdk=
3037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040if test -n "${UNIVERSALSDK}"
3041then
Matthias Kloseb9621712010-04-24 17:59:49 +00003042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3043$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044else
Matthias Kloseb9621712010-04-24 17:59:49 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3046$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003050
Ned Deily87adb6e2013-10-18 21:09:56 -07003051ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003052
Ned Deilycbfb9a52012-06-23 16:02:19 -07003053# For backward compatibility reasons we prefer to select '32-bit' if available,
3054# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003055UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056if test "`uname -s`" = "Darwin"
3057then
3058 if test -n "${UNIVERSALSDK}"
3059 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003060 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061 then
3062 UNIVERSAL_ARCHS="intel"
3063 fi
3064 fi
3065fi
3066
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3069$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070
3071# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003072if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 UNIVERSAL_ARCHS="$withval"
3075
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076fi
3077
Ned Deily87adb6e2013-10-18 21:09:56 -07003078if test -n "${UNIVERSALSDK}"
3079then
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3081$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3082else
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3084$as_echo "no" >&6; }
3085fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003087
3088# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003089if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003090 withval=$with_framework_name;
3091 PYTHONFRAMEWORK=${withval}
3092 PYTHONFRAMEWORKDIR=${withval}.framework
3093 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3094
3095else
3096
3097 PYTHONFRAMEWORK=Python
3098 PYTHONFRAMEWORKDIR=Python.framework
3099 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3100
3101fi
3102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003104if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003106 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003107 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003108 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003109 esac
3110 case $enableval in
3111 no)
3112 PYTHONFRAMEWORK=
3113 PYTHONFRAMEWORKDIR=no-framework
3114 PYTHONFRAMEWORKPREFIX=
3115 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116 FRAMEWORKINSTALLFIRST=
3117 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003118 FRAMEWORKALTINSTALLFIRST=
3119 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003120 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003121 if test "x${prefix}" = "xNONE"; then
3122 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3123 else
3124 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3125 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003127 ;;
3128 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003129 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003132 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003133 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3134 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003135 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003137
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003138 if test "x${prefix}" = "xNONE" ; then
3139 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144
3145 case "${enableval}" in
3146 /System*)
3147 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3148 if test "${prefix}" = "NONE" ; then
3149 # See below
3150 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3151 fi
3152 ;;
3153
3154 /Library*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 ;;
3157
3158 */Library/Frameworks)
3159 MDIR="`dirname "${enableval}"`"
3160 MDIR="`dirname "${MDIR}"`"
3161 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3162
3163 if test "${prefix}" = "NONE"; then
3164 # User hasn't specified the
3165 # --prefix option, but wants to install
3166 # the framework in a non-default location,
3167 # ensure that the compatibility links get
3168 # installed relative to that prefix as well
3169 # instead of in /usr/local.
3170 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3171 fi
3172 ;;
3173
3174 *)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177 esac
3178
Jack Jansen127e56e2001-09-11 14:41:54 +00003179 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003181 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003187 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3188
3189 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3190
Jack Jansene578a632001-08-15 01:27:14 +00003191 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003192
Guido van Rossum563e7081996-09-10 18:20:48 +00003193else
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Jack Jansene578a632001-08-15 01:27:14 +00003195 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORKPREFIX=
3198 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199 FRAMEWORKINSTALLFIRST=
3200 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003201 FRAMEWORKALTINSTALLFIRST=
3202 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003203 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 if test "x${prefix}" = "xNONE" ; then
3205 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3206 else
3207 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3208 fi
Jack Jansene578a632001-08-15 01:27:14 +00003209 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003210
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212fi
3213
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
3215
Michael W. Hudson54241132001-12-07 15:38:26 +00003216
3217
3218
3219
Jack Jansene578a632001-08-15 01:27:14 +00003220
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003221
3222
3223
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003224
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003225
Ned Deilyb8f944f2013-11-21 22:42:25 -08003226
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003227
3228cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003229#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003230_ACEOF
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003234## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003235## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003236##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003237# Set name for machine-dependent library files
3238
Matthias Kloseb9621712010-04-24 17:59:49 +00003239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3240$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241if test -z "$MACHDEP"
3242then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 # avoid using uname for cross builds
3244 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003245 # ac_sys_system and ac_sys_release are used for setting
3246 # a lot of different things including 'define_xopen_source'
3247 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003249 *-*-linux-android*)
3250 ac_sys_system=Linux-android
3251 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 *-*-linux*)
3253 ac_sys_system=Linux
3254 ;;
3255 *-*-cygwin*)
3256 ac_sys_system=Cygwin
3257 ;;
3258 *)
3259 # for now, limit cross builds to known configurations
3260 MACHDEP="unknown"
3261 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3262 esac
3263 ac_sys_release=
3264 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003265 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003266 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003267 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003272 fi
3273 ac_md_system=`echo $ac_sys_system |
3274 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3275 ac_md_release=`echo $ac_sys_release |
3276 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3277 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003278
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003280 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003281 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003282 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003283 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285fi
Guido van Rossum91922671997-10-09 20:24:13 +00003286
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003287
3288if test "$cross_compiling" = yes; then
3289 case "$host" in
3290 *-*-linux*)
3291 case "$host_cpu" in
3292 arm*)
3293 _host_cpu=arm
3294 ;;
3295 *)
3296 _host_cpu=$host_cpu
3297 esac
3298 ;;
3299 *-*-cygwin*)
3300 _host_cpu=
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3308fi
3309
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3311# disable features if it is defined, without any means to access these
3312# features as extensions. For these systems, we skip the definition of
3313# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3314# some feature, make sure there is no alternative way to access this
3315# feature. Also, when using wildcards, make sure you have verified the
3316# need for not defining _XOPEN_SOURCE on all systems matching the
3317# wildcard, and that the wildcard does not include future systems
3318# (which may remove their limitations).
3319case $ac_sys_system/$ac_sys_release in
3320 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3321 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003322 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003323 # In addition, Stefan Krah confirms that issue #1244610 exists through
3324 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003325 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326 define_xopen_source=no
3327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Kloseb9621712010-04-24 17:59:49 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332
3333 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340
3341 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003342 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3343 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3344 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003345 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003346 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003347 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3348 # request to enable features supported by the standard as a request
3349 # to disable features not supported by the standard. The best way
3350 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3351 # entirely and define __EXTENSIONS__ instead.
3352 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003353 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3355 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003356 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003357 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 define_xopen_source=no;;
3359 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003363 # On FreeBSD 4, the math functions C89 does not cover are never defined
3364 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3365 FreeBSD/4.*)
3366 define_xopen_source=no;;
3367 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3368 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3369 # identifies itself as Darwin/7.*
3370 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3371 # disables platform specific features beyond repair.
3372 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # has no effect, don't bother defining them
3374 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003375 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003376 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003377 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003378 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3379 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3380 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003381 AIX/4)
3382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 AIX/5)
3384 if test `uname -r` -eq 1; then
3385 define_xopen_source=no
3386 fi
3387 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003388 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3389 # defining NI_NUMERICHOST.
3390 QNX/6.3.2)
3391 define_xopen_source=no
3392 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003394esac
3395
3396if test $define_xopen_source = yes
3397then
Victor Stinner14d098d2011-09-07 22:29:43 +02003398 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
Victor Stinner14d098d2011-09-07 22:29:43 +02003400$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
3403 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3404 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3405 # several APIs are not declared. Since this is also needed in some
3406 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Matthias Kloseb9621712010-04-24 17:59:49 +00003408$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
3410
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003411
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003412$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414fi
3415
Christian Heimes647cd872013-12-07 23:39:33 +01003416# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3417case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003418 hp*|HP*)
3419 define_stdc_a1=yes;;
3420 *)
3421 define_stdc_a1=no;;
3422esac
3423
3424if test $define_stdc_a1 = yes
3425then
Christian Heimes647cd872013-12-07 23:39:33 +01003426
3427$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3428
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429fi
Christian Heimes647cd872013-12-07 23:39:33 +01003430
Jack Jansen6b08a402004-06-03 12:41:45 +00003431# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3432# it may influence the way we can build extensions, so distutils
3433# needs to check it
3434
Thomas Wouters477c8d52006-05-27 19:21:47 +00003435
Jack Jansen6b08a402004-06-03 12:41:45 +00003436CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003437EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003438
Guido van Rossum627b2d71993-12-24 10:39:16 +00003439# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003440
3441# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3442# for debug/optimization stuff. BASECFLAGS is for flags that are required
3443# just to get things to compile and link. Users are free to override OPT
3444# when running configure or make. The build should not break if they do.
3445# BASECFLAGS should generally not be messed with, however.
3446
3447# XXX shouldn't some/most/all of this code be merged with the stuff later
3448# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3450$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003453if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003455 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003456 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003457 without_gcc=yes;;
3458 yes) CC=gcc
3459 without_gcc=no;;
3460 *) CC=$withval
3461 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003462 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003463else
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003465 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003466 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003467 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003468 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003469 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470fi
3471
Matthias Kloseb9621712010-04-24 17:59:49 +00003472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3473$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003474
Zachary Ware5af85642015-12-21 12:09:17 -06003475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3476$as_echo_n "checking for --with-icc... " >&6; }
3477
3478# Check whether --with-icc was given.
3479if test "${with_icc+set}" = set; then :
3480 withval=$with_icc;
3481 case $withval in
3482 no) CC=${CC:-cc}
3483 with_icc=no;;
3484 yes) CC=icc
3485 CXX=icpc
3486 with_icc=yes;;
3487 *) CC=$withval
3488 with_icc=$withval;;
3489 esac
3490else
3491
3492 with_icc=no
3493fi
3494
3495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3496$as_echo "$with_icc" >&6; }
3497
Guido van Rossum8b131c51995-03-09 14:10:13 +00003498# If the user switches compilers, we can't believe the cache
3499if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3500then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003501 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003502(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003503fi
3504
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003505# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3506# when the compiler supports them, but we don't always want -O2, and
3507# we set -g later.
3508if test -z "$CFLAGS"; then
3509 CFLAGS=
3510fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003511
3512if test "$ac_sys_system" = "Darwin"
3513then
3514 # Compiler selection on MacOSX is more complicated than
3515 # AC_PROG_CC can handle, see Mac/README.txt for more
3516 # information
3517 if test -z "${CC}"
3518 then
3519 found_gcc=
3520 found_clang=
3521 as_save_IFS=$IFS; IFS=:
3522 for as_dir in $PATH
3523 do
3524 IFS=$as_save_IFS
3525 if test -x $as_dir/gcc; then
3526 if test -z "${found_gcc}"; then
3527 found_gcc=$as_dir/gcc
3528 fi
3529 fi
3530 if test -x $as_dir/clang; then
3531 if test -z "${found_clang}"; then
3532 found_clang=$as_dir/clang
3533 fi
3534 fi
3535 done
3536 IFS=$as_save_IFS
3537
3538 if test -n "$found_gcc" -a -n "$found_clang"
3539 then
3540 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3541 then
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3543$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3544 CC="$found_clang"
3545 CXX="$found_clang++"
3546 fi
3547
3548
3549 elif test -z "$found_gcc" -a -n "$found_clang"
3550 then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3552$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3553 CC="$found_clang"
3554 CXX="$found_clang++"
3555
3556 elif test -z "$found_gcc" -a -z "$found_clang"
3557 then
3558 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3559 if test -n "${found_clang}"
3560 then
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3562$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3563 CC="${found_clang}"
3564 CXX="`/usr/bin/xcrun -find clang++`"
3565
3566 # else: use default behaviour
3567 fi
3568 fi
3569 fi
3570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003571ac_ext=c
3572ac_cpp='$CPP $CPPFLAGS'
3573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3575ac_compiler_gnu=$ac_cv_c_compiler_gnu
3576if test -n "$ac_tool_prefix"; then
3577 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3578set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003581if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003583else
3584 if test -n "$CC"; then
3585 ac_cv_prog_CC="$CC" # Let the user override the test.
3586else
Martin v. Löwis11437992002-04-12 09:54:03 +00003587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3588for as_dir in $PATH
3589do
3590 IFS=$as_save_IFS
3591 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003593 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 $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 +00003596 break 2
3597 fi
3598done
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003601
Jack Jansendd19cf82001-12-06 22:36:17 +00003602fi
3603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003604CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003605if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3607$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003608else
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3610$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003611fi
3612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613
Martin v. Löwis11437992002-04-12 09:54:03 +00003614fi
3615if test -z "$ac_cv_prog_CC"; then
3616 ac_ct_CC=$CC
3617 # Extract the first word of "gcc", so it can be a program name with args.
3618set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3620$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003621if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003623else
3624 if test -n "$ac_ct_CC"; then
3625 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3626else
3627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3628for as_dir in $PATH
3629do
3630 IFS=$as_save_IFS
3631 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 $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 +00003636 break 2
3637 fi
3638done
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003641
3642fi
3643fi
3644ac_ct_CC=$ac_cv_prog_ac_ct_CC
3645if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3647$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003648else
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3650$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651fi
3652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 if test "x$ac_ct_CC" = x; then
3654 CC=""
3655 else
3656 case $cross_compiling:$ac_tool_warned in
3657yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660ac_tool_warned=yes ;;
3661esac
3662 CC=$ac_ct_CC
3663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003664else
3665 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003666fi
3667
Jack Jansendd19cf82001-12-06 22:36:17 +00003668if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 if test -n "$ac_tool_prefix"; then
3670 # 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 +00003671set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3673$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003674if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003676else
3677 if test -n "$CC"; then
3678 ac_cv_prog_CC="$CC" # Let the user override the test.
3679else
Martin v. Löwis11437992002-04-12 09:54:03 +00003680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3681for as_dir in $PATH
3682do
3683 IFS=$as_save_IFS
3684 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 $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 +00003689 break 2
3690 fi
3691done
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003694
3695fi
3696fi
3697CC=$ac_cv_prog_CC
3698if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3700$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701else
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3703$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003704fi
3705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706
Martin v. Löwis11437992002-04-12 09:54:03 +00003707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003708fi
3709if test -z "$CC"; then
3710 # Extract the first word of "cc", so it can be a program name with args.
3711set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3713$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003714if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003716else
3717 if test -n "$CC"; then
3718 ac_cv_prog_CC="$CC" # Let the user override the test.
3719else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3722for as_dir in $PATH
3723do
3724 IFS=$as_save_IFS
3725 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3729 ac_prog_rejected=yes
3730 continue
3731 fi
3732 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $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 +00003734 break 2
3735 fi
3736done
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740if test $ac_prog_rejected = yes; then
3741 # We found a bogon in the path, so make sure we never use it.
3742 set dummy $ac_cv_prog_CC
3743 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003745 # We chose a different compiler from the bogus one.
3746 # However, it has the same basename, so the bogon will be chosen
3747 # first if we set CC to just the basename; use the full file name.
3748 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003749 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003750 fi
3751fi
3752fi
3753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3757$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761fi
3762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764fi
3765if test -z "$CC"; then
3766 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 do
3769 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3770set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003773if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003775else
3776 if test -n "$CC"; then
3777 ac_cv_prog_CC="$CC" # Let the user override the test.
3778else
Martin v. Löwis11437992002-04-12 09:54:03 +00003779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780for as_dir in $PATH
3781do
3782 IFS=$as_save_IFS
3783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 $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 +00003788 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003789 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003790done
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003793
3794fi
3795fi
3796CC=$ac_cv_prog_CC
3797if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3799$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800else
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003803fi
3804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806 test -n "$CC" && break
3807 done
3808fi
3809if test -z "$CC"; then
3810 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003812do
3813 # Extract the first word of "$ac_prog", so it can be a program name with args.
3814set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3816$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003817if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
3820 if test -n "$ac_ct_CC"; then
3821 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3822else
3823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3824for as_dir in $PATH
3825do
3826 IFS=$as_save_IFS
3827 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003829 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $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 +00003832 break 2
3833 fi
3834done
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
3839fi
3840ac_ct_CC=$ac_cv_prog_ac_ct_CC
3841if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3843$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003844else
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3846$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003847fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850 test -n "$ac_ct_CC" && break
3851done
Michael W. Hudson54241132001-12-07 15:38:26 +00003852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853 if test "x$ac_ct_CC" = x; then
3854 CC=""
3855 else
3856 case $cross_compiling:$ac_tool_warned in
3857yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860ac_tool_warned=yes ;;
3861esac
3862 CC=$ac_ct_CC
3863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003864fi
3865
3866fi
3867
3868
Matthias Kloseb9621712010-04-24 17:59:49 +00003869test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003871as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003872See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003873
3874# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003875$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3876set X $ac_compile
3877ac_compiler=$2
3878for ac_option in --version -v -V -qversion; do
3879 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880case "(($ac_try" in
3881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3882 *) ac_try_echo=$ac_try;;
3883esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3885$as_echo "$ac_try_echo"; } >&5
3886 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003887 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 if test -s conftest.err; then
3889 sed '10a\
3890... rest of stderr output deleted ...
3891 10q' conftest.err >conftest.er1
3892 cat conftest.er1 >&5
3893 fi
3894 rm -f conftest.er1 conftest.err
3895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3896 test $ac_status = 0; }
3897done
Martin v. Löwis11437992002-04-12 09:54:03 +00003898
Matthias Kloseb9621712010-04-24 17:59:49 +00003899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003900/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003901
Martin v. Löwis11437992002-04-12 09:54:03 +00003902int
3903main ()
3904{
3905
3906 ;
3907 return 0;
3908}
3909_ACEOF
3910ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003911ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003912# Try to create an executable without -o first, disregard a.out.
3913# It will help us diagnose broken compilers, and finding out an intuition
3914# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3916$as_echo_n "checking whether the C compiler works... " >&6; }
3917ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3918
3919# The possible output files:
3920ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922ac_rmfiles=
3923for ac_file in $ac_files
3924do
3925 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3928 esac
3929done
3930rm -f $ac_rmfiles
3931
Matthias Kloseb9621712010-04-24 17:59:49 +00003932if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933case "(($ac_try" in
3934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935 *) ac_try_echo=$ac_try;;
3936esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3938$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003940 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3942 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3944# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3945# in a Makefile. We should not override ac_cv_exeext if it was cached,
3946# so that the user can short-circuit this test for compilers unknown to
3947# Autoconf.
3948for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003949do
3950 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953 ;;
3954 [ab].out )
3955 # We found the default executable, but exeext='' is most
3956 # certainly right.
3957 break;;
3958 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 then :; else
3961 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3962 fi
3963 # We set ac_cv_exeext here because the later test for it is not
3964 # safe: cross compilers may not add the suffix if given an `-o'
3965 # argument, so we may need to know it at that point already.
3966 # Even if this section looks crufty: it has the advantage of
3967 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003968 break;;
3969 * )
3970 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 esac
3972done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973test "$ac_cv_exeext" = no && ac_cv_exeext=
3974
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003975else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976 ac_file=''
3977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003978if test -z "$ac_file"; then :
3979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3980$as_echo "no" >&6; }
3981$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003982sed 's/^/| /' conftest.$ac_ext >&5
3983
Matthias Kloseb9621712010-04-24 17:59:49 +00003984{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003986as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003987See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003988else
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3990$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3993$as_echo_n "checking for C compiler default output file name... " >&6; }
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3995$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997
Matthias Kloseb9621712010-04-24 17:59:49 +00003998rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4001$as_echo_n "checking for suffix of executables... " >&6; }
4002if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003case "(($ac_try" in
4004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005 *) ac_try_echo=$ac_try;;
4006esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4008$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004010 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4012 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004013 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4014# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4015# work properly (i.e., refer to `conftest.exe'), while it won't with
4016# `rm'.
4017for ac_file in conftest.exe conftest conftest.*; do
4018 test -f "$ac_file" || continue
4019 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4022 break;;
4023 * ) break;;
4024 esac
4025done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026else
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004029as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004030See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004032rm -f conftest conftest$ac_cv_exeext
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4034$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035
4036rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004037EXEEXT=$ac_cv_exeext
4038ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4040/* end confdefs.h. */
4041#include <stdio.h>
4042int
4043main ()
4044{
4045FILE *f = fopen ("conftest.out", "w");
4046 return ferror (f) || fclose (f) != 0;
4047
4048 ;
4049 return 0;
4050}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004052ac_clean_files="$ac_clean_files conftest.out"
4053# Check that the compiler produces executables we can run. If not, either
4054# the compiler is broken, or we cross compile.
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4056$as_echo_n "checking whether we are cross compiling... " >&6; }
4057if test "$cross_compiling" != yes; then
4058 { { ac_try="$ac_link"
4059case "(($ac_try" in
4060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4061 *) ac_try_echo=$ac_try;;
4062esac
4063eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4064$as_echo "$ac_try_echo"; } >&5
4065 (eval "$ac_link") 2>&5
4066 ac_status=$?
4067 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4068 test $ac_status = 0; }
4069 if { ac_try='./conftest$ac_cv_exeext'
4070 { { case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073esac
4074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
4076 (eval "$ac_try") 2>&5
4077 ac_status=$?
4078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }; }; then
4080 cross_compiling=no
4081 else
4082 if test "$cross_compiling" = maybe; then
4083 cross_compiling=yes
4084 else
4085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004087as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004088If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004089See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 fi
4091 fi
4092fi
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4094$as_echo "$cross_compiling" >&6; }
4095
4096rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4097ac_clean_files=$ac_clean_files_save
4098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4099$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004100if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 $as_echo_n "(cached) " >&6
4102else
4103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004104/* end confdefs.h. */
4105
4106int
4107main ()
4108{
4109
4110 ;
4111 return 0;
4112}
4113_ACEOF
4114rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004115if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116case "(($ac_try" in
4117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4118 *) ac_try_echo=$ac_try;;
4119esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4121$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4125 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126 for ac_file in conftest.o conftest.obj conftest.*; do
4127 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4131 break;;
4132 esac
4133done
4134else
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004136sed 's/^/| /' conftest.$ac_ext >&5
4137
Matthias Kloseb9621712010-04-24 17:59:49 +00004138{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004140as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004141See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004143rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4146$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004147OBJEXT=$ac_cv_objext
4148ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4150$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004151if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
Martin v. Löwis11437992002-04-12 09:54:03 +00004157int
4158main ()
4159{
4160#ifndef __GNUC__
4161 choke me
4162#endif
4163
4164 ;
4165 return 0;
4166}
4167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004168if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 ac_compiler_gnu=yes
4170else
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004174ac_cv_c_compiler_gnu=$ac_compiler_gnu
4175
4176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4178$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4179if test $ac_compiler_gnu = yes; then
4180 GCC=yes
4181else
4182 GCC=
4183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004184ac_test_CFLAGS=${CFLAGS+set}
4185ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4187$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004188if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004190else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191 ac_save_c_werror_flag=$ac_c_werror_flag
4192 ac_c_werror_flag=yes
4193 ac_cv_prog_cc_g=no
4194 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004197
Martin v. Löwis11437992002-04-12 09:54:03 +00004198int
4199main ()
4200{
4201
4202 ;
4203 return 0;
4204}
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004207 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208else
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 CFLAGS=""
4210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004211/* end confdefs.h. */
4212
4213int
4214main ()
4215{
4216
4217 ;
4218 return 0;
4219}
4220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004221if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004222
Matthias Kloseb9621712010-04-24 17:59:49 +00004223else
4224 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227/* end confdefs.h. */
4228
4229int
4230main ()
4231{
4232
4233 ;
4234 return 0;
4235}
4236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004237if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245 ac_c_werror_flag=$ac_save_c_werror_flag
4246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4248$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004250 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004251elif test $ac_cv_prog_cc_g = yes; then
4252 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004253 CFLAGS="-g -O2"
4254 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004255 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256 fi
4257else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258 if test "$GCC" = yes; then
4259 CFLAGS="-O2"
4260 else
4261 CFLAGS=
4262 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4265$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004266if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004267 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004268else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004270ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004272/* end confdefs.h. */
4273#include <stdarg.h>
4274#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004275struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004276/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4277struct buf { int x; };
4278FILE * (*rcsopen) (struct buf *, struct stat *, int);
4279static char *e (p, i)
4280 char **p;
4281 int i;
4282{
4283 return p[i];
4284}
4285static char *f (char * (*g) (char **, int), char **p, ...)
4286{
4287 char *s;
4288 va_list v;
4289 va_start (v,p);
4290 s = g (p, va_arg (v,int));
4291 va_end (v);
4292 return s;
4293}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294
4295/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4296 function prototypes and stuff, but not '\xHH' hex character constants.
4297 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004299 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4300 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4305 inside strings and character constants. */
4306#define FOO(x) 'x'
4307int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4308
Skip Montanaro6dead952003-09-25 14:50:04 +00004309int test (int i, double x);
4310struct s1 {int (*f) (int a);};
4311struct s2 {int (*f) (double a);};
4312int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4313int argc;
4314char **argv;
4315int
4316main ()
4317{
4318return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4319 ;
4320 return 0;
4321}
4322_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4324 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004325do
4326 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330rm -f core conftest.err conftest.$ac_objext
4331 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004332done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004334CC=$ac_save_CC
4335
4336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337# AC_CACHE_VAL
4338case "x$ac_cv_prog_cc_c89" in
4339 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4341$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4344$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004345 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4348$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004349esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004350if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004353
Martin v. Löwis11437992002-04-12 09:54:03 +00004354ac_ext=c
4355ac_cpp='$CPP $CPPFLAGS'
4356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4358ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004359
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004360ac_ext=c
4361ac_cpp='$CPP $CPPFLAGS'
4362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4364ac_compiler_gnu=$ac_cv_c_compiler_gnu
4365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4366$as_echo_n "checking how to run the C preprocessor... " >&6; }
4367# On Suns, sometimes $CPP names a directory.
4368if test -n "$CPP" && test -d "$CPP"; then
4369 CPP=
4370fi
4371if test -z "$CPP"; then
4372 if ${ac_cv_prog_CPP+:} false; then :
4373 $as_echo_n "(cached) " >&6
4374else
4375 # Double quotes because CPP needs to be expanded
4376 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4377 do
4378 ac_preproc_ok=false
4379for ac_c_preproc_warn_flag in '' yes
4380do
4381 # Use a header file that comes with gcc, so configuring glibc
4382 # with a fresh cross-compiler works.
4383 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4384 # <limits.h> exists even on freestanding compilers.
4385 # On the NeXT, cc -E runs the code through the compiler's parser,
4386 # not just through cpp. "Syntax error" is here to catch this case.
4387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4388/* end confdefs.h. */
4389#ifdef __STDC__
4390# include <limits.h>
4391#else
4392# include <assert.h>
4393#endif
4394 Syntax error
4395_ACEOF
4396if ac_fn_c_try_cpp "$LINENO"; then :
4397
4398else
4399 # Broken: fails on valid input.
4400continue
4401fi
4402rm -f conftest.err conftest.i conftest.$ac_ext
4403
4404 # OK, works on sane cases. Now check whether nonexistent headers
4405 # can be detected and how.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#include <ac_nonexistent.h>
4409_ACEOF
4410if ac_fn_c_try_cpp "$LINENO"; then :
4411 # Broken: success on invalid input.
4412continue
4413else
4414 # Passes both tests.
4415ac_preproc_ok=:
4416break
4417fi
4418rm -f conftest.err conftest.i conftest.$ac_ext
4419
4420done
4421# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4422rm -f conftest.i conftest.err conftest.$ac_ext
4423if $ac_preproc_ok; then :
4424 break
4425fi
4426
4427 done
4428 ac_cv_prog_CPP=$CPP
4429
4430fi
4431 CPP=$ac_cv_prog_CPP
4432else
4433 ac_cv_prog_CPP=$CPP
4434fi
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4436$as_echo "$CPP" >&6; }
4437ac_preproc_ok=false
4438for ac_c_preproc_warn_flag in '' yes
4439do
4440 # Use a header file that comes with gcc, so configuring glibc
4441 # with a fresh cross-compiler works.
4442 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4443 # <limits.h> exists even on freestanding compilers.
4444 # On the NeXT, cc -E runs the code through the compiler's parser,
4445 # not just through cpp. "Syntax error" is here to catch this case.
4446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4447/* end confdefs.h. */
4448#ifdef __STDC__
4449# include <limits.h>
4450#else
4451# include <assert.h>
4452#endif
4453 Syntax error
4454_ACEOF
4455if ac_fn_c_try_cpp "$LINENO"; then :
4456
4457else
4458 # Broken: fails on valid input.
4459continue
4460fi
4461rm -f conftest.err conftest.i conftest.$ac_ext
4462
4463 # OK, works on sane cases. Now check whether nonexistent headers
4464 # can be detected and how.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#include <ac_nonexistent.h>
4468_ACEOF
4469if ac_fn_c_try_cpp "$LINENO"; then :
4470 # Broken: success on invalid input.
4471continue
4472else
4473 # Passes both tests.
4474ac_preproc_ok=:
4475break
4476fi
4477rm -f conftest.err conftest.i conftest.$ac_ext
4478
4479done
4480# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4481rm -f conftest.i conftest.err conftest.$ac_ext
4482if $ac_preproc_ok; then :
4483
4484else
4485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4487as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4488See \`config.log' for more details" "$LINENO" 5; }
4489fi
4490
4491ac_ext=c
4492ac_cpp='$CPP $CPPFLAGS'
4493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495ac_compiler_gnu=$ac_cv_c_compiler_gnu
4496
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4498$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4499if ${ac_cv_path_GREP+:} false; then :
4500 $as_echo_n "(cached) " >&6
4501else
4502 if test -z "$GREP"; then
4503 ac_path_GREP_found=false
4504 # Loop through the user's path and test for each of PROGNAME-LIST
4505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4506for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4507do
4508 IFS=$as_save_IFS
4509 test -z "$as_dir" && as_dir=.
4510 for ac_prog in grep ggrep; do
4511 for ac_exec_ext in '' $ac_executable_extensions; do
4512 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4513 as_fn_executable_p "$ac_path_GREP" || continue
4514# Check for GNU ac_path_GREP and select it if it is found.
4515 # Check for GNU $ac_path_GREP
4516case `"$ac_path_GREP" --version 2>&1` in
4517*GNU*)
4518 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4519*)
4520 ac_count=0
4521 $as_echo_n 0123456789 >"conftest.in"
4522 while :
4523 do
4524 cat "conftest.in" "conftest.in" >"conftest.tmp"
4525 mv "conftest.tmp" "conftest.in"
4526 cp "conftest.in" "conftest.nl"
4527 $as_echo 'GREP' >> "conftest.nl"
4528 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4529 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4530 as_fn_arith $ac_count + 1 && ac_count=$as_val
4531 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4532 # Best one so far, save it but keep looking for a better one
4533 ac_cv_path_GREP="$ac_path_GREP"
4534 ac_path_GREP_max=$ac_count
4535 fi
4536 # 10*(2^10) chars as input seems more than enough
4537 test $ac_count -gt 10 && break
4538 done
4539 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4540esac
4541
4542 $ac_path_GREP_found && break 3
4543 done
4544 done
4545 done
4546IFS=$as_save_IFS
4547 if test -z "$ac_cv_path_GREP"; then
4548 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4549 fi
4550else
4551 ac_cv_path_GREP=$GREP
4552fi
4553
4554fi
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4556$as_echo "$ac_cv_path_GREP" >&6; }
4557 GREP="$ac_cv_path_GREP"
4558
4559
Łukasz Langaa785c872016-09-09 17:37:37 -07004560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4561$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4562if ${ac_cv_path_SED+:} false; then :
4563 $as_echo_n "(cached) " >&6
4564else
4565 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4566 for ac_i in 1 2 3 4 5 6 7; do
4567 ac_script="$ac_script$as_nl$ac_script"
4568 done
4569 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4570 { ac_script=; unset ac_script;}
4571 if test -z "$SED"; then
4572 ac_path_SED_found=false
4573 # Loop through the user's path and test for each of PROGNAME-LIST
4574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4575for as_dir in $PATH
4576do
4577 IFS=$as_save_IFS
4578 test -z "$as_dir" && as_dir=.
4579 for ac_prog in sed gsed; do
4580 for ac_exec_ext in '' $ac_executable_extensions; do
4581 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4582 as_fn_executable_p "$ac_path_SED" || continue
4583# Check for GNU ac_path_SED and select it if it is found.
4584 # Check for GNU $ac_path_SED
4585case `"$ac_path_SED" --version 2>&1` in
4586*GNU*)
4587 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4588*)
4589 ac_count=0
4590 $as_echo_n 0123456789 >"conftest.in"
4591 while :
4592 do
4593 cat "conftest.in" "conftest.in" >"conftest.tmp"
4594 mv "conftest.tmp" "conftest.in"
4595 cp "conftest.in" "conftest.nl"
4596 $as_echo '' >> "conftest.nl"
4597 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4598 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4599 as_fn_arith $ac_count + 1 && ac_count=$as_val
4600 if test $ac_count -gt ${ac_path_SED_max-0}; then
4601 # Best one so far, save it but keep looking for a better one
4602 ac_cv_path_SED="$ac_path_SED"
4603 ac_path_SED_max=$ac_count
4604 fi
4605 # 10*(2^10) chars as input seems more than enough
4606 test $ac_count -gt 10 && break
4607 done
4608 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4609esac
4610
4611 $ac_path_SED_found && break 3
4612 done
4613 done
4614 done
4615IFS=$as_save_IFS
4616 if test -z "$ac_cv_path_SED"; then
4617 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4618 fi
4619else
4620 ac_cv_path_SED=$SED
4621fi
4622
4623fi
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4625$as_echo "$ac_cv_path_SED" >&6; }
4626 SED="$ac_cv_path_SED"
4627 rm -f conftest.sed
4628
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004629
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004630
4631
Matthias Kloseb9621712010-04-24 17:59:49 +00004632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4633$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004636if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004637 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004638
4639 case $withval in
4640 no) with_cxx_main=no
4641 MAINCC='$(CC)';;
4642 yes) with_cxx_main=yes
4643 MAINCC='$(CXX)';;
4644 *) with_cxx_main=yes
4645 MAINCC=$withval
4646 if test -z "$CXX"
4647 then
4648 CXX=$withval
4649 fi;;
4650 esac
4651else
4652
4653 with_cxx_main=no
4654 MAINCC='$(CC)'
4655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656fi
4657
Matthias Kloseb9621712010-04-24 17:59:49 +00004658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4659$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660
4661preset_cxx="$CXX"
4662if test -z "$CXX"
4663then
4664 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004665 gcc) if test -n "$ac_tool_prefix"; then
4666 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4667set dummy ${ac_tool_prefix}g++; ac_word=$2
4668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669$as_echo_n "checking for $ac_word... " >&6; }
4670if ${ac_cv_path_CXX+:} false; then :
4671 $as_echo_n "(cached) " >&6
4672else
4673 case $CXX in
4674 [\\/]* | ?:[\\/]*)
4675 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4676 ;;
4677 *)
4678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679for as_dir in notfound
4680do
4681 IFS=$as_save_IFS
4682 test -z "$as_dir" && as_dir=.
4683 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004685 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4687 break 2
4688 fi
4689done
4690 done
4691IFS=$as_save_IFS
4692
4693 ;;
4694esac
4695fi
4696CXX=$ac_cv_path_CXX
4697if test -n "$CXX"; then
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4699$as_echo "$CXX" >&6; }
4700else
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702$as_echo "no" >&6; }
4703fi
4704
4705
4706fi
4707if test -z "$ac_cv_path_CXX"; then
4708 ac_pt_CXX=$CXX
4709 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4712$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004713if ${ac_cv_path_ac_pt_CXX+:} false; then :
4714 $as_echo_n "(cached) " >&6
4715else
4716 case $ac_pt_CXX in
4717 [\\/]* | ?:[\\/]*)
4718 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4719 ;;
4720 *)
4721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4722for as_dir in notfound
4723do
4724 IFS=$as_save_IFS
4725 test -z "$as_dir" && as_dir=.
4726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004728 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4730 break 2
4731 fi
4732done
4733 done
4734IFS=$as_save_IFS
4735
4736 ;;
4737esac
4738fi
4739ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4740if test -n "$ac_pt_CXX"; then
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4742$as_echo "$ac_pt_CXX" >&6; }
4743else
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4745$as_echo "no" >&6; }
4746fi
4747
4748 if test "x$ac_pt_CXX" = x; then
4749 CXX="g++"
4750 else
4751 case $cross_compiling:$ac_tool_warned in
4752yes:)
4753{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4754$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4755ac_tool_warned=yes ;;
4756esac
4757 CXX=$ac_pt_CXX
4758 fi
4759else
4760 CXX="$ac_cv_path_CXX"
4761fi
4762 ;;
4763 cc) if test -n "$ac_tool_prefix"; then
4764 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4765set dummy ${ac_tool_prefix}c++; ac_word=$2
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004768if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770else
4771 case $CXX in
4772 [\\/]* | ?:[\\/]*)
4773 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4774 ;;
4775 *)
4776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in notfound
4778do
4779 IFS=$as_save_IFS
4780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 break 2
4786 fi
4787done
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004789IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 ;;
4792esac
4793fi
4794CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004795if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4797$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798else
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004802
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004803
4804fi
4805if test -z "$ac_cv_path_CXX"; then
4806 ac_pt_CXX=$CXX
4807 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4810$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 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 +00004817 ;;
4818 *)
4819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4820for as_dir in notfound
4821do
4822 IFS=$as_save_IFS
4823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 break 2
4829 fi
4830done
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004832IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834 ;;
4835esac
4836fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4838if test -n "$ac_pt_CXX"; then
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4840$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004841else
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004845
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 if test "x$ac_pt_CXX" = x; then
4847 CXX="c++"
4848 else
4849 case $cross_compiling:$ac_tool_warned in
4850yes:)
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4852$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4853ac_tool_warned=yes ;;
4854esac
4855 CXX=$ac_pt_CXX
4856 fi
4857else
4858 CXX="$ac_cv_path_CXX"
4859fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004861 clang|*/clang) if test -n "$ac_tool_prefix"; then
4862 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4863set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4865$as_echo_n "checking for $ac_word... " >&6; }
4866if ${ac_cv_path_CXX+:} false; then :
4867 $as_echo_n "(cached) " >&6
4868else
4869 case $CXX in
4870 [\\/]* | ?:[\\/]*)
4871 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4872 ;;
4873 *)
4874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4875for as_dir in notfound
4876do
4877 IFS=$as_save_IFS
4878 test -z "$as_dir" && as_dir=.
4879 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004881 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4883 break 2
4884 fi
4885done
4886 done
4887IFS=$as_save_IFS
4888
Ned Deilycbfb9a52012-06-23 16:02:19 -07004889 ;;
4890esac
4891fi
4892CXX=$ac_cv_path_CXX
4893if test -n "$CXX"; then
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4895$as_echo "$CXX" >&6; }
4896else
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4898$as_echo "no" >&6; }
4899fi
4900
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004901
4902fi
4903if test -z "$ac_cv_path_CXX"; then
4904 ac_pt_CXX=$CXX
4905 # Extract the first word of "clang++", so it can be a program name with args.
4906set dummy clang++; ac_word=$2
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4908$as_echo_n "checking for $ac_word... " >&6; }
4909if ${ac_cv_path_ac_pt_CXX+:} false; then :
4910 $as_echo_n "(cached) " >&6
4911else
4912 case $ac_pt_CXX in
4913 [\\/]* | ?:[\\/]*)
4914 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4915 ;;
4916 *)
4917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918for as_dir in notfound
4919do
4920 IFS=$as_save_IFS
4921 test -z "$as_dir" && as_dir=.
4922 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004924 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926 break 2
4927 fi
4928done
4929 done
4930IFS=$as_save_IFS
4931
4932 ;;
4933esac
4934fi
4935ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4936if test -n "$ac_pt_CXX"; then
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4938$as_echo "$ac_pt_CXX" >&6; }
4939else
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
4942fi
4943
4944 if test "x$ac_pt_CXX" = x; then
4945 CXX="clang++"
4946 else
4947 case $cross_compiling:$ac_tool_warned in
4948yes:)
4949{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4950$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4951ac_tool_warned=yes ;;
4952esac
4953 CXX=$ac_pt_CXX
4954 fi
4955else
4956 CXX="$ac_cv_path_CXX"
4957fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004958 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004959 icc|*/icc) if test -n "$ac_tool_prefix"; then
4960 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4961set dummy ${ac_tool_prefix}icpc; ac_word=$2
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963$as_echo_n "checking for $ac_word... " >&6; }
4964if ${ac_cv_path_CXX+:} false; then :
4965 $as_echo_n "(cached) " >&6
4966else
4967 case $CXX in
4968 [\\/]* | ?:[\\/]*)
4969 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4970 ;;
4971 *)
4972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in notfound
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
4977 for ac_exec_ext in '' $ac_executable_extensions; do
4978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4979 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981 break 2
4982 fi
4983done
4984 done
4985IFS=$as_save_IFS
4986
4987 ;;
4988esac
4989fi
4990CXX=$ac_cv_path_CXX
4991if test -n "$CXX"; then
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4993$as_echo "$CXX" >&6; }
4994else
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996$as_echo "no" >&6; }
4997fi
4998
4999
5000fi
5001if test -z "$ac_cv_path_CXX"; then
5002 ac_pt_CXX=$CXX
5003 # Extract the first word of "icpc", so it can be a program name with args.
5004set dummy icpc; ac_word=$2
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006$as_echo_n "checking for $ac_word... " >&6; }
5007if ${ac_cv_path_ac_pt_CXX+:} false; then :
5008 $as_echo_n "(cached) " >&6
5009else
5010 case $ac_pt_CXX in
5011 [\\/]* | ?:[\\/]*)
5012 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5013 ;;
5014 *)
5015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in notfound
5017do
5018 IFS=$as_save_IFS
5019 test -z "$as_dir" && as_dir=.
5020 for ac_exec_ext in '' $ac_executable_extensions; do
5021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5022 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024 break 2
5025 fi
5026done
5027 done
5028IFS=$as_save_IFS
5029
5030 ;;
5031esac
5032fi
5033ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5034if test -n "$ac_pt_CXX"; then
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5036$as_echo "$ac_pt_CXX" >&6; }
5037else
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
5040fi
5041
5042 if test "x$ac_pt_CXX" = x; then
5043 CXX="icpc"
5044 else
5045 case $cross_compiling:$ac_tool_warned in
5046yes:)
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5048$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5049ac_tool_warned=yes ;;
5050esac
5051 CXX=$ac_pt_CXX
5052 fi
5053else
5054 CXX="$ac_cv_path_CXX"
5055fi
5056 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057 esac
5058 if test "$CXX" = "notfound"
5059 then
5060 CXX=""
5061 fi
5062fi
5063if test -z "$CXX"
5064then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005065 if test -n "$ac_tool_prefix"; then
5066 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5067 do
5068 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5069set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005072if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005074else
5075 if test -n "$CXX"; then
5076 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5077else
5078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081 IFS=$as_save_IFS
5082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005084 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005085 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087 break 2
5088 fi
5089done
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005092
5093fi
5094fi
5095CXX=$ac_cv_prog_CXX
5096if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5098$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099else
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102fi
5103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005105 test -n "$CXX" && break
5106 done
5107fi
5108if test -z "$CXX"; then
5109 ac_ct_CXX=$CXX
5110 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5111do
5112 # Extract the first word of "$ac_prog", so it can be a program name with args.
5113set dummy $ac_prog; ac_word=$2
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5115$as_echo_n "checking for $ac_word... " >&6; }
5116if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5117 $as_echo_n "(cached) " >&6
5118else
5119 if test -n "$ac_ct_CXX"; then
5120 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5121else
5122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123for as_dir in $PATH
5124do
5125 IFS=$as_save_IFS
5126 test -z "$as_dir" && as_dir=.
5127 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005129 ac_cv_prog_ac_ct_CXX="$ac_prog"
5130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5131 break 2
5132 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 done
5135IFS=$as_save_IFS
5136
5137fi
5138fi
5139ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5140if test -n "$ac_ct_CXX"; then
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5142$as_echo "$ac_ct_CXX" >&6; }
5143else
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5145$as_echo "no" >&6; }
5146fi
5147
5148
5149 test -n "$ac_ct_CXX" && break
5150done
5151
5152 if test "x$ac_ct_CXX" = x; then
5153 CXX="notfound"
5154 else
5155 case $cross_compiling:$ac_tool_warned in
5156yes:)
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5159ac_tool_warned=yes ;;
5160esac
5161 CXX=$ac_ct_CXX
5162 fi
5163fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005164
5165 if test "$CXX" = "notfound"
5166 then
5167 CXX=""
5168 fi
5169fi
5170if test "$preset_cxx" != "$CXX"
5171then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005172 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005173
5174 By default, distutils will build C++ extension modules with \"$CXX\".
5175 If this is not intended, then set CXX on the configure command line.
5176 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005177$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005178
5179 By default, distutils will build C++ extension modules with \"$CXX\".
5180 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005181 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182fi
5183
5184
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005185MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5186
5187
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5189$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5190cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005191#undef bfin
5192#undef cris
5193#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005194#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005195#undef hppa
5196#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005199#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005200#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005201#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005202#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005203 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005204#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005205# if defined(__x86_64__) && defined(__LP64__)
5206 x86_64-linux-gnu
5207# elif defined(__x86_64__) && defined(__ILP32__)
5208 x86_64-linux-gnux32
5209# elif defined(__i386__)
5210 i386-linux-gnu
5211# elif defined(__aarch64__) && defined(__AARCH64EL__)
5212# if defined(__ILP32__)
5213 aarch64_ilp32-linux-gnu
5214# else
5215 aarch64-linux-gnu
5216# endif
5217# elif defined(__aarch64__) && defined(__AARCH64EB__)
5218# if defined(__ILP32__)
5219 aarch64_be_ilp32-linux-gnu
5220# else
5221 aarch64_be-linux-gnu
5222# endif
5223# elif defined(__alpha__)
5224 alpha-linux-gnu
5225# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5226# if defined(__ARMEL__)
5227 arm-linux-gnueabihf
5228# else
5229 armeb-linux-gnueabihf
5230# endif
5231# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5232# if defined(__ARMEL__)
5233 arm-linux-gnueabi
5234# else
5235 armeb-linux-gnueabi
5236# endif
5237# elif defined(__hppa__)
5238 hppa-linux-gnu
5239# elif defined(__ia64__)
5240 ia64-linux-gnu
5241# elif defined(__m68k__) && !defined(__mcoldfire__)
5242 m68k-linux-gnu
5243# elif defined(__mips_hard_float) && defined(_MIPSEL)
5244# if _MIPS_SIM == _ABIO32
5245 mipsel-linux-gnu
5246# elif _MIPS_SIM == _ABIN32
5247 mips64el-linux-gnuabin32
5248# elif _MIPS_SIM == _ABI64
5249 mips64el-linux-gnuabi64
5250# else
5251# error unknown platform triplet
5252# endif
5253# elif defined(__mips_hard_float)
5254# if _MIPS_SIM == _ABIO32
5255 mips-linux-gnu
5256# elif _MIPS_SIM == _ABIN32
5257 mips64-linux-gnuabin32
5258# elif _MIPS_SIM == _ABI64
5259 mips64-linux-gnuabi64
5260# else
5261# error unknown platform triplet
5262# endif
5263# elif defined(__or1k__)
5264 or1k-linux-gnu
5265# elif defined(__powerpc__) && defined(__SPE__)
5266 powerpc-linux-gnuspe
5267# elif defined(__powerpc64__)
5268# if defined(__LITTLE_ENDIAN__)
5269 powerpc64le-linux-gnu
5270# else
5271 powerpc64-linux-gnu
5272# endif
5273# elif defined(__powerpc__)
5274 powerpc-linux-gnu
5275# elif defined(__s390x__)
5276 s390x-linux-gnu
5277# elif defined(__s390__)
5278 s390-linux-gnu
5279# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5280 sh4-linux-gnu
5281# elif defined(__sparc__) && defined(__arch64__)
5282 sparc64-linux-gnu
5283# elif defined(__sparc__)
5284 sparc-linux-gnu
5285# else
5286# error unknown platform triplet
5287# endif
5288#elif defined(__FreeBSD_kernel__)
5289# if defined(__LP64__)
5290 x86_64-kfreebsd-gnu
5291# elif defined(__i386__)
5292 i386-kfreebsd-gnu
5293# else
5294# error unknown platform triplet
5295# endif
5296#elif defined(__gnu_hurd__)
5297 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005298#elif defined(__APPLE__)
5299 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300#else
5301# error unknown platform triplet
5302#endif
5303
5304EOF
5305
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005306if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005307 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5309$as_echo "$PLATFORM_TRIPLET" >&6; }
5310else
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5312$as_echo "none" >&6; }
5313fi
5314rm -f conftest.c conftest.out
5315
5316if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5317 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5318 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5319 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005320elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5321 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005322fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005323
doko@ubuntu.com55532312016-06-14 08:55:19 +02005324if test x$MULTIARCH != x; then
5325 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5326fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327
5328
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5330$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5331save_LDFLAGS="$LDFLAGS"
5332LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005333
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5335/* end confdefs.h. */
5336
5337int
5338main ()
5339{
5340
5341 ;
5342 return 0;
5343}
5344_ACEOF
5345if ac_fn_c_try_link "$LINENO"; then :
5346 NO_AS_NEEDED="-Wl,--no-as-needed"
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5348$as_echo "yes" >&6; }
5349else
5350 NO_AS_NEEDED=""
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354rm -f core conftest.err conftest.$ac_objext \
5355 conftest$ac_exeext conftest.$ac_ext
5356LDFLAGS="$save_LDFLAGS"
5357
5358
5359
5360# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361
Matthias Kloseb9621712010-04-24 17:59:49 +00005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5363$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005364if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366else
5367 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5368 then ac_cv_path_EGREP="$GREP -E"
5369 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 # Loop through the user's path and test for each of PROGNAME-LIST
5373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5375do
5376 IFS=$as_save_IFS
5377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 for ac_prog in egrep; do
5379 for ac_exec_ext in '' $ac_executable_extensions; do
5380 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005381 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005382# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 # Check for GNU $ac_path_EGREP
5384case `"$ac_path_EGREP" --version 2>&1` in
5385*GNU*)
5386 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5387*)
5388 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 while :
5391 do
5392 cat "conftest.in" "conftest.in" >"conftest.tmp"
5393 mv "conftest.tmp" "conftest.in"
5394 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5397 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5400 # Best one so far, save it but keep looking for a better one
5401 ac_cv_path_EGREP="$ac_path_EGREP"
5402 ac_path_EGREP_max=$ac_count
5403 fi
5404 # 10*(2^10) chars as input seems more than enough
5405 test $ac_count -gt 10 && break
5406 done
5407 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5408esac
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $ac_path_EGREP_found && break 3
5411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005416 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 +00005417 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418else
5419 ac_cv_path_EGREP=$EGREP
5420fi
5421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 fi
5423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5425$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005427
5428
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5430$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005431if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 $as_echo_n "(cached) " >&6
5433else
5434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005435/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005436#include <stdlib.h>
5437#include <stdarg.h>
5438#include <string.h>
5439#include <float.h>
5440
5441int
5442main ()
5443{
5444
5445 ;
5446 return 0;
5447}
5448_ACEOF
5449if ac_fn_c_try_compile "$LINENO"; then :
5450 ac_cv_header_stdc=yes
5451else
5452 ac_cv_header_stdc=no
5453fi
5454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5455
5456if test $ac_cv_header_stdc = yes; then
5457 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459/* end confdefs.h. */
5460#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005461
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005462_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005464 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005466else
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005469rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470
Matthias Kloseb9621712010-04-24 17:59:49 +00005471fi
5472
5473if test $ac_cv_header_stdc = yes; then
5474 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476/* end confdefs.h. */
5477#include <stdlib.h>
5478
5479_ACEOF
5480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5481 $EGREP "free" >/dev/null 2>&1; then :
5482
5483else
5484 ac_cv_header_stdc=no
5485fi
5486rm -f conftest*
5487
5488fi
5489
5490if test $ac_cv_header_stdc = yes; then
5491 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5492 if test "$cross_compiling" = yes; then :
5493 :
5494else
5495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5496/* end confdefs.h. */
5497#include <ctype.h>
5498#include <stdlib.h>
5499#if ((' ' & 0x0FF) == 0x020)
5500# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5501# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5502#else
5503# define ISLOWER(c) \
5504 (('a' <= (c) && (c) <= 'i') \
5505 || ('j' <= (c) && (c) <= 'r') \
5506 || ('s' <= (c) && (c) <= 'z'))
5507# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5508#endif
5509
5510#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5511int
5512main ()
5513{
5514 int i;
5515 for (i = 0; i < 256; i++)
5516 if (XOR (islower (i), ISLOWER (i))
5517 || toupper (i) != TOUPPER (i))
5518 return 2;
5519 return 0;
5520}
5521_ACEOF
5522if ac_fn_c_try_run "$LINENO"; then :
5523
5524else
5525 ac_cv_header_stdc=no
5526fi
5527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5528 conftest.$ac_objext conftest.beam conftest.$ac_ext
5529fi
5530
5531fi
5532fi
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5534$as_echo "$ac_cv_header_stdc" >&6; }
5535if test $ac_cv_header_stdc = yes; then
5536
5537$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5538
5539fi
5540
5541# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5542for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5543 inttypes.h stdint.h unistd.h
5544do :
5545 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5546ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5547"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005548if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 cat >>confdefs.h <<_ACEOF
5550#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5551_ACEOF
5552
5553fi
5554
5555done
5556
5557
5558
5559 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 +02005560if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 MINIX=yes
5562else
5563 MINIX=
5564fi
5565
5566
5567 if test "$MINIX" = yes; then
5568
5569$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5570
5571
5572$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5573
5574
5575$as_echo "#define _MINIX 1" >>confdefs.h
5576
5577 fi
5578
5579
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5581$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005582if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005583 $as_echo_n "(cached) " >&6
5584else
5585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5586/* end confdefs.h. */
5587
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005588# define __EXTENSIONS__ 1
5589 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005590int
5591main ()
5592{
5593
5594 ;
5595 return 0;
5596}
5597_ACEOF
5598if ac_fn_c_try_compile "$LINENO"; then :
5599 ac_cv_safe_to_define___extensions__=yes
5600else
5601 ac_cv_safe_to_define___extensions__=no
5602fi
5603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5604fi
5605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5606$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5607 test $ac_cv_safe_to_define___extensions__ = yes &&
5608 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5609
5610 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5611
5612 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5613
5614 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5615
5616 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5617
5618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619
Xavier de Gaye95750b12016-07-09 11:05:42 +02005620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5621$as_echo_n "checking for the Android API level... " >&6; }
5622cat >> conftest.c <<EOF
5623#ifdef __ANDROID__
5624#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005625android_api = __ANDROID_API__
5626arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005627#else
5628#error not Android
5629#endif
5630EOF
5631
5632if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005633 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5634 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5636$as_echo "$ANDROID_API_LEVEL" >&6; }
5637
5638cat >>confdefs.h <<_ACEOF
5639#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5640_ACEOF
5641
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005642
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5644$as_echo_n "checking for the Android arm ABI... " >&6; }
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5646$as_echo "$_arm_arch" >&6; }
5647 if test "$_arm_arch" = 7; then
5648 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5649 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5650 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005651else
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5653$as_echo "not Android" >&6; }
5654fi
5655rm -f conftest.c conftest.out
5656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657# Check for unsupported systems
5658case $ac_sys_system/$ac_sys_release in
5659atheos*|Linux*/1*)
5660 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5661 echo See README for details.
5662 exit 1;;
5663esac
5664
5665
Matthias Kloseb9621712010-04-24 17:59:49 +00005666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5667$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668
5669# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005670if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 withval=$with_suffix;
5672 case $withval in
5673 no) EXEEXT=;;
5674 yes) EXEEXT=.exe;;
5675 *) EXEEXT=$withval;;
5676 esac
5677fi
5678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5680$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681
5682# Test whether we're running on a non-case-sensitive system, in which
5683# case we give a warning if no ext is given
5684
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5686$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687if test ! -d CaseSensitiveTestDir; then
5688mkdir CaseSensitiveTestDir
5689fi
5690
5691if test -d casesensitivetestdir
5692then
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5694$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695 BUILDEXEEXT=.exe
5696else
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5698$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699 BUILDEXEEXT=$EXEEXT
5700fi
5701rmdir CaseSensitiveTestDir
5702
5703case $MACHDEP in
5704bsdos*)
5705 case $CC in
5706 gcc) CC="$CC -D_HAVE_BSDI";;
5707 esac;;
5708esac
5709
5710case $ac_sys_system in
5711hp*|HP*)
5712 case $CC in
5713 cc|*/cc) CC="$CC -Ae";;
5714 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715esac
5716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5719$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720if test -z "$LIBRARY"
5721then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005722 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5725$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
5727# LDLIBRARY is the name of the library to link against (as opposed to the
5728# name of the library into which to insert object files). BLDLIBRARY is also
5729# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5730# is blank as the main program is not linked directly against LDLIBRARY.
5731# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5732# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5733# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5734# DLLLIBRARY is the shared (i.e., DLL) library.
5735#
5736# RUNSHARED is used to run shared python without installed libraries
5737#
5738# INSTSONAME is the name of the shared library that will be use to install
5739# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005740#
5741# LDVERSION is the shared library version number, normally the Python version
5742# with the ABI build flags appended.
5743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745
5746
5747
5748
5749
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751LDLIBRARY="$LIBRARY"
5752BLDLIBRARY='$(LDLIBRARY)'
5753INSTSONAME='$(LDLIBRARY)'
5754DLLLIBRARY=''
5755LDLIBRARYDIR=''
5756RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005757LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758
5759# LINKCC is the command that links the python executable -- default is $(CC).
5760# If CXX is set, and if it is needed to link a main function that was
5761# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5762# python might then depend on the C++ runtime
5763# This is altered for AIX in order to build the export list before
5764# linking.
5765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5767$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768if test -z "$LINKCC"
5769then
5770 LINKCC='$(PURIFY) $(MAINCC)'
5771 case $ac_sys_system in
5772 AIX*)
5773 exp_extra="\"\""
5774 if test $ac_sys_release -ge 5 -o \
5775 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5776 exp_extra="."
5777 fi
5778 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779 QNX*)
5780 # qcc must be used because the other compilers do not
5781 # support -N.
5782 LINKCC=qcc;;
5783 esac
5784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5786$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787
5788# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5789# make sure we default having it set to "no": this is used by
5790# distutils.unixccompiler to know if it should add --enable-new-dtags
5791# to linker command lines, and failing to detect GNU ld simply results
5792# in the same bahaviour as before.
5793
Matthias Kloseb9621712010-04-24 17:59:49 +00005794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5795$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796ac_prog=ld
5797if test "$GCC" = yes; then
5798 ac_prog=`$CC -print-prog-name=ld`
5799fi
5800case `"$ac_prog" -V 2>&1 < /dev/null` in
5801 *GNU*)
5802 GNULD=yes;;
5803 *)
5804 GNULD=no;;
5805esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5807$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808
Matthias Kloseb9621712010-04-24 17:59:49 +00005809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5810$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005812if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813 enableval=$enable_shared;
5814fi
5815
5816
5817if test -z "$enable_shared"
5818then
5819 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005820 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821 enable_shared="yes";;
5822 *)
5823 enable_shared="no";;
5824 esac
5825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5827$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5830$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005832if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005833 enableval=$enable_profiling;
5834fi
5835
5836if test "x$enable_profiling" = xyes; then
5837 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005838 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840/* end confdefs.h. */
5841int main() { return 0; }
5842_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005843if ac_fn_c_try_link "$LINENO"; then :
5844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005846 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005848rm -f core conftest.err conftest.$ac_objext \
5849 conftest$ac_exeext conftest.$ac_ext
5850 CC="$ac_save_cc"
5851else
5852 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5855$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856
doko@ubuntu.comba015832012-06-30 16:52:05 +02005857if test "x$enable_profiling" = xyes; then
5858 BASECFLAGS="-pg $BASECFLAGS"
5859 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860fi
5861
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5863$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864
5865# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5866# library that we build, but we do not want to link against it (we
5867# will find it with a -framework option). For this reason there is an
5868# extra variable BLDLIBRARY against which Python and the extension
5869# modules are linked, BLDLIBRARY. This is normally the same as
5870# LDLIBRARY, but empty for MacOSX framework builds.
5871if test "$enable_framework"
5872then
5873 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005874 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875 BLDLIBRARY=''
5876else
5877 BLDLIBRARY='$(LDLIBRARY)'
5878fi
5879
5880# Other platforms follow
5881if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005882 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885
5886 case $ac_sys_system in
5887 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005888 LDLIBRARY='libpython$(LDVERSION).dll.a'
5889 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 ;;
5891 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005892 LDLIBRARY='libpython$(LDVERSION).so'
5893 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005894 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005896 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005897 then
5898 PY3LIBRARY=libpython3.so
5899 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005901 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005902 LDLIBRARY='libpython$(LDVERSION).so'
5903 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005904 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005906 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005907 then
5908 PY3LIBRARY=libpython3.so
5909 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
5911 hp*|HP*)
5912 case `uname -m` in
5913 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
5916 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 ;;
5919 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005921 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).dylib'
5925 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005928 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005929 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005930 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005931 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932
5933 esac
5934else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005935 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 case $ac_sys_system in
5937 CYGWIN*)
5938 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 esac
5942fi
5943
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005944if test "$cross_compiling" = yes; then
5945 RUNSHARED=
5946fi
5947
Matthias Kloseb9621712010-04-24 17:59:49 +00005948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5949$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950
5951if test -n "$ac_tool_prefix"; then
5952 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5953set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005956if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958else
5959 if test -n "$RANLIB"; then
5960 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5961else
5962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963for as_dir in $PATH
5964do
5965 IFS=$as_save_IFS
5966 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 break 2
5972 fi
5973done
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975IFS=$as_save_IFS
5976
5977fi
5978fi
5979RANLIB=$ac_cv_prog_RANLIB
5980if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5982$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5985$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986fi
5987
5988
5989fi
5990if test -z "$ac_cv_prog_RANLIB"; then
5991 ac_ct_RANLIB=$RANLIB
5992 # Extract the first word of "ranlib", so it can be a program name with args.
5993set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005996if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998else
5999 if test -n "$ac_ct_RANLIB"; then
6000 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6001else
6002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003for as_dir in $PATH
6004do
6005 IFS=$as_save_IFS
6006 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011 break 2
6012 fi
6013done
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015IFS=$as_save_IFS
6016
6017fi
6018fi
6019ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6020if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6022$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023else
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6025$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026fi
6027
6028 if test "x$ac_ct_RANLIB" = x; then
6029 RANLIB=":"
6030 else
6031 case $cross_compiling:$ac_tool_warned in
6032yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035ac_tool_warned=yes ;;
6036esac
6037 RANLIB=$ac_ct_RANLIB
6038 fi
6039else
6040 RANLIB="$ac_cv_prog_RANLIB"
6041fi
6042
6043
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006044if test -n "$ac_tool_prefix"; then
6045 for ac_prog in ar aal
6046 do
6047 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6048set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6050$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006051if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053else
6054 if test -n "$AR"; then
6055 ac_cv_prog_AR="$AR" # Let the user override the test.
6056else
6057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060 IFS=$as_save_IFS
6061 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006062 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006064 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066 break 2
6067 fi
6068done
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070IFS=$as_save_IFS
6071
6072fi
6073fi
6074AR=$ac_cv_prog_AR
6075if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6077$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078else
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081fi
6082
6083
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006084 test -n "$AR" && break
6085 done
6086fi
6087if test -z "$AR"; then
6088 ac_ct_AR=$AR
6089 for ac_prog in ar aal
6090do
6091 # Extract the first word of "$ac_prog", so it can be a program name with args.
6092set dummy $ac_prog; ac_word=$2
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6094$as_echo_n "checking for $ac_word... " >&6; }
6095if ${ac_cv_prog_ac_ct_AR+:} false; then :
6096 $as_echo_n "(cached) " >&6
6097else
6098 if test -n "$ac_ct_AR"; then
6099 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6100else
6101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104 IFS=$as_save_IFS
6105 test -z "$as_dir" && as_dir=.
6106 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006108 ac_cv_prog_ac_ct_AR="$ac_prog"
6109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110 break 2
6111 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006112done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006113 done
6114IFS=$as_save_IFS
6115
6116fi
6117fi
6118ac_ct_AR=$ac_cv_prog_ac_ct_AR
6119if test -n "$ac_ct_AR"; then
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6121$as_echo "$ac_ct_AR" >&6; }
6122else
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128 test -n "$ac_ct_AR" && break
6129done
6130
6131 if test "x$ac_ct_AR" = x; then
6132 AR="ar"
6133 else
6134 case $cross_compiling:$ac_tool_warned in
6135yes:)
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6138ac_tool_warned=yes ;;
6139esac
6140 AR=$ac_ct_AR
6141 fi
6142fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143
6144
6145# tweak ARFLAGS only if the user didn't set it on the command line
6146
6147if test -z "$ARFLAGS"
6148then
6149 ARFLAGS="rc"
6150fi
6151
doko@ubuntu.com58844492012-06-30 18:25:32 +02006152if test -n "$ac_tool_prefix"; then
6153 for ac_prog in readelf
6154 do
6155 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6156set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6158$as_echo_n "checking for $ac_word... " >&6; }
6159if ${ac_cv_prog_READELF+:} false; then :
6160 $as_echo_n "(cached) " >&6
6161else
6162 if test -n "$READELF"; then
6163 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6164else
6165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH
6167do
6168 IFS=$as_save_IFS
6169 test -z "$as_dir" && as_dir=.
6170 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006172 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6174 break 2
6175 fi
6176done
6177 done
6178IFS=$as_save_IFS
6179
6180fi
6181fi
6182READELF=$ac_cv_prog_READELF
6183if test -n "$READELF"; then
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6185$as_echo "$READELF" >&6; }
6186else
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6188$as_echo "no" >&6; }
6189fi
6190
6191
6192 test -n "$READELF" && break
6193 done
6194fi
6195if test -z "$READELF"; then
6196 ac_ct_READELF=$READELF
6197 for ac_prog in readelf
6198do
6199 # Extract the first word of "$ac_prog", so it can be a program name with args.
6200set dummy $ac_prog; ac_word=$2
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6202$as_echo_n "checking for $ac_word... " >&6; }
6203if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6204 $as_echo_n "(cached) " >&6
6205else
6206 if test -n "$ac_ct_READELF"; then
6207 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6208else
6209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212 IFS=$as_save_IFS
6213 test -z "$as_dir" && as_dir=.
6214 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006215 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006216 ac_cv_prog_ac_ct_READELF="$ac_prog"
6217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6218 break 2
6219 fi
6220done
6221 done
6222IFS=$as_save_IFS
6223
6224fi
6225fi
6226ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6227if test -n "$ac_ct_READELF"; then
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6229$as_echo "$ac_ct_READELF" >&6; }
6230else
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6232$as_echo "no" >&6; }
6233fi
6234
6235
6236 test -n "$ac_ct_READELF" && break
6237done
6238
6239 if test "x$ac_ct_READELF" = x; then
6240 READELF=":"
6241 else
6242 case $cross_compiling:$ac_tool_warned in
6243yes:)
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6245$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6246ac_tool_warned=yes ;;
6247esac
6248 READELF=$ac_ct_READELF
6249 fi
6250fi
6251
6252if test "$cross_compiling" = yes; then
6253 case "$READELF" in
6254 readelf|:)
6255 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6256 ;;
6257 esac
6258fi
6259
6260
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006261
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262case $MACHDEP in
6263bsdos*|hp*|HP*)
6264 # install -d does not work on BSDI or HP-UX
6265 if test -z "$INSTALL"
6266 then
6267 INSTALL="${srcdir}/install-sh -c"
6268 fi
6269esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270# Find a good install program. We prefer a C program (faster),
6271# so one script is as good as another. But avoid the broken or
6272# incompatible versions:
6273# SysV /etc/install, /usr/sbin/install
6274# SunOS /usr/etc/install
6275# IRIX /sbin/install
6276# AIX /bin/install
6277# AmigaOS /C/install, which installs bootblocks on floppy discs
6278# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6279# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6280# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6281# OS/2's system install, which has a completely different semantic
6282# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006283# Reject install programs that cannot install multiple files.
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6285$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006286if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006287if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289else
6290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6291for as_dir in $PATH
6292do
6293 IFS=$as_save_IFS
6294 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 # Account for people who put trailing slashes in PATH elements.
6296case $as_dir/ in #((
6297 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006299 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300 /usr/ucb/* ) ;;
6301 *)
6302 # OSF1 and SCO ODT 3.0 have their own names for install.
6303 # Don't use installbsd from OSF since it installs stuff as root
6304 # by default.
6305 for ac_prog in ginstall scoinst install; do
6306 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006307 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 if test $ac_prog = install &&
6309 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6310 # AIX install. It has an incompatible calling convention.
6311 :
6312 elif test $ac_prog = install &&
6313 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6314 # program-specific install script used by HP pwplus--don't use.
6315 :
6316 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 rm -rf conftest.one conftest.two conftest.dir
6318 echo one > conftest.one
6319 echo two > conftest.two
6320 mkdir conftest.dir
6321 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6322 test -s conftest.one && test -s conftest.two &&
6323 test -s conftest.dir/conftest.one &&
6324 test -s conftest.dir/conftest.two
6325 then
6326 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6327 break 3
6328 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 fi
6330 fi
6331 done
6332 done
6333 ;;
6334esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006335
6336 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337IFS=$as_save_IFS
6338
Matthias Kloseb9621712010-04-24 17:59:49 +00006339rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340
6341fi
6342 if test "${ac_cv_path_install+set}" = set; then
6343 INSTALL=$ac_cv_path_install
6344 else
6345 # As a last resort, use the slow shell script. Don't cache a
6346 # value for INSTALL within a source directory, because that will
6347 # break other packages using the cache if that directory is
6348 # removed, or if the value is a relative name.
6349 INSTALL=$ac_install_sh
6350 fi
6351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6353$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006354
6355# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6356# It thinks the first close brace ends the variable substitution.
6357test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6358
6359test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6360
6361test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6362
Matthias Klose93a0ef12012-03-15 18:08:34 +01006363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6364$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6365if test -z "$MKDIR_P"; then
6366 if ${ac_cv_path_mkdir+:} false; then :
6367 $as_echo_n "(cached) " >&6
6368else
6369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6371do
6372 IFS=$as_save_IFS
6373 test -z "$as_dir" && as_dir=.
6374 for ac_prog in mkdir gmkdir; do
6375 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006376 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006377 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6378 'mkdir (GNU coreutils) '* | \
6379 'mkdir (coreutils) '* | \
6380 'mkdir (fileutils) '4.1*)
6381 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6382 break 3;;
6383 esac
6384 done
6385 done
6386 done
6387IFS=$as_save_IFS
6388
6389fi
6390
6391 test -d ./--version && rmdir ./--version
6392 if test "${ac_cv_path_mkdir+set}" = set; then
6393 MKDIR_P="$ac_cv_path_mkdir -p"
6394 else
6395 # As a last resort, use the slow shell script. Don't cache a
6396 # value for MKDIR_P within a source directory, because that will
6397 # break other packages using the cache if that directory is
6398 # removed, or if the value is a relative name.
6399 MKDIR_P="$ac_install_sh -d"
6400 fi
6401fi
6402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6403$as_echo "$MKDIR_P" >&6; }
6404
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405
6406# Not every filesystem supports hard links
6407
6408if test -z "$LN" ; then
6409 case $ac_sys_system in
6410 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411 *) LN=ln;;
6412 esac
6413fi
6414
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006415# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006416
6417ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6421$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422
6423# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006424if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425 withval=$with_pydebug;
6426if test "$withval" != no
6427then
6428
Matthias Kloseb9621712010-04-24 17:59:49 +00006429$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430
Matthias Kloseb9621712010-04-24 17:59:49 +00006431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6432$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006434 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006435else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437fi
6438else
Matthias Kloseb9621712010-04-24 17:59:49 +00006439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6440$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441fi
6442
6443
T. Woutersddbfa2c2017-05-23 01:30:49 +02006444# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6445# the ABI. This allows enabling assertions without changing the ABI.
6446assertions='false'
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6448$as_echo_n "checking for --with-assertions... " >&6; }
6449
6450# Check whether --with-assertions was given.
6451if test "${with_assertions+set}" = set; then :
6452 withval=$with_assertions;
6453if test "$withval" != no
6454then
6455 assertions='true'
6456fi
6457fi
6458
6459if test "$assertions" = 'true'; then
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6461$as_echo "yes" >&6; }
6462elif test "$Py_DEBUG" = 'true'; then
6463 assertions='true'
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6465$as_echo "implied by --with-pydebug" >&6; }
6466else
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }
6469fi
6470
Brett Cannon63d98bc2016-09-06 17:12:40 -07006471# Enable optimization flags
6472
6473
6474Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6476$as_echo_n "checking for --enable-optimizations... " >&6; }
6477# Check whether --enable-optimizations was given.
6478if test "${enable_optimizations+set}" = set; then :
6479 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006480if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006481then
6482 Py_OPT='true'
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6484$as_echo "yes" >&6; };
6485else
6486 Py_OPT='false'
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; };
6489fi
6490else
6491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492$as_echo "no" >&6; }
6493fi
6494
6495if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006496 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6497 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006498 # 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 +00006499 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006500 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006501 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006502 DEF_MAKE_RULE="build_all"
6503else
6504 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006505 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006506 DEF_MAKE_RULE="all"
6507fi
6508
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006509# Enable LTO flags
6510
6511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6512$as_echo_n "checking for --with-lto... " >&6; }
6513
6514# Check whether --with-lto was given.
6515if test "${with_lto+set}" = set; then :
6516 withval=$with_lto;
6517if test "$withval" != no
6518then
6519 Py_LTO='true'
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6521$as_echo "yes" >&6; };
6522else
6523 Py_LTO='false'
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525$as_echo "no" >&6; };
6526fi
6527else
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531
6532if test "$Py_LTO" = 'true' ; then
6533 case $CC in
6534 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006535 case $ac_sys_system in
6536 Darwin*)
6537 # Any changes made here should be reflected in the GCC+Darwin case below
6538 LTOFLAGS="-flto -Wl,-export_dynamic"
6539 ;;
6540 *)
6541 LTOFLAGS="-flto"
6542 ;;
6543 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006544 ;;
6545 *gcc*)
6546 case $ac_sys_system in
6547 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006548 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006549 ;;
6550 *)
6551 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6552 ;;
6553 esac
6554 ;;
6555 esac
6556fi
6557
Brett Cannon7188a3e2015-09-18 15:13:44 -07006558# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006559
6560
6561
6562
6563
Gregory P. Smith799520c2016-09-07 16:10:00 -07006564# Make this work on systems where llvm tools are not installed with their
6565# normal names in the default $PATH (ie: Ubuntu). They exist under the
6566# non-suffixed name in their versioned llvm directory.
6567llvm_bin_dir=''
6568llvm_path="${PATH}"
6569if test "${CC}" = "clang"
6570then
6571 clang_bin=`which clang`
6572 # Some systems install clang elsewhere as a symlink to the real path
6573 # which is where the related llvm tools are located.
6574 if test -L "${clang_bin}"
6575 then
6576 clang_dir=`dirname "${clang_bin}"`
6577 clang_bin=`readlink "${clang_bin}"`
6578 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6579 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6580 fi
6581fi
Zachary Ware5af85642015-12-21 12:09:17 -06006582
Gregory P. Smith799520c2016-09-07 16:10:00 -07006583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6584$as_echo_n "checking target system type... " >&6; }
6585if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006586 $as_echo_n "(cached) " >&6
6587else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006588 if test "x$target_alias" = x; then
6589 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006590else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006591 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6592 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6593fi
6594
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6597$as_echo "$ac_cv_target" >&6; }
6598case $ac_cv_target in
6599*-*-*) ;;
6600*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6601esac
6602target=$ac_cv_target
6603ac_save_IFS=$IFS; IFS='-'
6604set x $ac_cv_target
6605shift
6606target_cpu=$1
6607target_vendor=$2
6608shift; shift
6609# Remember, the first character of IFS is used to create $*,
6610# except with old shells:
6611target_os=$*
6612IFS=$ac_save_IFS
6613case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6614
6615
6616# The aliases save the names the user supplied, while $host etc.
6617# will get canonicalized.
6618test -n "$target_alias" &&
6619 test "$program_prefix$program_suffix$program_transform_name" = \
6620 NONENONEs,x,x, &&
6621 program_prefix=${target_alias}-
6622# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6623set dummy $target_alias-llvm-profdata; ac_word=$2
6624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6625$as_echo_n "checking for $ac_word... " >&6; }
6626if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6627 $as_echo_n "(cached) " >&6
6628else
6629 case $LLVM_PROFDATA in
6630 [\\/]* | ?:[\\/]*)
6631 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6632 ;;
6633 *)
6634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6635for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006636do
6637 IFS=$as_save_IFS
6638 test -z "$as_dir" && as_dir=.
6639 for ac_exec_ext in '' $ac_executable_extensions; do
6640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006641 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6643 break 2
6644 fi
6645done
6646 done
6647IFS=$as_save_IFS
6648
Gregory P. Smith799520c2016-09-07 16:10:00 -07006649 ;;
6650esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006651fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006652LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6653if test -n "$LLVM_PROFDATA"; then
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6655$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656else
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6658$as_echo "no" >&6; }
6659fi
6660
6661
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6663 if test "$build" = "$target"; then
6664 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6665 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6666set dummy llvm-profdata; ac_word=$2
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668$as_echo_n "checking for $ac_word... " >&6; }
6669if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6670 $as_echo_n "(cached) " >&6
6671else
6672 case $ac_pt_LLVM_PROFDATA in
6673 [\\/]* | ?:[\\/]*)
6674 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6675 ;;
6676 *)
6677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678for as_dir in ${llvm_path}
6679do
6680 IFS=$as_save_IFS
6681 test -z "$as_dir" && as_dir=.
6682 for ac_exec_ext in '' $ac_executable_extensions; do
6683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6684 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686 break 2
6687 fi
6688done
6689 done
6690IFS=$as_save_IFS
6691
6692 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6693 ;;
6694esac
6695fi
6696ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6697if test -n "$ac_pt_LLVM_PROFDATA"; then
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6699$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6700else
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702$as_echo "no" >&6; }
6703fi
6704
6705 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6706 else
6707 LLVM_PROFDATA="''"
6708 fi
6709else
6710 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6711fi
6712
6713
6714if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6715then
6716 LLVM_PROF_FOUND="found"
6717else
6718 LLVM_PROF_FOUND="not-found"
6719fi
6720if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6721then
6722 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6723 if test -n "${found_llvm_profdata}"
6724 then
6725 # llvm-profdata isn't directly in $PATH in some cases.
6726 # https://apple.stackexchange.com/questions/197053/
6727 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6728 LLVM_PROF_FOUND=found
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6730$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6731 fi
6732fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006733LLVM_PROF_ERR=no
6734case $CC in
6735 *clang*)
6736 # Any changes made here should be reflected in the GCC+Darwin case below
6737 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6738 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006739 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006740 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6741 if test $LLVM_PROF_FOUND = not-found
6742 then
6743 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 if test "${REQUIRE_PGO}" = "yes"
6745 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006746 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 -07006747 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006748 fi
6749 ;;
6750 *gcc*)
6751 case $ac_sys_system in
6752 Darwin*)
6753 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6754 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006755 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006756 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006757 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006758 then
6759 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 if test "${REQUIRE_PGO}" = "yes"
6761 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006762 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 -07006763 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006764 fi
6765 ;;
6766 *)
6767 PGO_PROF_GEN_FLAG="-fprofile-generate"
6768 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6769 LLVM_PROF_MERGER="true"
6770 LLVM_PROF_FILE=""
6771 ;;
6772 esac
6773 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006774 *icc*)
6775 PGO_PROF_GEN_FLAG="-prof-gen"
6776 PGO_PROF_USE_FLAG="-prof-use"
6777 LLVM_PROF_MERGER="true"
6778 LLVM_PROF_FILE=""
6779 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006780esac
6781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006782# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6783# merged with this chunk of code?
6784
6785# Optimizer/debugger flags
6786# ------------------------
6787# (The following bit of code is complicated enough - please keep things
6788# indented properly. Just pretend you're editing Python code. ;-)
6789
6790# There are two parallel sets of case statements below, one that checks to
6791# see if OPT was set and one that does BASECFLAGS setting based upon
6792# compiler and platform. BASECFLAGS tweaks need to be made even if the
6793# user set OPT.
6794
6795# tweak OPT based on compiler and platform, only if the user didn't set
6796# it on the command line
6797
Victor Stinner9ed34a82017-05-02 22:35:58 +02006798
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006799if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800then
6801 case $GCC in
6802 yes)
6803 if test "$CC" != 'g++' ; then
6804 STRICT_PROTO="-Wstrict-prototypes"
6805 fi
6806 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6807 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6808 WRAP="-fwrapv"
6809 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006810
Stefan Krahaf04ff22011-12-08 22:20:31 +01006811 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006812 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006813 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006814 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006815 *)
6816 if $CC --version 2>&1 | grep -q clang
6817 then
6818 cc_is_clang=1
6819 else
6820 cc_is_clang=
6821 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006822 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006823
Victor Stinner35f3d242017-04-21 12:35:24 +02006824 if test -n "${cc_is_clang}"
6825 then
6826 # Clang also needs -fwrapv
6827 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006828 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6829 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006830 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006831 fi
6832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833 case $ac_cv_prog_cc_g in
6834 yes)
6835 if test "$Py_DEBUG" = 'true' ; then
6836 # Optimization messes up debuggers, so turn it off for
6837 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006838 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006839 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006840 else
Victor Stinner28205b22017-04-21 11:24:34 +02006841 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006842 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843 else
Victor Stinner28205b22017-04-21 11:24:34 +02006844 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845 fi
6846 ;;
6847 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006848 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 ;;
6850 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006851
Victor Stinner826f83f2017-04-28 15:07:10 +02006852 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854 case $ac_sys_system in
6855 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6856 ;;
6857 esac
6858 ;;
6859
6860 *)
6861 OPT="-O"
6862 ;;
6863 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864fi
6865
6866
6867
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006868
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869# The -arch flags for universal builds on OSX
6870UNIVERSAL_ARCH_FLAGS=
6871
6872
6873# tweak BASECFLAGS based on compiler and platform
6874case $GCC in
6875yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006876 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006877
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6879$as_echo_n "checking for -Wextra... " >&6; }
6880 ac_save_cc="$CC"
6881 CC="$CC -Wextra -Werror"
6882 if ${ac_cv_extra_warnings+:} false; then :
6883 $as_echo_n "(cached) " >&6
6884else
6885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6886/* end confdefs.h. */
6887
6888
6889int
6890main ()
6891{
6892
6893 ;
6894 return 0;
6895}
6896
6897_ACEOF
6898if ac_fn_c_try_compile "$LINENO"; then :
6899
6900 ac_cv_extra_warnings=yes
6901
6902else
6903
6904 ac_cv_extra_warnings=no
6905
6906fi
6907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6908fi
6909
6910 CC="$ac_save_cc"
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6912$as_echo "$ac_cv_extra_warnings" >&6; }
6913
6914 if test $ac_cv_extra_warnings = yes
6915 then
6916 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6917 fi
6918
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006919 # Python doesn't violate C99 aliasing rules, but older versions of
6920 # GCC produce warnings for legal Python code. Enable
6921 # -fno-strict-aliasing on versions of GCC that support but produce
6922 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6924$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925 ac_save_cc="$CC"
6926 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006927 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006928 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006930else
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006933
Matthias Kloseb159a552010-04-25 21:00:44 +00006934
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006935int
6936main ()
6937{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006938
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006939 ;
6940 return 0;
6941}
Matthias Kloseb159a552010-04-25 21:00:44 +00006942
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006944if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006945
6946 CC="$ac_save_cc -fstrict-aliasing"
6947 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006949/* end confdefs.h. */
6950
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006951 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006952int
6953main ()
6954{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006955double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006956 ;
6957 return 0;
6958}
Matthias Kloseb159a552010-04-25 21:00:44 +00006959
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006961if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006962
6963 ac_cv_no_strict_aliasing=no
6964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006965else
Matthias Kloseb159a552010-04-25 21:00:44 +00006966
6967 ac_cv_no_strict_aliasing=yes
6968
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006969fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006971
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006972else
Matthias Kloseb159a552010-04-25 21:00:44 +00006973
6974 ac_cv_no_strict_aliasing=no
6975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006978fi
6979
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6983$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985 then
6986 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6987 fi
6988
Zachary Ware5af85642015-12-21 12:09:17 -06006989 # ICC doesn't recognize the option, but only emits a warning
6990 ## XXX does it emit an unused result warning and can it be disabled?
6991 case "$CC" in
6992 *icc*)
6993 ac_cv_disable_unused_result_warning=no
6994 ;;
6995 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6997$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6998 ac_save_cc="$CC"
6999 CC="$CC -Wunused-result -Werror"
7000 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007001 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007002 $as_echo_n "(cached) " >&6
7003else
7004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7005/* end confdefs.h. */
7006
7007
7008int
7009main ()
7010{
7011
7012 ;
7013 return 0;
7014}
7015
7016_ACEOF
7017if ac_fn_c_try_compile "$LINENO"; then :
7018
7019 ac_cv_disable_unused_result_warning=yes
7020
7021else
7022
7023 ac_cv_disable_unused_result_warning=no
7024
7025fi
7026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7027fi
7028
7029 CFLAGS="$save_CFLAGS"
7030 CC="$ac_save_cc"
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7032$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007033 ;;
7034 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007035
7036 if test $ac_cv_disable_unused_result_warning = yes
7037 then
7038 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007039 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7040 fi
7041
7042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7043$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7044 ac_save_cc="$CC"
7045 CC="$CC -Wunused-parameter -Werror"
7046 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7047 $as_echo_n "(cached) " >&6
7048else
7049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7050/* end confdefs.h. */
7051
7052
7053int
7054main ()
7055{
7056
7057 ;
7058 return 0;
7059}
7060
7061_ACEOF
7062if ac_fn_c_try_compile "$LINENO"; then :
7063
7064 ac_cv_disable_unused_parameter_warning=yes
7065
7066else
7067
7068 ac_cv_disable_unused_parameter_warning=no
7069
7070fi
7071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7072fi
7073
7074 CC="$ac_save_cc"
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7076$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7077
7078 if test $ac_cv_disable_unused_parameter_warning = yes
7079 then
7080 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7081 fi
7082
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7084$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7085 ac_save_cc="$CC"
7086 CC="$CC -Wmissing-field-initializers -Werror"
7087 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7088 $as_echo_n "(cached) " >&6
7089else
7090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091/* end confdefs.h. */
7092
7093
7094int
7095main ()
7096{
7097
7098 ;
7099 return 0;
7100}
7101
7102_ACEOF
7103if ac_fn_c_try_compile "$LINENO"; then :
7104
7105 ac_cv_disable_missing_field_initializers=yes
7106
7107else
7108
7109 ac_cv_disable_missing_field_initializers=no
7110
7111fi
7112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7113fi
7114
7115 CC="$ac_save_cc"
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7117$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7118
7119 if test $ac_cv_disable_missing_field_initializers = yes
7120 then
7121 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007122 fi
7123
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7125$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7126 ac_save_cc="$CC"
7127 CC="$CC -Wsign-compare"
7128 save_CFLAGS="$CFLAGS"
7129 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7130 $as_echo_n "(cached) " >&6
7131else
7132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7133/* end confdefs.h. */
7134
7135
7136int
7137main ()
7138{
7139
7140 ;
7141 return 0;
7142}
7143
7144_ACEOF
7145if ac_fn_c_try_compile "$LINENO"; then :
7146
7147 ac_cv_enable_sign_compare_warning=yes
7148
7149else
7150
7151 ac_cv_enable_sign_compare_warning=no
7152
7153fi
7154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7155fi
7156
7157 CFLAGS="$save_CFLAGS"
7158 CC="$ac_save_cc"
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7160$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7161
7162 if test $ac_cv_enable_sign_compare_warning = yes
7163 then
7164 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7165 fi
7166
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7168$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7169 ac_save_cc="$CC"
7170 CC="$CC -Wunreachable-code"
7171 save_CFLAGS="$CFLAGS"
7172 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7173 $as_echo_n "(cached) " >&6
7174else
7175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7176/* end confdefs.h. */
7177
7178
7179int
7180main ()
7181{
7182
7183 ;
7184 return 0;
7185}
7186
7187_ACEOF
7188if ac_fn_c_try_compile "$LINENO"; then :
7189
7190 ac_cv_enable_unreachable_code_warning=yes
7191
7192else
7193
7194 ac_cv_enable_unreachable_code_warning=no
7195
7196fi
7197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7198fi
7199
7200 CFLAGS="$save_CFLAGS"
7201 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007202
7203 # Don't enable unreachable code warning in debug mode, since it usually
7204 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007205 # Issue #24324: Unfortunately, the unreachable code warning does not work
7206 # correctly on gcc and has been silently removed from the compiler.
7207 # It is supported on clang but on OS X systems gcc may be an alias
7208 # for clang. Try to determine if the compiler is not really gcc and,
7209 # if so, only then enable the warning.
7210 if test $ac_cv_enable_unreachable_code_warning = yes && \
7211 test "$Py_DEBUG" != "true" && \
7212 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007213 then
7214 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007215 else
7216 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007217 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7219$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007220
Victor Stinner193ee0a2017-02-06 14:24:00 +01007221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7222$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7223 ac_save_cc="$CC"
7224 CC="$CC -Werror=implicit-function-declaration"
7225 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7226 $as_echo_n "(cached) " >&6
7227else
7228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7229/* end confdefs.h. */
7230
7231
7232int
7233main ()
7234{
7235
7236 ;
7237 return 0;
7238}
7239
7240_ACEOF
7241if ac_fn_c_try_compile "$LINENO"; then :
7242
7243 ac_cv_enable_implicit_function_declaration_error=yes
7244
7245else
7246
7247 ac_cv_enable_implicit_function_declaration_error=no
7248
7249fi
7250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7251fi
7252
7253 CC="$ac_save_cc"
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7255$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7256
7257 if test $ac_cv_enable_implicit_function_declaration_error = yes
7258 then
7259 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7260 fi
7261
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7263 # support. Without this, treatment of subnormals doesn't follow
7264 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007265 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266 alpha*)
7267 BASECFLAGS="$BASECFLAGS -mieee"
7268 ;;
7269 esac
7270
7271 case $ac_sys_system in
7272 SCO_SV*)
7273 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7274 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007275
7276 # is there any other compiler on Darwin besides gcc?
7277 Darwin*)
7278 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7279 # used to be here, but non-Apple gcc doesn't accept them.
7280 if test "${CC}" = gcc
7281 then
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007283$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007284 case "${UNIVERSALSDK}" in
7285 */MacOSX10.4u.sdk)
7286 # Build using 10.4 SDK, force usage of gcc when the
7287 # compiler is gcc, otherwise the user will get very
7288 # confusing error messages when building on OSX 10.6
7289 CC=gcc-4.0
7290 CPP=cpp-4.0
7291 ;;
7292 esac
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007294$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007295 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296
Ned Deily87adb6e2013-10-18 21:09:56 -07007297 if test "${enable_universalsdk}"
7298 then
7299 case "$UNIVERSAL_ARCHS" in
7300 32-bit)
7301 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7302 LIPO_32BIT_FLAGS=""
7303 ARCH_RUN_32BIT=""
7304 ;;
7305 64-bit)
7306 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7307 LIPO_32BIT_FLAGS=""
7308 ARCH_RUN_32BIT="true"
7309 ;;
7310 all)
7311 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7312 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7313 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7314 ;;
7315 intel)
7316 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7317 LIPO_32BIT_FLAGS="-extract i386"
7318 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7319 ;;
7320 intel-32)
7321 UNIVERSAL_ARCH_FLAGS="-arch i386"
7322 LIPO_32BIT_FLAGS=""
7323 ARCH_RUN_32BIT=""
7324 ;;
7325 3-way)
7326 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7327 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7328 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7329 ;;
7330 *)
7331 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7332 ;;
7333 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334
Ned Deily87adb6e2013-10-18 21:09:56 -07007335 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7336 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7337 if test "${UNIVERSALSDK}" != "/"
7338 then
7339 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7340 fi
7341 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342
Ned Deily87adb6e2013-10-18 21:09:56 -07007343 # Calculate an appropriate deployment target for this build:
7344 # The deployment target value is used explicitly to enable certain
7345 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007346 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007347 # component of the string returned by distutils.get_platform().
7348 #
7349 # Use the value from:
7350 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7351 # 2. the operating system version of the build machine if >= 10.6
7352 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7353 # below to pick either 10.3, 10.4, or 10.5 as the target.
7354 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355
Ned Deily87adb6e2013-10-18 21:09:56 -07007356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7357$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007358 cur_target_major=`sw_vers -productVersion | \
7359 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7360 cur_target_minor=`sw_vers -productVersion | \
7361 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7362 cur_target="${cur_target_major}.${cur_target_minor}"
7363 if test ${cur_target_major} -eq 10 && \
7364 test ${cur_target_minor} -ge 3 && \
7365 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007366 then
Ned Deily36820b62014-06-25 13:44:22 -07007367 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007368 cur_target=10.3
7369 if test ${enable_universalsdk}
7370 then
7371 case "$UNIVERSAL_ARCHS" in
7372 all|3-way|intel|64-bit)
7373 # These configurations were first supported in 10.5
7374 cur_target='10.5'
7375 ;;
7376 esac
7377 else
7378 if test `/usr/bin/arch` = "i386"
7379 then
7380 # 10.4 was the first release to support Intel archs
7381 cur_target="10.4"
7382 fi
7383 fi
7384 fi
7385 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007386
Ned Deily87adb6e2013-10-18 21:09:56 -07007387 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7388 # environment with a value that is the same as what we'll use
7389 # in the Makefile to ensure that we'll get the same compiler
7390 # environment during configure and build time.
7391 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7392 export MACOSX_DEPLOYMENT_TARGET
7393 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7395$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007396
Ned Deily87adb6e2013-10-18 21:09:56 -07007397 # end of Darwin* tests
7398 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399 esac
7400 ;;
7401
7402*)
7403 case $ac_sys_system in
7404 OpenUNIX*|UnixWare*)
7405 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7406 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407 SCO_SV*)
7408 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7409 ;;
7410 esac
7411 ;;
7412esac
7413
Zachary Ware5af85642015-12-21 12:09:17 -06007414# ICC needs -fp-model strict or floats behave badly
7415case "$CC" in
7416*icc*)
7417 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7418 ;;
7419esac
7420
T. Woutersddbfa2c2017-05-23 01:30:49 +02007421if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422 :
7423else
7424 OPT="-DNDEBUG $OPT"
7425fi
7426
7427if test "$ac_arch_flags"
7428then
7429 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7430fi
7431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432# On some compilers, pthreads are available without further options
7433# (e.g. MacOS X). On some of these systems, the compiler will not
7434# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7435# So we have to see first whether pthreads are available without
7436# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7438$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007439if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441else
Matthias Kloseb9621712010-04-24 17:59:49 +00007442 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443 ac_cv_pthread_is_default=no
7444else
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446/* end confdefs.h. */
7447
Stefan Krah7dba5942012-11-22 22:49:11 +01007448#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449#include <pthread.h>
7450
7451void* routine(void* p){return NULL;}
7452
7453int main(){
7454 pthread_t p;
7455 if(pthread_create(&p,NULL,routine,NULL)!=0)
7456 return 1;
7457 (void)pthread_detach(p);
7458 return 0;
7459}
7460
7461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007462if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463
7464 ac_cv_pthread_is_default=yes
7465 ac_cv_kthread=no
7466 ac_cv_pthread=no
7467
7468else
Matthias Kloseb9621712010-04-24 17:59:49 +00007469 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7472 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473fi
7474
7475
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476fi
7477
Matthias Kloseb9621712010-04-24 17:59:49 +00007478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7479$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480
7481
7482if test $ac_cv_pthread_is_default = yes
7483then
7484 ac_cv_kpthread=no
7485else
7486# -Kpthread, if available, provides the right #defines
7487# and linker options to make pthread_create available
7488# Some compilers won't report that they do not support -Kpthread,
7489# so we need to run a program to see whether it really made the
7490# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7492$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007493if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495else
7496 ac_save_cc="$CC"
7497CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007498if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499 ac_cv_kpthread=no
7500else
Matthias Kloseb9621712010-04-24 17:59:49 +00007501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502/* end confdefs.h. */
7503
Stefan Krah7dba5942012-11-22 22:49:11 +01007504#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505#include <pthread.h>
7506
7507void* routine(void* p){return NULL;}
7508
7509int main(){
7510 pthread_t p;
7511 if(pthread_create(&p,NULL,routine,NULL)!=0)
7512 return 1;
7513 (void)pthread_detach(p);
7514 return 0;
7515}
7516
7517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007518if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519 ac_cv_kpthread=yes
7520else
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7524 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525fi
7526
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527CC="$ac_save_cc"
7528fi
7529
Matthias Kloseb9621712010-04-24 17:59:49 +00007530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7531$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532fi
7533
7534if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7535then
7536# -Kthread, if available, provides the right #defines
7537# and linker options to make pthread_create available
7538# Some compilers won't report that they do not support -Kthread,
7539# so we need to run a program to see whether it really made the
7540# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7542$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007543if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545else
7546 ac_save_cc="$CC"
7547CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007548if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549 ac_cv_kthread=no
7550else
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552/* end confdefs.h. */
7553
Stefan Krah7dba5942012-11-22 22:49:11 +01007554#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555#include <pthread.h>
7556
7557void* routine(void* p){return NULL;}
7558
7559int main(){
7560 pthread_t p;
7561 if(pthread_create(&p,NULL,routine,NULL)!=0)
7562 return 1;
7563 (void)pthread_detach(p);
7564 return 0;
7565}
7566
7567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007568if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569 ac_cv_kthread=yes
7570else
Matthias Kloseb9621712010-04-24 17:59:49 +00007571 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7574 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575fi
7576
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577CC="$ac_save_cc"
7578fi
7579
Matthias Kloseb9621712010-04-24 17:59:49 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7581$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582fi
7583
7584if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7585then
7586# -pthread, if available, provides the right #defines
7587# and linker options to make pthread_create available
7588# Some compilers won't report that they do not support -pthread,
7589# so we need to run a program to see whether it really made the
7590# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7592$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007593if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595else
7596 ac_save_cc="$CC"
7597CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007598if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599 ac_cv_pthread=no
7600else
Matthias Kloseb9621712010-04-24 17:59:49 +00007601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602/* end confdefs.h. */
7603
Stefan Krah7dba5942012-11-22 22:49:11 +01007604#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605#include <pthread.h>
7606
7607void* routine(void* p){return NULL;}
7608
7609int main(){
7610 pthread_t p;
7611 if(pthread_create(&p,NULL,routine,NULL)!=0)
7612 return 1;
7613 (void)pthread_detach(p);
7614 return 0;
7615}
7616
7617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007618if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619 ac_cv_pthread=yes
7620else
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7624 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625fi
7626
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627CC="$ac_save_cc"
7628fi
7629
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7631$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632fi
7633
7634# If we have set a CC compiler flag for thread support then
7635# check if it works for CXX, too.
7636ac_cv_cxx_thread=no
7637if test ! -z "$CXX"
7638then
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7640$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641ac_save_cxx="$CXX"
7642
7643if test "$ac_cv_kpthread" = "yes"
7644then
7645 CXX="$CXX -Kpthread"
7646 ac_cv_cxx_thread=yes
7647elif test "$ac_cv_kthread" = "yes"
7648then
7649 CXX="$CXX -Kthread"
7650 ac_cv_cxx_thread=yes
7651elif test "$ac_cv_pthread" = "yes"
7652then
7653 CXX="$CXX -pthread"
7654 ac_cv_cxx_thread=yes
7655fi
7656
7657if test $ac_cv_cxx_thread = yes
7658then
7659 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7660 $CXX -c conftest.$ac_ext 2>&5
7661 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7662 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7663 then
7664 ac_cv_cxx_thread=yes
7665 else
7666 ac_cv_cxx_thread=no
7667 fi
7668 rm -fr conftest*
7669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7671$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007672fi
7673CXX="$ac_save_cxx"
7674
7675
7676# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7678$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007679if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683/* end confdefs.h. */
7684#include <stdlib.h>
7685#include <stdarg.h>
7686#include <string.h>
7687#include <float.h>
7688
7689int
7690main ()
7691{
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007697if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698 ac_cv_header_stdc=yes
7699else
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7703
7704if test $ac_cv_header_stdc = yes; then
7705 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707/* end confdefs.h. */
7708#include <string.h>
7709
7710_ACEOF
7711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 $EGREP "memchr" >/dev/null 2>&1; then :
7713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714else
7715 ac_cv_header_stdc=no
7716fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007717rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718
7719fi
7720
7721if test $ac_cv_header_stdc = yes; then
7722 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724/* end confdefs.h. */
7725#include <stdlib.h>
7726
7727_ACEOF
7728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 $EGREP "free" >/dev/null 2>&1; then :
7730
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731else
7732 ac_cv_header_stdc=no
7733fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007734rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735
7736fi
7737
7738if test $ac_cv_header_stdc = yes; then
7739 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741 :
7742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744/* end confdefs.h. */
7745#include <ctype.h>
7746#include <stdlib.h>
7747#if ((' ' & 0x0FF) == 0x020)
7748# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7749# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7750#else
7751# define ISLOWER(c) \
7752 (('a' <= (c) && (c) <= 'i') \
7753 || ('j' <= (c) && (c) <= 'r') \
7754 || ('s' <= (c) && (c) <= 'z'))
7755# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7756#endif
7757
7758#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7759int
7760main ()
7761{
7762 int i;
7763 for (i = 0; i < 256; i++)
7764 if (XOR (islower (i), ISLOWER (i))
7765 || toupper (i) != TOUPPER (i))
7766 return 2;
7767 return 0;
7768}
7769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007770if ac_fn_c_try_run "$LINENO"; then :
7771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772else
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777fi
7778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779fi
7780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7782$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783if test $ac_cv_header_stdc = yes; then
7784
Matthias Kloseb9621712010-04-24 17:59:49 +00007785$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786
7787fi
7788
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007789for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007790fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007791ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007792sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007793unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007794poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007795sys/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 +01007796sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007797sys/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 +01007798sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007799sys/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 -07007800libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007801linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007802sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007803do :
7804 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7805ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007806if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007808#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007809_ACEOF
7810
7811fi
7812
Guido van Rossum627b2d71993-12-24 10:39:16 +00007813done
7814
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007815ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007816for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7819$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007820if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007824/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007825#include <sys/types.h>
7826#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007827
Martin v. Löwis11437992002-04-12 09:54:03 +00007828int
7829main ()
7830{
7831if ((DIR *) 0)
7832return 0;
7833 ;
7834 return 0;
7835}
7836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007837if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007838 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844eval ac_res=\$$as_ac_Header
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7846$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007847if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007849#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007850_ACEOF
7851
7852ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007854
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007855done
7856# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7857if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7859$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007860if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007862else
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867/* Override any GCC internal prototype to avoid an error.
7868 Use char because int might match the return type of a GCC
7869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007870#ifdef __cplusplus
7871extern "C"
7872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007873char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007874int
7875main ()
7876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 ;
7879 return 0;
7880}
7881_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882for ac_lib in '' dir; do
7883 if test -z "$ac_lib"; then
7884 ac_res="none required"
7885 else
7886 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007887 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892rm -f core conftest.err conftest.$ac_objext \
7893 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007894 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897done
Victor Stinnere0be4232011-10-25 13:06:09 +02007898if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900else
7901 ac_cv_search_opendir=no
7902fi
7903rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007904LIBS=$ac_func_search_save_LIBS
7905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7907$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007909if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007911
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007912fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007913
Michael W. Hudson54241132001-12-07 15:38:26 +00007914else
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7916$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007917if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007919else
7920 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924/* Override any GCC internal prototype to avoid an error.
7925 Use char because int might match the return type of a GCC
7926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927#ifdef __cplusplus
7928extern "C"
7929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007930char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 ;
7936 return 0;
7937}
7938_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939for ac_lib in '' x; do
7940 if test -z "$ac_lib"; then
7941 ac_res="none required"
7942 else
7943 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007944 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007949rm -f core conftest.err conftest.$ac_objext \
7950 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007951 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954done
Victor Stinnere0be4232011-10-25 13:06:09 +02007955if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957else
7958 ac_cv_search_opendir=no
7959fi
7960rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007961LIBS=$ac_func_search_save_LIBS
7962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7964$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007966if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007968
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007969fi
7970
7971fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007972
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7974$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007975if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007977else
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007979/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007980#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007981int
7982main ()
7983{
7984return makedev(0, 0);
7985 ;
7986 return 0;
7987}
7988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007990 ac_cv_header_sys_types_h_makedev=yes
7991else
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994rm -f core conftest.err conftest.$ac_objext \
7995 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007996
7997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7999$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008000
8001if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008002ac_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 +02008003if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008004
Matthias Kloseb9621712010-04-24 17:59:49 +00008005$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008006
8007fi
8008
8009
8010
8011 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 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 +02008013if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008014
Matthias Kloseb9621712010-04-24 17:59:49 +00008015$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008016
8017fi
8018
8019
8020 fi
8021fi
8022
Michael W. Hudson54241132001-12-07 15:38:26 +00008023
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008024# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8025# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8026SAVE_CFLAGS=$CFLAGS
8027CFLAGS="-std=c99 $CFLAGS"
8028for ac_header in bluetooth/bluetooth.h
8029do :
8030 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8031if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8032 cat >>confdefs.h <<_ACEOF
8033#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8034_ACEOF
8035
8036fi
8037
8038done
8039
8040CFLAGS=$SAVE_CFLAGS
8041
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008042# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8043for ac_header in net/if.h
8044do :
8045 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8046#ifdef STDC_HEADERS
8047# include <stdlib.h>
8048# include <stddef.h>
8049#else
8050# ifdef HAVE_STDLIB_H
8051# include <stdlib.h>
8052# endif
8053#endif
8054#ifdef HAVE_SYS_SOCKET_H
8055# include <sys/socket.h>
8056#endif
8057
8058"
Victor Stinnere0be4232011-10-25 13:06:09 +02008059if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008060 cat >>confdefs.h <<_ACEOF
8061#define HAVE_NET_IF_H 1
8062_ACEOF
8063
8064fi
8065
8066done
8067
8068
Martin v. Löwis11017b12006-01-14 18:12:57 +00008069# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008070for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008071do :
8072 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 +00008073#ifdef HAVE_ASM_TYPES_H
8074#include <asm/types.h>
8075#endif
8076#ifdef HAVE_SYS_SOCKET_H
8077#include <sys/socket.h>
8078#endif
8079
Matthias Kloseb9621712010-04-24 17:59:49 +00008080"
Victor Stinnere0be4232011-10-25 13:06:09 +02008081if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008082 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008083#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008084_ACEOF
8085
8086fi
8087
8088done
8089
8090
Charles-François Natali47413c12011-10-06 19:47:44 +02008091# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008092for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008093do :
8094 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8095ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8096#ifdef HAVE_SYS_SOCKET_H
8097#include <sys/socket.h>
8098#endif
8099
8100"
8101if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8102 cat >>confdefs.h <<_ACEOF
8103#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8104_ACEOF
8105
8106fi
8107
8108done
8109
8110
Guido van Rossum627b2d71993-12-24 10:39:16 +00008111# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008112was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8114$as_echo_n "checking for clock_t in time.h... " >&6; }
8115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008116/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008117#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008118
8119_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008122 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008123else
Martin v. Löwis11437992002-04-12 09:54:03 +00008124
8125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008127
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008128
Guido van Rossum627b2d71993-12-24 10:39:16 +00008129fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008130rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008131
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8133$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8136$as_echo_n "checking for makedev... " >&6; }
8137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008138/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008139
Jesus Cea740f53a2010-04-28 11:35:30 +00008140#if defined(MAJOR_IN_MKDEV)
8141#include <sys/mkdev.h>
8142#elif defined(MAJOR_IN_SYSMACROS)
8143#include <sys/sysmacros.h>
8144#else
8145#include <sys/types.h>
8146#endif
8147
Neal Norwitz11690112002-07-30 01:08:28 +00008148int
8149main ()
8150{
Jesus Cea740f53a2010-04-28 11:35:30 +00008151
8152 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008153 ;
8154 return 0;
8155}
Matthias Kloseb159a552010-04-25 21:00:44 +00008156
Neal Norwitz11690112002-07-30 01:08:28 +00008157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008158if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008159 ac_cv_has_makedev=yes
8160else
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008163rm -f core conftest.err conftest.$ac_objext \
8164 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8166$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008167if test "$ac_cv_has_makedev" = "yes"; then
8168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008170
8171fi
8172
Christian Heimes985ecdc2013-11-20 11:46:18 +01008173# byte swapping
8174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8175$as_echo_n "checking for le64toh... " >&6; }
8176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8177/* end confdefs.h. */
8178
8179#ifdef HAVE_ENDIAN_H
8180#include <endian.h>
8181#elif defined(HAVE_SYS_ENDIAN_H)
8182#include <sys/endian.h>
8183#endif
8184
8185int
8186main ()
8187{
8188
8189 le64toh(1)
8190 ;
8191 return 0;
8192}
8193
8194_ACEOF
8195if ac_fn_c_try_link "$LINENO"; then :
8196 ac_cv_has_le64toh=yes
8197else
8198 ac_cv_has_le64toh=no
8199fi
8200rm -f core conftest.err conftest.$ac_objext \
8201 conftest$ac_exeext conftest.$ac_ext
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8203$as_echo "$ac_cv_has_le64toh" >&6; }
8204if test "$ac_cv_has_le64toh" = "yes"; then
8205
8206$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8207
8208fi
8209
Martin v. Löwis399a6892002-10-04 10:22:02 +00008210use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008211# Don't use largefile support for GNU/Hurd
8212case $ac_sys_system in GNU*)
8213 use_lfs=no
8214esac
8215
Martin v. Löwis399a6892002-10-04 10:22:02 +00008216if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008217# Two defines needed to enable largefile support on various platforms
8218# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008219case $ac_sys_system/$ac_sys_release in
8220AIX*)
8221
8222$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8223
8224 ;;
8225esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008226
Matthias Kloseb9621712010-04-24 17:59:49 +00008227$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008231
Martin v. Löwis399a6892002-10-04 10:22:02 +00008232fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008233
Guido van Rossum84e7b241996-08-19 21:59:00 +00008234# Add some code to confdefs.h so that the test for off_t works on SCO
8235cat >> confdefs.h <<\EOF
8236#if defined(SCO_DS)
8237#undef _OFF_T
8238#endif
8239EOF
8240
Guido van Rossumef2255b2000-03-10 22:30:29 +00008241# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008242ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008243if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008244
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008245else
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
8247cat >>confdefs.h <<_ACEOF
8248#define mode_t int
8249_ACEOF
8250
8251fi
8252
Matthias Kloseb9621712010-04-24 17:59:49 +00008253ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008254if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008255
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008256else
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
8258cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008260_ACEOF
8261
8262fi
8263
Matthias Kloseb9621712010-04-24 17:59:49 +00008264ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008265if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008266
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008267else
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
8269cat >>confdefs.h <<_ACEOF
8270#define pid_t int
8271_ACEOF
8272
8273fi
8274
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008275
Martin v. Löwis11437992002-04-12 09:54:03 +00008276cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008277#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008279
Matthias Kloseb9621712010-04-24 17:59:49 +00008280ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008281if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008283else
Martin v. Löwis11437992002-04-12 09:54:03 +00008284
8285cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008287_ACEOF
8288
8289fi
8290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8292$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008293if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008295else
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008297/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008298#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008299
8300_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008303 ac_cv_type_uid_t=yes
8304else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008305 ac_cv_type_uid_t=no
8306fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008307rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8311$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008312if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008313
Matthias Kloseb9621712010-04-24 17:59:49 +00008314$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008315
8316
Matthias Kloseb9621712010-04-24 17:59:49 +00008317$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008318
8319fi
8320
Mark Dickinson983bc162012-12-02 12:11:38 +00008321
Matthias Kloseb9621712010-04-24 17:59:49 +00008322ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008323if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324
Matthias Kloseb9621712010-04-24 17:59:49 +00008325$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008326
8327fi
8328
Stefan Krah1919b7e2012-03-21 18:25:23 +01008329ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8330if test "x$ac_cv_type___uint128_t" = xyes; then :
8331
8332$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8333
8334fi
8335
Jack Jansendd19cf82001-12-06 22:36:17 +00008336
Michael W. Hudson54241132001-12-07 15:38:26 +00008337# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008338# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008339# The cast to long int works around a bug in the HP C Compiler
8340# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8341# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8342# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8344$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008345if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008347else
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 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 +00008349
Martin v. Löwis11437992002-04-12 09:54:03 +00008350else
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 if test "$ac_cv_type_int" = yes; then
8352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008354as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008355See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356 else
8357 ac_cv_sizeof_int=0
8358 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008360
Martin v. Löwis11437992002-04-12 09:54:03 +00008361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8363$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364
8365
8366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008368#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008369_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008370
8371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372# The cast to long int works around a bug in the HP C Compiler
8373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8375# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8377$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008378if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008380else
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 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 +00008382
Martin v. Löwis11437992002-04-12 09:54:03 +00008383else
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 if test "$ac_cv_type_long" = yes; then
8385 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008387as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008388See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389 else
8390 ac_cv_sizeof_long=0
8391 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8396$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008397
8398
8399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008401#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008402_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008403
8404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405# The cast to long int works around a bug in the HP C Compiler
8406# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8407# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8408# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8410$as_echo_n "checking size of long long... " >&6; }
8411if ${ac_cv_sizeof_long_long+:} false; then :
8412 $as_echo_n "(cached) " >&6
8413else
8414 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8415
8416else
8417 if test "$ac_cv_type_long_long" = yes; then
8418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8420as_fn_error 77 "cannot compute sizeof (long long)
8421See \`config.log' for more details" "$LINENO" 5; }
8422 else
8423 ac_cv_sizeof_long_long=0
8424 fi
8425fi
8426
8427fi
8428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8429$as_echo "$ac_cv_sizeof_long_long" >&6; }
8430
8431
8432
8433cat >>confdefs.h <<_ACEOF
8434#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8435_ACEOF
8436
8437
8438# The cast to long int works around a bug in the HP C Compiler
8439# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8440# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8441# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8443$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008444if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 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 +00008448
Martin v. Löwis11437992002-04-12 09:54:03 +00008449else
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 if test "$ac_cv_type_void_p" = yes; then
8451 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008453as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008454See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455 else
8456 ac_cv_sizeof_void_p=0
8457 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008458fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008459
Martin v. Löwis11437992002-04-12 09:54:03 +00008460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8462$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463
8464
8465
Martin v. Löwis11437992002-04-12 09:54:03 +00008466cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008467#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008468_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008469
8470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471# The cast to long int works around a bug in the HP C Compiler
8472# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8473# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8474# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8476$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008477if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008479else
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 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 +00008481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482else
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 if test "$ac_cv_type_short" = yes; then
8484 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008486as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008487See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488 else
8489 ac_cv_sizeof_short=0
8490 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008492
Martin v. Löwis11437992002-04-12 09:54:03 +00008493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8495$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496
8497
8498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008500#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008501_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008502
8503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504# The cast to long int works around a bug in the HP C Compiler
8505# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8506# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8507# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8509$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008510if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008512else
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 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 +00008514
Martin v. Löwis11437992002-04-12 09:54:03 +00008515else
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 if test "$ac_cv_type_float" = yes; then
8517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8518$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008519as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008520See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521 else
8522 ac_cv_sizeof_float=0
8523 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008525
Martin v. Löwis11437992002-04-12 09:54:03 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8528$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529
8530
8531
Martin v. Löwis11437992002-04-12 09:54:03 +00008532cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008533#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008534_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008535
8536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537# The cast to long int works around a bug in the HP C Compiler
8538# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8539# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8540# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8542$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008543if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008545else
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 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 +00008547
Martin v. Löwis11437992002-04-12 09:54:03 +00008548else
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 if test "$ac_cv_type_double" = yes; then
8550 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8551$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008552as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008553See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554 else
8555 ac_cv_sizeof_double=0
8556 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8561$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562
8563
8564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008566#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008567_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008568
8569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570# The cast to long int works around a bug in the HP C Compiler
8571# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8572# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8573# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8575$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008576if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008578else
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 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 +00008580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581else
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 if test "$ac_cv_type_fpos_t" = yes; then
8583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008585as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008586See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587 else
8588 ac_cv_sizeof_fpos_t=0
8589 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8594$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595
8596
8597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008599#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008600_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008601
Michael W. Hudson54241132001-12-07 15:38:26 +00008602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603# The cast to long int works around a bug in the HP C Compiler
8604# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8605# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8606# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8608$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008609if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008611else
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 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 +00008613
Martin v. Löwis18e16552006-02-15 17:27:45 +00008614else
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 if test "$ac_cv_type_size_t" = yes; then
8616 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008618as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008619See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620 else
8621 ac_cv_sizeof_size_t=0
8622 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008624
Martin v. Löwis18e16552006-02-15 17:27:45 +00008625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8627$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628
8629
8630
Martin v. Löwis18e16552006-02-15 17:27:45 +00008631cat >>confdefs.h <<_ACEOF
8632#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8633_ACEOF
8634
8635
Christian Heimes400adb02008-02-01 08:12:03 +00008636# The cast to long int works around a bug in the HP C Compiler
8637# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8638# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8639# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8641$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008642if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008644else
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 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 +00008646
Christian Heimes400adb02008-02-01 08:12:03 +00008647else
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 if test "$ac_cv_type_pid_t" = yes; then
8649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008651as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008652See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008653 else
8654 ac_cv_sizeof_pid_t=0
8655 fi
8656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008657
Christian Heimes400adb02008-02-01 08:12:03 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8660$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008661
8662
8663
8664cat >>confdefs.h <<_ACEOF
8665#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8666_ACEOF
8667
8668
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008669# The cast to long int works around a bug in the HP C Compiler
8670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8672# This bug is HP SR number 8606223364.
8673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8674$as_echo_n "checking size of uintptr_t... " >&6; }
8675if ${ac_cv_sizeof_uintptr_t+:} false; then :
8676 $as_echo_n "(cached) " >&6
8677else
8678 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8679
8680else
8681 if test "$ac_cv_type_uintptr_t" = yes; then
8682 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8684as_fn_error 77 "cannot compute sizeof (uintptr_t)
8685See \`config.log' for more details" "$LINENO" 5; }
8686 else
8687 ac_cv_sizeof_uintptr_t=0
8688 fi
8689fi
8690
8691fi
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8693$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8694
8695
8696
8697cat >>confdefs.h <<_ACEOF
8698#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8699_ACEOF
8700
8701
Michael W. Hudson54241132001-12-07 15:38:26 +00008702
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8704$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008705have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008707/* end confdefs.h. */
8708
8709int
8710main ()
8711{
8712long double x; x = (long double)0;
8713 ;
8714 return 0;
8715}
8716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008717if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008718
8719
Matthias Kloseb9621712010-04-24 17:59:49 +00008720$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008721
8722 have_long_double=yes
8723
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008724fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8727$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008728if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008729# The cast to long int works around a bug in the HP C Compiler
8730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8732# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8734$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008735if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008737else
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 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 +00008739
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 if test "$ac_cv_type_long_double" = yes; then
8742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008744as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008745See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008746 else
8747 ac_cv_sizeof_long_double=0
8748 fi
8749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008750
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8753$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008754
8755
8756
8757cat >>confdefs.h <<_ACEOF
8758#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8759_ACEOF
8760
8761
8762fi
8763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764# The cast to long int works around a bug in the HP C Compiler
8765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8769$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008770if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 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 +00008774
Thomas Woutersb2137042007-02-01 18:02:27 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 if test "$ac_cv_type__Bool" = yes; then
8777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008779as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008780See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781 else
8782 ac_cv_sizeof__Bool=0
8783 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785
Thomas Woutersb2137042007-02-01 18:02:27 +00008786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8788$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789
8790
8791
Thomas Woutersb2137042007-02-01 18:02:27 +00008792cat >>confdefs.h <<_ACEOF
8793#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8794_ACEOF
8795
8796
Thomas Woutersb2137042007-02-01 18:02:27 +00008797
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008798# The cast to long int works around a bug in the HP C Compiler
8799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8801# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8803$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008804if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008808#ifdef HAVE_SYS_TYPES_H
8809#include <sys/types.h>
8810#endif
8811
Matthias Kloseb9621712010-04-24 17:59:49 +00008812"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008813
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$ac_cv_type_off_t" = yes; then
8816 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008818as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008819See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008820 else
8821 ac_cv_sizeof_off_t=0
8822 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8827$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008828
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829
8830
Martin v. Löwis11437992002-04-12 09:54:03 +00008831cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008832#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008833_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008834
Michael W. Hudson54241132001-12-07 15:38:26 +00008835
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008836
Matthias Kloseb9621712010-04-24 17:59:49 +00008837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8838$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008839if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008840 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008841
Matthias Kloseb9621712010-04-24 17:59:49 +00008842$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8845$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8848$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008849fi
8850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851# The cast to long int works around a bug in the HP C Compiler
8852# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8853# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8854# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8856$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008857if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859else
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861#ifdef HAVE_SYS_TYPES_H
8862#include <sys/types.h>
8863#endif
8864#ifdef HAVE_TIME_H
8865#include <time.h>
8866#endif
8867
Matthias Kloseb9621712010-04-24 17:59:49 +00008868"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870else
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 if test "$ac_cv_type_time_t" = yes; then
8872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008874as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008875See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008876 else
8877 ac_cv_sizeof_time_t=0
8878 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008880
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8883$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008884
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008885
8886
Martin v. Löwis11437992002-04-12 09:54:03 +00008887cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008888#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008889_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008890
Michael W. Hudson54241132001-12-07 15:38:26 +00008891
8892
Trent Mick635f6fb2000-08-23 21:33:05 +00008893# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008894ac_save_cc="$CC"
8895if test "$ac_cv_kpthread" = "yes"
8896then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008897elif test "$ac_cv_kthread" = "yes"
8898then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008899elif test "$ac_cv_pthread" = "yes"
8900then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008901fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008902
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8904$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008905have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008907/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008908
8909 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008910int
8911main ()
8912{
Guido van Rossum12580492000-09-24 16:47:19 +00008913pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 ;
8915 return 0;
8916}
Matthias Kloseb159a552010-04-25 21:00:44 +00008917
Martin v. Löwis11437992002-04-12 09:54:03 +00008918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008919if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008920 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8924$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008925if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8929# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8931$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008932if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008934else
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008936#ifdef HAVE_PTHREAD_H
8937#include <pthread.h>
8938#endif
8939
Matthias Kloseb9621712010-04-24 17:59:49 +00008940"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008941
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008942else
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 if test "$ac_cv_type_pthread_t" = yes; then
8944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008946as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008947See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008948 else
8949 ac_cv_sizeof_pthread_t=0
8950 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008952
Trent Mick635f6fb2000-08-23 21:33:05 +00008953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8955$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008956
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008957
8958
Martin v. Löwis11437992002-04-12 09:54:03 +00008959cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008960#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008961_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008962
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008963
Trent Mick635f6fb2000-08-23 21:33:05 +00008964fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008965CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008966
Michael W. Hudson54241132001-12-07 15:38:26 +00008967
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008968case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008969 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008970 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8971 ;;
8972 Darwin/*)
8973 OTHER_LIBTOOL_OPT=""
8974 ;;
8975esac
8976
8977
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008978
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008979case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008980 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008981 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8982 if test "${enable_universalsdk}"; then
8983 :
8984 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008985 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008986 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008987 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008988 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008989 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008990 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008991 if test ${gcc_version} '<' 4.0
8992 then
8993 LIBTOOL_CRUFT="-lcc_dynamic"
8994 else
8995 LIBTOOL_CRUFT=""
8996 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008998 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009001/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009002
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009003 #include <unistd.h>
9004 int main(int argc, char*argv[])
9005 {
9006 if (sizeof(long) == 4) {
9007 return 0;
9008 } else {
9009 return 1;
9010 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009011 }
9012
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009014if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009015 ac_osx_32bit=yes
9016else
Matthias Kloseb9621712010-04-24 17:59:49 +00009017 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9020 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009021fi
9022
9023
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009024 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009025 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009026 i386)
9027 MACOSX_DEFAULT_ARCH="i386"
9028 ;;
9029 ppc)
9030 MACOSX_DEFAULT_ARCH="ppc"
9031 ;;
9032 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009033 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009034 ;;
9035 esac
9036 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009037 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009038 i386)
9039 MACOSX_DEFAULT_ARCH="x86_64"
9040 ;;
9041 ppc)
9042 MACOSX_DEFAULT_ARCH="ppc64"
9043 ;;
9044 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009045 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009046 ;;
9047 esac
9048
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009049 fi
9050
9051 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009052 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009053 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009054esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9056$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009057if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009058then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009059 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009061 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9066$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009067 if test $enable_shared = "yes"
9068 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009069 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 +00009070 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009071else
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9073$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009074fi
9075
Matthias Kloseb9621712010-04-24 17:59:49 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9077$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009078case $ac_sys_system/$ac_sys_release in
9079 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009082
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9084$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009085 ;;
9086 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9088$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009089 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009090esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009091
Guido van Rossum0a516c91994-09-12 10:58:40 +00009092# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009093
Michael W. Hudson54241132001-12-07 15:38:26 +00009094
9095
9096
9097
Benjamin Peterson99f03762010-04-11 22:15:28 +00009098
Thomas Wouters477c8d52006-05-27 19:21:47 +00009099
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009100# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9101# -- usually .so, .sl on HP-UX, .dll on Cygwin
9102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9103$as_echo_n "checking the extension of shared libraries... " >&6; }
9104if test -z "$SHLIB_SUFFIX"; then
9105 case $ac_sys_system in
9106 hp*|HP*)
9107 case `uname -m` in
9108 ia64) SHLIB_SUFFIX=.so;;
9109 *) SHLIB_SUFFIX=.sl;;
9110 esac
9111 ;;
9112 CYGWIN*) SHLIB_SUFFIX=.dll;;
9113 *) SHLIB_SUFFIX=.so;;
9114 esac
9115fi
9116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9117$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009118
Guido van Rossum0a516c91994-09-12 10:58:40 +00009119# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009120# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009121# (Shared libraries in this instance are shared modules to be loaded into
9122# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9124$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009125if test -z "$LDSHARED"
9126then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009127 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009128 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009129 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009130 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009131 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009133 if test "$GCC" = "yes" ; then
9134 LDSHARED='$(CC) -shared'
9135 LDCXXSHARED='$(CXX) -shared'
9136 else
9137 LDSHARED='$(CC) -G'
9138 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009139 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009140 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009141 if test "$GCC" = "yes" ; then
9142 LDSHARED='$(CC) -shared'
9143 LDCXXSHARED='$(CXX) -shared'
9144 else
9145 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009146 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009147 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009148 LDSHARED='$(CC) -bundle'
9149 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009150 if test "$enable_framework" ; then
9151 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009152 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9153 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009154 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009155 else
9156 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009157 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009158 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009159 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009160 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009161 LDSHARED='$(CC) -bundle'
9162 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009163 if test "$enable_framework" ; then
9164 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009165 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9166 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009167 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009168 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009169 # No framework, use the Python app as bundle-loader
9170 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009171 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009172 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009173 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009174 Darwin/*)
9175 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9176 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009177
Ned Deily36820b62014-06-25 13:44:22 -07009178 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9179 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9180 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9181 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9182 if test ${dep_target_major} -eq 10 && \
9183 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009184 then
Ned Deily36820b62014-06-25 13:44:22 -07009185 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009186 LDSHARED='$(CC) -bundle'
9187 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009188 if test "$enable_framework" ; then
9189 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009190 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9191 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009193 else
9194 # No framework, use the Python app as bundle-loader
9195 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9196 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009197 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009198 fi
Ned Deily36820b62014-06-25 13:44:22 -07009199 else
9200 # building for OS X 10.3 and later
9201 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9202 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9203 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009204 fi
9205 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009206 Linux*|GNU*|QNX*)
9207 LDSHARED='$(CC) -shared'
9208 LDCXXSHARED='$(CXX) -shared';;
9209 BSD/OS*/4*)
9210 LDSHARED="gcc -shared"
9211 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009212 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009213 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009214 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009215 LDSHARED='$(CC) -shared'
9216 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009217 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009218 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009219 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009220 OpenBSD*)
9221 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9222 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009223 LDSHARED='$(CC) -shared $(CCSHARED)'
9224 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009225 else
9226 case `uname -r` in
9227 [01].* | 2.[0-7] | 2.[0-7].*)
9228 LDSHARED="ld -Bshareable ${LDFLAGS}"
9229 ;;
9230 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009231 LDSHARED='$(CC) -shared $(CCSHARED)'
9232 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009233 ;;
9234 esac
9235 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009236 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009237 LDSHARED='$(CC) -shared'
9238 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009239 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009240 if test "$GCC" = "yes" ; then
9241 LDSHARED='$(CC) -shared'
9242 LDCXXSHARED='$(CXX) -shared'
9243 else
9244 LDSHARED='$(CC) -G'
9245 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009246 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009247 SCO_SV*)
9248 LDSHARED='$(CC) -Wl,-G,-Bexport'
9249 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9250 CYGWIN*)
9251 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9252 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009253 *) LDSHARED="ld";;
9254 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9257$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009258LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009259BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009260# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009261# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9263$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009264if test -z "$CCSHARED"
9265then
Guido van Rossum07397971997-04-29 21:49:50 +00009266 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009267 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009268 then CCSHARED="-fPIC";
9269 elif test `uname -p` = sparc;
9270 then CCSHARED="-xcode=pic32";
9271 else CCSHARED="-Kpic";
9272 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009273 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009274 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009275 else CCSHARED="+z";
9276 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009277 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009278 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009279 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009280 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009281 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009282 if test "$GCC" = "yes"
9283 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009284 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009285 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009286 SCO_SV*)
9287 if test "$GCC" = "yes"
9288 then CCSHARED="-fPIC"
9289 else CCSHARED="-Kpic -belf"
9290 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009291 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9294$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009295# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009296# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9298$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299if test -z "$LINKFORSHARED"
9300then
Guido van Rossum07397971997-04-29 21:49:50 +00009301 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009302 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009303 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009304 LINKFORSHARED="-Wl,-E -Wl,+s";;
9305# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009306 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009307 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009308 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009309 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009311 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009312
9313 # Issue #18075: the default maximum stack size (8MBytes) is too
9314 # small for the default recursion limit. Increase the stack size
9315 # to ensure that tests don't crash
9316 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9317
Jack Jansene578a632001-08-15 01:27:14 +00009318 if test "$enable_framework"
9319 then
Jack Jansenda49e192005-01-07 13:08:22 +00009320 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009321 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009322 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009323 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009324 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009325 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009326 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009327 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9328 then
9329 LINKFORSHARED="-Wl,--export-dynamic"
9330 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009331 SunOS/5*) case $CC in
9332 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009333 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009334 then
9335 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009336 fi;;
9337 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009338 CYGWIN*)
9339 if test $enable_shared = "no"
9340 then
9341 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9342 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009343 QNX*)
9344 # -Wl,-E causes the symbols to be added to the dynamic
9345 # symbol table so that they can be found when a module
9346 # is loaded. -N 2048K causes the stack size to be set
9347 # to 2048 kilobytes so that the stack doesn't overflow
9348 # when running test_compile.py.
9349 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9353$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354
Michael W. Hudson54241132001-12-07 15:38:26 +00009355
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009356
Matthias Kloseb9621712010-04-24 17:59:49 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9358$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009359if test ! "$LIBRARY" = "$LDLIBRARY"
9360then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009361 case $ac_sys_system in
9362 CYGWIN*)
9363 # Cygwin needs CCSHARED when building extension DLLs
9364 # but not when building the interpreter DLL.
9365 CFLAGSFORSHARED='';;
9366 *)
9367 CFLAGSFORSHARED='$(CCSHARED)'
9368 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9371$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009372
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009373# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9374# library (with --enable-shared).
9375# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009376# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9377# if it is not required, since it creates a dependency of the shared library
9378# to LIBS. This, in turn, means that applications linking the shared libpython
9379# don't need to link LIBS explicitly. The default should be only changed
9380# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009381
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9383$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009384case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009385 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009386 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009387esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9389$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009390
9391
Guido van Rossum627b2d71993-12-24 10:39:16 +00009392# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9394$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009395if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009396 $as_echo_n "(cached) " >&6
9397else
9398 ac_check_lib_save_LIBS=$LIBS
9399LIBS="-lsendfile $LIBS"
9400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9401/* end confdefs.h. */
9402
9403/* Override any GCC internal prototype to avoid an error.
9404 Use char because int might match the return type of a GCC
9405 builtin and then its argument prototype would still apply. */
9406#ifdef __cplusplus
9407extern "C"
9408#endif
9409char sendfile ();
9410int
9411main ()
9412{
9413return sendfile ();
9414 ;
9415 return 0;
9416}
9417_ACEOF
9418if ac_fn_c_try_link "$LINENO"; then :
9419 ac_cv_lib_sendfile_sendfile=yes
9420else
9421 ac_cv_lib_sendfile_sendfile=no
9422fi
9423rm -f core conftest.err conftest.$ac_objext \
9424 conftest$ac_exeext conftest.$ac_ext
9425LIBS=$ac_check_lib_save_LIBS
9426fi
9427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9428$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009429if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009430 cat >>confdefs.h <<_ACEOF
9431#define HAVE_LIBSENDFILE 1
9432_ACEOF
9433
9434 LIBS="-lsendfile $LIBS"
9435
9436fi
9437
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9439$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009440if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009441 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009442else
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009444LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448/* Override any GCC internal prototype to avoid an error.
9449 Use char because int might match the return type of a GCC
9450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009451#ifdef __cplusplus
9452extern "C"
9453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009454char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009455int
9456main ()
9457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009458return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 ;
9460 return 0;
9461}
9462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009465else
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009468rm -f core conftest.err conftest.$ac_objext \
9469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009470LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9473$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009474if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 cat >>confdefs.h <<_ACEOF
9476#define HAVE_LIBDL 1
9477_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009478
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009479 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009481fi
9482 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9484$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009485if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009487else
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009489LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493/* Override any GCC internal prototype to avoid an error.
9494 Use char because int might match the return type of a GCC
9495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009496#ifdef __cplusplus
9497extern "C"
9498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009499char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009500int
9501main ()
9502{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ;
9505 return 0;
9506}
9507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009510else
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009513rm -f core conftest.err conftest.$ac_objext \
9514 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009515LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9518$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009519if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 cat >>confdefs.h <<_ACEOF
9521#define HAVE_LIBDLD 1
9522_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009523
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009524 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009525
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009526fi
9527 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009528
Georg Brandlb1441c72009-01-03 22:33:39 +00009529# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009530if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9532$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009533if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009534 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009535else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009536 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540/* Override any GCC internal prototype to avoid an error.
9541 Use char because int might match the return type of a GCC
9542 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009543#ifdef __cplusplus
9544extern "C"
9545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009546char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009547int
9548main ()
9549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009551 ;
9552 return 0;
9553}
9554_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555for ac_lib in '' pthread rt posix4; do
9556 if test -z "$ac_lib"; then
9557 ac_res="none required"
9558 else
9559 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009560 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009562 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009565rm -f core conftest.err conftest.$ac_objext \
9566 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009567 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570done
Victor Stinnere0be4232011-10-25 13:06:09 +02009571if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573else
9574 ac_cv_search_sem_init=no
9575fi
9576rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009577LIBS=$ac_func_search_save_LIBS
9578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9580$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009582if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009583 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009584
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009585fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009586 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009587 # posix4 on Solaris 2.6
9588 # pthread (first!) on Linux
9589fi
9590
Martin v. Löwis19d17342003-06-14 21:03:05 +00009591# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9593$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009594if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009596else
9597 ac_check_lib_save_LIBS=$LIBS
9598LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009600/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009602/* Override any GCC internal prototype to avoid an error.
9603 Use char because int might match the return type of a GCC
9604 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009605#ifdef __cplusplus
9606extern "C"
9607#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009608char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009609int
9610main ()
9611{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009613 ;
9614 return 0;
9615}
9616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009617if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009618 ac_cv_lib_intl_textdomain=yes
9619else
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009622rm -f core conftest.err conftest.$ac_objext \
9623 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009624LIBS=$ac_check_lib_save_LIBS
9625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9627$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009628if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009629
Matthias Kloseb9621712010-04-24 17:59:49 +00009630$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009631
Brett Cannonc6d936e2009-06-07 20:09:53 +00009632 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009633fi
9634
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009635
9636# checks for system dependent C++ extensions support
9637case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9639$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009642
Georg Brandl59e87bd2011-02-15 19:48:59 +00009643 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009644int
9645main ()
9646{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009647loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 ;
9649 return 0;
9650}
Matthias Kloseb159a552010-04-25 21:00:44 +00009651
Martin v. Löwis11437992002-04-12 09:54:03 +00009652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009654
Matthias Kloseb159a552010-04-25 21:00:44 +00009655
Matthias Kloseb9621712010-04-24 17:59:49 +00009656$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009657
Matthias Kloseb159a552010-04-25 21:00:44 +00009658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009659$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009660
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009661else
Matthias Kloseb159a552010-04-25 21:00:44 +00009662
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009664$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009665
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009667rm -f core conftest.err conftest.$ac_objext \
9668 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009669 *) ;;
9670esac
9671
Christian Heimes985ecdc2013-11-20 11:46:18 +01009672# check for systems that require aligned memory access
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9674$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009675if ${ac_cv_aligned_required+:} false; then :
9676 $as_echo_n "(cached) " >&6
9677else
9678 if test "$cross_compiling" = yes; then :
9679 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009680else
9681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9682/* end confdefs.h. */
9683
9684int main()
9685{
9686 char s[16];
9687 int i, *p1, *p2;
9688 for (i=0; i < 16; i++)
9689 s[i] = i;
9690 p1 = (int*)(s+1);
9691 p2 = (int*)(s+2);
9692 if (*p1 == *p2)
9693 return 1;
9694 return 0;
9695}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009696_ACEOF
9697if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009698 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009699else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009700 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009701fi
9702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9703 conftest.$ac_objext conftest.beam conftest.$ac_ext
9704fi
9705
9706
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009707fi
9708
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9710$as_echo "$ac_cv_aligned_required" >&6; }
9711if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009712
9713$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9714
9715fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009716
9717# str, bytes and memoryview hash algorithm
9718
9719
9720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9721$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9722
9723# Check whether --with-hash_algorithm was given.
9724if test "${with_hash_algorithm+set}" = set; then :
9725 withval=$with_hash_algorithm;
9726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9727$as_echo "$withval" >&6; }
9728case "$withval" in
9729 siphash24)
9730 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9731
9732 ;;
9733 fnv)
9734 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9735
9736 ;;
9737 *)
9738 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9739 ;;
9740esac
9741
9742else
9743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9744$as_echo "default" >&6; }
9745fi
9746
9747
Charles-François Natalid30b0222014-05-08 23:08:51 +01009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9749$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9750
9751# Check whether --with-address_sanitizer was given.
9752if test "${with_address_sanitizer+set}" = set; then :
9753 withval=$with_address_sanitizer;
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9755$as_echo "$withval" >&6; }
9756BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9757LDFLAGS="-fsanitize=address $LDFLAGS"
9758
9759else
9760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761$as_echo "no" >&6; }
9762fi
9763
9764
Guido van Rossum70c7f481998-03-26 18:44:10 +00009765# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9767$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009768if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009770else
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009772LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776/* Override any GCC internal prototype to avoid an error.
9777 Use char because int might match the return type of a GCC
9778 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009779#ifdef __cplusplus
9780extern "C"
9781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009782char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009783int
9784main ()
9785{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 ;
9788 return 0;
9789}
9790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009791if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009793else
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009796rm -f core conftest.err conftest.$ac_objext \
9797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009798LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9801$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009802if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009803 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009804fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009805 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9807$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009808if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009810else
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009812LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816/* Override any GCC internal prototype to avoid an error.
9817 Use char because int might match the return type of a GCC
9818 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009819#ifdef __cplusplus
9820extern "C"
9821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009822char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009823int
9824main ()
9825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ;
9828 return 0;
9829}
9830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009831if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009833else
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009836rm -f core conftest.err conftest.$ac_objext \
9837 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009838LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9841$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009842if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009843 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009844fi
9845 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009846
Matthias Kloseb9621712010-04-24 17:59:49 +00009847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9848$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009851if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9854$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009855LIBS="$withval $LIBS"
9856
9857else
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9859$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860fi
9861
Guido van Rossum7f43da71994-08-01 12:15:30 +00009862
Victor Stinner8291b5e2015-03-20 16:03:14 +01009863
9864
9865
9866
9867
9868
9869
9870if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9871 if test -n "$ac_tool_prefix"; then
9872 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9873set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9875$as_echo_n "checking for $ac_word... " >&6; }
9876if ${ac_cv_path_PKG_CONFIG+:} false; then :
9877 $as_echo_n "(cached) " >&6
9878else
9879 case $PKG_CONFIG in
9880 [\\/]* | ?:[\\/]*)
9881 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9882 ;;
9883 *)
9884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9885for as_dir in $PATH
9886do
9887 IFS=$as_save_IFS
9888 test -z "$as_dir" && as_dir=.
9889 for ac_exec_ext in '' $ac_executable_extensions; do
9890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9891 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9893 break 2
9894 fi
9895done
9896 done
9897IFS=$as_save_IFS
9898
9899 ;;
9900esac
9901fi
9902PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9903if test -n "$PKG_CONFIG"; then
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9905$as_echo "$PKG_CONFIG" >&6; }
9906else
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9908$as_echo "no" >&6; }
9909fi
9910
9911
9912fi
9913if test -z "$ac_cv_path_PKG_CONFIG"; then
9914 ac_pt_PKG_CONFIG=$PKG_CONFIG
9915 # Extract the first word of "pkg-config", so it can be a program name with args.
9916set dummy pkg-config; ac_word=$2
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9918$as_echo_n "checking for $ac_word... " >&6; }
9919if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9920 $as_echo_n "(cached) " >&6
9921else
9922 case $ac_pt_PKG_CONFIG in
9923 [\\/]* | ?:[\\/]*)
9924 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9925 ;;
9926 *)
9927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9928for as_dir in $PATH
9929do
9930 IFS=$as_save_IFS
9931 test -z "$as_dir" && as_dir=.
9932 for ac_exec_ext in '' $ac_executable_extensions; do
9933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9934 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9936 break 2
9937 fi
9938done
9939 done
9940IFS=$as_save_IFS
9941
9942 ;;
9943esac
9944fi
9945ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9946if test -n "$ac_pt_PKG_CONFIG"; then
9947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9948$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9949else
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952fi
9953
9954 if test "x$ac_pt_PKG_CONFIG" = x; then
9955 PKG_CONFIG=""
9956 else
9957 case $cross_compiling:$ac_tool_warned in
9958yes:)
9959{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9960$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9961ac_tool_warned=yes ;;
9962esac
9963 PKG_CONFIG=$ac_pt_PKG_CONFIG
9964 fi
9965else
9966 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9967fi
9968
9969fi
9970if test -n "$PKG_CONFIG"; then
9971 _pkg_min_version=0.9.0
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9973$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9974 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9976$as_echo "yes" >&6; }
9977 else
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
9980 PKG_CONFIG=""
9981 fi
9982fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009983
9984# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9986$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009987
9988# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009989if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009990 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009991else
9992 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009993fi
9994
9995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9997$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009998
9999# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10001$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010002
10003# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010005 withval=$with_system_ffi;
10006fi
10007
10008
Zachary Waref40d4dd2016-09-17 01:25:24 -050010009if test "$ac_sys_system" = "Darwin"
10010then
10011 case "$with_system_ffi" in
10012 "")
10013 with_system_ffi="no"
10014 ;;
10015 yes|no)
10016 ;;
10017 *)
10018 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10019 ;;
10020 esac
10021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10022$as_echo "$with_system_ffi" >&6; }
10023else
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10025$as_echo "yes" >&6; }
10026 if test "$with_system_ffi" != ""
10027 then
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10029$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10030 fi
10031 with_system_ffi="yes"
10032fi
Zachary Ware935043d2016-09-09 17:01:21 -070010033
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010034if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010035 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10036else
10037 LIBFFI_INCLUDEDIR=""
10038fi
10039
10040
Stefan Krah60187b52012-03-23 19:06:27 +010010041# Check for use of the system libmpdec library
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10043$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10044
10045# Check whether --with-system_libmpdec was given.
10046if test "${with_system_libmpdec+set}" = set; then :
10047 withval=$with_system_libmpdec;
10048else
10049 with_system_libmpdec="no"
10050fi
10051
10052
10053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10054$as_echo "$with_system_libmpdec" >&6; }
10055
Benjamin Peterson076ed002010-10-31 17:11:02 +000010056# Check for support for loadable sqlite extensions
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10058$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10059# Check whether --enable-loadable-sqlite-extensions was given.
10060if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10061 enableval=$enable_loadable_sqlite_extensions;
10062else
10063 enable_loadable_sqlite_extensions="no"
10064fi
10065
10066
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10068$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10069
Ned Deilyd819b932013-09-06 01:07:05 -070010070# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10071
10072
10073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10074$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10075
10076# Check whether --with-tcltk-includes was given.
10077if test "${with_tcltk_includes+set}" = set; then :
10078 withval=$with_tcltk_includes;
10079else
10080 with_tcltk_includes="default"
10081fi
10082
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10084$as_echo "$with_tcltk_includes" >&6; }
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10086$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10087
10088# Check whether --with-tcltk-libs was given.
10089if test "${with_tcltk_libs+set}" = set; then :
10090 withval=$with_tcltk_libs;
10091else
10092 with_tcltk_libs="default"
10093fi
10094
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10096$as_echo "$with_tcltk_libs" >&6; }
10097if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10098then
10099 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10100 then
10101 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10102 fi
10103 TCLTK_INCLUDES=""
10104 TCLTK_LIBS=""
10105else
10106 TCLTK_INCLUDES="$with_tcltk_includes"
10107 TCLTK_LIBS="$with_tcltk_libs"
10108fi
10109
Matthias Klose55708cc2009-04-30 08:06:49 +000010110# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10112$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010113
10114# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010115if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010116 withval=$with_dbmliborder;
10117if test x$with_dbmliborder = xyes
10118then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010119as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010120else
10121 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10122 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10123 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010124 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010125 fi
10126 done
10127fi
10128fi
10129
Matthias Kloseb9621712010-04-24 17:59:49 +000010130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10131$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010132
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010133# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010134
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010135USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137
Martin v. Löwis11437992002-04-12 09:54:03 +000010138
10139# Templates for things AC_DEFINEd more than once.
10140# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010141
10142
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
Matthias Kloseb9621712010-04-24 17:59:49 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10145$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010147# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010148if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149 withval=$with_threads;
10150fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010151
10152
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010153# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010156if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157 withval=$with_thread; with_threads=$with_thread
10158fi
10159
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010160
10161if test -z "$with_threads"
10162then with_threads="yes"
10163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10165$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010166
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010167
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010168if test "$with_threads" = "no"
10169then
10170 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010171elif test "$ac_cv_pthread_is_default" = yes
10172then
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010174
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010175 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010176 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010177
10178 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010180elif test "$ac_cv_kpthread" = "yes"
10181then
10182 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010183 if test "$ac_cv_cxx_thread" = "yes"; then
10184 CXX="$CXX -Kpthread"
10185 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010187
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010188 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010189 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010190elif test "$ac_cv_kthread" = "yes"
10191then
10192 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010193 if test "$ac_cv_cxx_thread" = "yes"; then
10194 CXX="$CXX -Kthread"
10195 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010197
10198 posix_threads=yes
10199 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010200elif test "$ac_cv_pthread" = "yes"
10201then
10202 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010203 if test "$ac_cv_cxx_thread" = "yes"; then
10204 CXX="$CXX -pthread"
10205 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010207
10208 posix_threads=yes
10209 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010210else
10211 if test ! -z "$with_threads" -a -d "$with_threads"
10212 then LDFLAGS="$LDFLAGS -L$with_threads"
10213 fi
10214 if test ! -z "$withval" -a -d "$withval"
10215 then LDFLAGS="$LDFLAGS -L$withval"
10216 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010217
10218 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010219 # define _POSIX_THREADS in unistd.h. Some apparently don't
10220 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10222$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010225
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010226#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010227#ifdef _POSIX_THREADS
10228yes
10229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
10231_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010234 unistd_defines_pthreads=yes
10235else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010236 unistd_defines_pthreads=no
10237fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010238rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10241$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010242
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010244
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010245 # Just looking for pthread_create in libpthread is not enough:
10246 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10247 # So we really have to include pthread.h, and then link.
10248 _libs=$LIBS
10249 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10251$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010253/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010254
10255#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010256#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010257
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010258void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010259int
10260main ()
10261{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010262
10263pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 ;
10265 return 0;
10266}
10267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10271$as_echo "yes" >&6; }
10272 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010273
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010274 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010275 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010276else
Martin v. Löwis11437992002-04-12 09:54:03 +000010277
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010278 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010280if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010282
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010283 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010284 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010285else
Guido van Rossumad678af1998-10-02 14:42:15 +000010286
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10288$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010289if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010291else
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010293LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297/* Override any GCC internal prototype to avoid an error.
10298 Use char because int might match the return type of a GCC
10299 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010300#ifdef __cplusplus
10301extern "C"
10302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010303char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010304int
10305main ()
10306{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 ;
10309 return 0;
10310}
10311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010312if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010314else
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010317rm -f core conftest.err conftest.$ac_objext \
10318 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010319LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10322$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010323if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010325
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010326 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010327 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010328 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010329else
Greg Steinadf63d62000-07-05 10:38:09 +000010330
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10332$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010333if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010335else
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010337LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341/* Override any GCC internal prototype to avoid an error.
10342 Use char because int might match the return type of a GCC
10343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010344#ifdef __cplusplus
10345extern "C"
10346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010347char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010348int
10349main ()
10350{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 ;
10353 return 0;
10354}
10355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010358else
Matthias Kloseb9621712010-04-24 17:59:49 +000010359 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010361rm -f core conftest.err conftest.$ac_objext \
10362 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010363LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10366$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010367if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010369
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010370 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010371 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010372 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010373else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10376$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010377if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010379else
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385/* Override any GCC internal prototype to avoid an error.
10386 Use char because int might match the return type of a GCC
10387 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010388#ifdef __cplusplus
10389extern "C"
10390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010391char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010392int
10393main ()
10394{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 ;
10397 return 0;
10398}
10399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010400if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010402else
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010405rm -f core conftest.err conftest.$ac_objext \
10406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010407LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10410$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010411if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010414 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010415 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010416 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010417else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010418
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10420$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010421if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010423else
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010425LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429/* Override any GCC internal prototype to avoid an error.
10430 Use char because int might match the return type of a GCC
10431 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010432#ifdef __cplusplus
10433extern "C"
10434#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010435char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010436int
10437main ()
10438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ;
10441 return 0;
10442}
10443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010444if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010446else
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010449rm -f core conftest.err conftest.$ac_objext \
10450 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010451LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10454$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010455if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010457
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010458 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010459 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010460 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010461else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010462
Martin v. Löwis130fb172001-07-19 11:00:41 +000010463 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010464fi
10465
Guido van Rossum627b2d71993-12-24 10:39:16 +000010466
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010467fi
10468
Guido van Rossum0be3e491997-05-22 20:33:33 +000010469fi
10470
Guido van Rossum49545951997-12-02 19:28:29 +000010471fi
10472
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473fi
10474
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010476rm -f core conftest.err conftest.$ac_objext \
10477 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010478
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10480$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010481if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010483else
Martin v. Löwis11437992002-04-12 09:54:03 +000010484 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010485LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010489/* Override any GCC internal prototype to avoid an error.
10490 Use char because int might match the return type of a GCC
10491 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010492#ifdef __cplusplus
10493extern "C"
10494#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010495char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010496int
10497main ()
10498{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ;
10501 return 0;
10502}
10503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010504if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010506else
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010509rm -f core conftest.err conftest.$ac_objext \
10510 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010511LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10514$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010515if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010517
Martin v. Löwis130fb172001-07-19 11:00:41 +000010518 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010519 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010520 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010521fi
10522
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010523
Neal Norwitza978ab02002-11-02 16:58:05 +000010524 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10526$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010527if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010529else
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010531LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535/* Override any GCC internal prototype to avoid an error.
10536 Use char because int might match the return type of a GCC
10537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010538#ifdef __cplusplus
10539extern "C"
10540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010541char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010542int
10543main ()
10544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 ;
10547 return 0;
10548}
10549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010550if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010552else
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010555rm -f core conftest.err conftest.$ac_objext \
10556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010557LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10560$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010561if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010563
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010564 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010565 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010566 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010567fi
10568
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010569 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010570fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010571
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572if test "$posix_threads" = "yes"; then
10573 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010574
Matthias Kloseb9621712010-04-24 17:59:49 +000010575$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010576
10577 fi
10578
10579 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10580 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010581 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010582$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010583
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010584 ;;
10585 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010586$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010587
10588 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010589 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010590$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010591
10592 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010593 esac
10594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10596$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010597 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010599else
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601 ac_cv_pthread_system_supported=no
10602else
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. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010605
10606 #include <stdio.h>
10607 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010608 void *foo(void *parm) {
10609 return NULL;
10610 }
10611 main() {
10612 pthread_attr_t attr;
10613 pthread_t id;
10614 if (pthread_attr_init(&attr)) exit(-1);
10615 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10616 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10617 exit(0);
10618 }
10619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010620if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621 ac_cv_pthread_system_supported=yes
10622else
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010627fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629
Guido van Rossum627b2d71993-12-24 10:39:16 +000010630fi
10631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10633$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010634 if test "$ac_cv_pthread_system_supported" = "yes"; then
10635
Matthias Kloseb9621712010-04-24 17:59:49 +000010636$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010637
10638 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 for ac_func in pthread_sigmask
10640do :
10641 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010642if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010643 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010644#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010646 case $ac_sys_system in
10647 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010650
10651 ;;
10652 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010653fi
10654done
10655
Christian Heimesf77b4b22013-08-21 13:26:05 +020010656 for ac_func in pthread_atfork
10657do :
10658 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10659if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10660 cat >>confdefs.h <<_ACEOF
10661#define HAVE_PTHREAD_ATFORK 1
10662_ACEOF
10663
10664fi
10665done
10666
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010667fi
10668
10669
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010670# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010671
Matthias Kloseb9621712010-04-24 17:59:49 +000010672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10673$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010675if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010677 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10679$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010680 ipv6=no
10681 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10683$as_echo "yes" >&6; }
10684 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010685
10686 ipv6=yes
10687 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010688 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689else
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693 /* AF_INET6 available check */
10694#include <sys/types.h>
10695#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010696int
10697main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010698{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010699int domain = AF_INET6;
10700 ;
10701 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702}
Martin v. Löwis11437992002-04-12 09:54:03 +000010703_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010704if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10707$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010709
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710else
Matthias Kloseb159a552010-04-25 21:00:44 +000010711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010715
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010719if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10721$as_echo_n "checking if RFC2553 API is available... " >&6; }
10722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010723/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010724
10725 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010726#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010727int
10728main ()
10729{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010730struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010731 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 ;
10733 return 0;
10734}
Matthias Kloseb159a552010-04-25 21:00:44 +000010735
Martin v. Löwis11437992002-04-12 09:54:03 +000010736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010737if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010738
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010740$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010741 ipv6=yes
10742
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010743else
Matthias Kloseb159a552010-04-25 21:00:44 +000010744
10745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010746$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010747 ipv6=no
10748
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010751fi
10752
10753if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010755
10756fi
10757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758fi
10759
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760
10761ipv6type=unknown
10762ipv6lib=none
10763ipv6trylibc=no
10764
10765if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10767$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010768 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10769 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770 case $i in
10771 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010773/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775#include <netinet/in.h>
10776#ifdef IPV6_INRIA_VERSION
10777yes
10778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010779_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010782 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010784rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785
10786 ;;
10787 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010789/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791#include <netinet/in.h>
10792#ifdef __KAME__
10793yes
10794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010795_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798 ipv6type=$i;
10799 ipv6lib=inet6
10800 ipv6libdir=/usr/local/v6/lib
10801 ipv6trylibc=yes
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 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010808/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010809
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810#include <features.h>
10811#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10812yes
10813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010814_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817 ipv6type=$i;
10818 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010820rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821
10822 ;;
10823 linux-inet6)
10824 if test -d /usr/inet6; then
10825 ipv6type=$i
10826 ipv6lib=inet6
10827 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010828 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829 fi
10830 ;;
10831 solaris)
10832 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010833 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834 ipv6type=$i
10835 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836 fi
10837 fi
10838 ;;
10839 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010841/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010842
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843#include <sys/param.h>
10844#ifdef _TOSHIBA_INET6
10845yes
10846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010847_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850 ipv6type=$i;
10851 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010852 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010854rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855
10856 ;;
10857 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010859/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861#include </usr/local/v6/include/sys/v6config.h>
10862#ifdef __V6D__
10863yes
10864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010865_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868 ipv6type=$i;
10869 ipv6lib=v6;
10870 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010871 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010873rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874
10875 ;;
10876 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010878/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880#include <sys/param.h>
10881#ifdef _ZETA_MINAMI_INET6
10882yes
10883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887 ipv6type=$i;
10888 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010889 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010891rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892
10893 ;;
10894 esac
10895 if test "$ipv6type" != "unknown"; then
10896 break
10897 fi
10898 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10900$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901fi
10902
10903if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10904 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10905 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10906 echo "using lib$ipv6lib"
10907 else
10908 if test $ipv6trylibc = "yes"; then
10909 echo "using libc"
10910 else
10911 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10912 echo "You need to fetch lib$ipv6lib.a from appropriate"
10913 echo 'ipv6 kit and compile beforehand.'
10914 exit 1
10915 fi
10916 fi
10917fi
10918
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10920$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10922/* end confdefs.h. */
10923 /* CAN_RAW_FD_FRAMES available check */
10924#include <linux/can/raw.h>
10925int
10926main ()
10927{
10928int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10929 ;
10930 return 0;
10931}
10932_ACEOF
10933if ac_fn_c_try_compile "$LINENO"; then :
10934
10935
10936$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10937
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10939$as_echo "yes" >&6; }
10940
10941else
10942
10943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10944$as_echo "no" >&6; }
10945
10946fi
10947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10948
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010949# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10951$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010953# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010954if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955 withval=$with_doc_strings;
10956fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010957
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010958
10959if test -z "$with_doc_strings"
10960then with_doc_strings="yes"
10961fi
10962if test "$with_doc_strings" != "no"
10963then
10964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010966
10967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10969$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010970
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010971# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10973$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010976if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977 withval=$with_pymalloc;
10978fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010979
Neil Schemenauera35c6882001-02-27 04:45:05 +000010980
Neil Schemenauer16c22972002-03-22 15:34:49 +000010981if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010982then
10983 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010984fi
10985if test "$with_pymalloc" != "no"
10986then
Martin v. Löwis11437992002-04-12 09:54:03 +000010987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010989
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010990 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10993$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010994
Nick Coghlan6ea41862017-06-11 13:16:15 +100010995# Check for --with-c-locale-coercion
10996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10997$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10998
10999# Check whether --with-c-locale-coercion was given.
11000if test "${with_c_locale_coercion+set}" = set; then :
11001 withval=$with_c_locale_coercion;
11002fi
11003
11004
11005if test -z "$with_c_locale_coercion"
11006then
11007 with_c_locale_coercion="yes"
11008fi
11009if test "$with_c_locale_coercion" != "no"
11010then
11011
11012$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11013
11014fi
11015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11016$as_echo "$with_c_locale_coercion" >&6; }
11017
11018# Check for --with-c-locale-warning
11019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11020$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11021
11022# Check whether --with-c-locale-warning was given.
11023if test "${with_c_locale_warning+set}" = set; then :
11024 withval=$with_c_locale_warning;
11025fi
11026
11027
11028if test -z "$with_c_locale_warning"
11029then
11030 with_c_locale_warning="yes"
11031fi
11032if test "$with_c_locale_warning" != "no"
11033then
11034
11035$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11036
11037fi
11038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11039$as_echo "$with_c_locale_warning" >&6; }
11040
Benjamin Peterson05159c42009-12-03 03:01:27 +000011041# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11043$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011044
11045# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011046if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011047 withval=$with_valgrind;
11048else
11049 with_valgrind=no
11050fi
11051
Matthias Kloseb9621712010-04-24 17:59:49 +000011052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11053$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011054if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 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 +020011056if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011057
Matthias Kloseb9621712010-04-24 17:59:49 +000011058$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011059
11060else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011061 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011062
11063fi
11064
11065
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011066 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011067fi
11068
Łukasz Langaa785c872016-09-09 17:37:37 -070011069# Check for DTrace support
11070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11071$as_echo_n "checking for --with-dtrace... " >&6; }
11072
11073# Check whether --with-dtrace was given.
11074if test "${with_dtrace+set}" = set; then :
11075 withval=$with_dtrace;
11076else
11077 with_dtrace=no
11078fi
11079
11080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11081$as_echo "$with_dtrace" >&6; }
11082
11083
11084
11085
11086
11087DTRACE=
11088DFLAGS=
11089DTRACE_HEADERS=
11090DTRACE_OBJS=
11091
11092if test "$with_dtrace" = "yes"
11093then
11094 # Extract the first word of "dtrace", so it can be a program name with args.
11095set dummy dtrace; ac_word=$2
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11097$as_echo_n "checking for $ac_word... " >&6; }
11098if ${ac_cv_path_DTRACE+:} false; then :
11099 $as_echo_n "(cached) " >&6
11100else
11101 case $DTRACE in
11102 [\\/]* | ?:[\\/]*)
11103 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11104 ;;
11105 *)
11106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11107for as_dir in $PATH
11108do
11109 IFS=$as_save_IFS
11110 test -z "$as_dir" && as_dir=.
11111 for ac_exec_ext in '' $ac_executable_extensions; do
11112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11113 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11115 break 2
11116 fi
11117done
11118 done
11119IFS=$as_save_IFS
11120
11121 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11122 ;;
11123esac
11124fi
11125DTRACE=$ac_cv_path_DTRACE
11126if test -n "$DTRACE"; then
11127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11128$as_echo "$DTRACE" >&6; }
11129else
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131$as_echo "no" >&6; }
11132fi
11133
11134
11135 if test "$DTRACE" = "not found"; then
11136 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11137 fi
11138
11139$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11140
11141 DTRACE_HEADERS="Include/pydtrace_probes.h"
11142
11143 # On OS X, DTrace providers do not need to be explicitly compiled and
11144 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11145 # generation flag '-G'. We check for presence of this flag, rather than
11146 # hardcoding support by OS, in the interest of robustness.
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11148$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11149if ${ac_cv_dtrace_link+:} false; then :
11150 $as_echo_n "(cached) " >&6
11151else
11152 ac_cv_dtrace_link=no
11153 echo 'BEGIN' > conftest.d
11154 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11155 ac_cv_dtrace_link=yes
11156
11157fi
11158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11159$as_echo "$ac_cv_dtrace_link" >&6; }
11160 if test "$ac_cv_dtrace_link" = "yes"; then
11161 DTRACE_OBJS="Python/pydtrace.o"
11162 fi
11163fi
11164
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011165# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011166
Guido van Rossum98935bf2001-09-05 19:13:16 +000011167DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011168
Guido van Rossume97ee181999-12-20 21:27:22 +000011169# the dlopen() function means we might want to use dynload_shlib.o. some
11170# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011171for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011172do :
11173 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011174if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011176#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011177_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011178
Guido van Rossume97ee181999-12-20 21:27:22 +000011179fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011180done
Guido van Rossume97ee181999-12-20 21:27:22 +000011181
Michael W. Hudson54241132001-12-07 15:38:26 +000011182
Guido van Rossume97ee181999-12-20 21:27:22 +000011183# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11184# loading of modules.
11185
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11187$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011188if test -z "$DYNLOADFILE"
11189then
11190 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011191 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11192 if test "$ac_cv_func_dlopen" = yes
11193 then DYNLOADFILE="dynload_shlib.o"
11194 else DYNLOADFILE="dynload_aix.o"
11195 fi
11196 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011197 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011198 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11199 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011200 *)
11201 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11202 # out any dynamic loading
11203 if test "$ac_cv_func_dlopen" = yes
11204 then DYNLOADFILE="dynload_shlib.o"
11205 else DYNLOADFILE="dynload_stub.o"
11206 fi
11207 ;;
11208 esac
11209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11211$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011212if test "$DYNLOADFILE" != "dynload_stub.o"
11213then
Martin v. Löwis11437992002-04-12 09:54:03 +000011214
Matthias Kloseb9621712010-04-24 17:59:49 +000011215$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011216
11217fi
11218
Neil Schemenauer4e425612001-06-19 15:44:15 +000011219# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11220
Michael W. Hudson54241132001-12-07 15:38:26 +000011221
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11223$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011224if test -z "$MACHDEP_OBJS"
11225then
Jack Jansene578a632001-08-15 01:27:14 +000011226 MACHDEP_OBJS=$extra_machdep_objs
11227else
11228 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011229fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011230if test -z "$MACHDEP_OBJS"; then
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11232$as_echo "none" >&6; }
11233else
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11235$as_echo "$MACHDEP_OBJS" >&6; }
11236fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011237
Guido van Rossum627b2d71993-12-24 10:39:16 +000011238# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011239for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011240 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011241 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011242 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011243 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011244 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011245 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011246 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011247 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011248 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011249 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011250 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011251 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011252 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011253 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11254 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011255 sigaction sigaltstack siginterrupt sigpending sigrelse \
11256 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011257 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011258 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011259 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011260do :
11261 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11262ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011263if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011265#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011266_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011267
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011268fi
11269done
11270
Michael W. Hudson54241132001-12-07 15:38:26 +000011271
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011272ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11273 #include <dirent.h>
11274"
11275if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11276
11277$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11278
11279fi
11280
11281
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011282# For some functions, having a definition is not sufficient, since
11283# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11285$as_echo_n "checking for chroot... " >&6; }
11286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011287/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011288#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011289int
11290main ()
11291{
11292void *x=chroot
11293 ;
11294 return 0;
11295}
11296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011300
Matthias Kloseb159a552010-04-25 21:00:44 +000011301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011303else
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306
11307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11310$as_echo_n "checking for link... " >&6; }
11311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011312/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011313#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011314int
11315main ()
11316{
11317void *x=link
11318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011325
Matthias Kloseb159a552010-04-25 21:00:44 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011327$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011328else
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011331
11332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11335$as_echo_n "checking for symlink... " >&6; }
11336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011337/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011338#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011339int
11340main ()
11341{
11342void *x=symlink
11343 ;
11344 return 0;
11345}
11346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011350
Matthias Kloseb159a552010-04-25 21:00:44 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011352$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011353else
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011356
11357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11360$as_echo_n "checking for fchdir... " >&6; }
11361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011362/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011363#include <unistd.h>
11364int
11365main ()
11366{
11367void *x=fchdir
11368 ;
11369 return 0;
11370}
11371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011373
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011375
Matthias Kloseb159a552010-04-25 21:00:44 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011377$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011378else
Matthias Kloseb9621712010-04-24 17:59:49 +000011379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011381
11382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11385$as_echo_n "checking for fsync... " >&6; }
11386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011387/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011388#include <unistd.h>
11389int
11390main ()
11391{
11392void *x=fsync
11393 ;
11394 return 0;
11395}
11396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011400
Matthias Kloseb159a552010-04-25 21:00:44 +000011401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011402$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011403else
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11405$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011406
11407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11410$as_echo_n "checking for fdatasync... " >&6; }
11411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011412/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011413#include <unistd.h>
11414int
11415main ()
11416{
11417void *x=fdatasync
11418 ;
11419 return 0;
11420}
11421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011425
Matthias Kloseb159a552010-04-25 21:00:44 +000011426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011427$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011428else
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11430$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011431
11432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11435$as_echo_n "checking for epoll... " >&6; }
11436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011437/* end confdefs.h. */
11438#include <sys/epoll.h>
11439int
11440main ()
11441{
11442void *x=epoll_create
11443 ;
11444 return 0;
11445}
11446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011450
Matthias Kloseb159a552010-04-25 21:00:44 +000011451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011452$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011453else
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011456
11457fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11460$as_echo_n "checking for epoll_create1... " >&6; }
11461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11462/* end confdefs.h. */
11463#include <sys/epoll.h>
11464int
11465main ()
11466{
11467void *x=epoll_create1
11468 ;
11469 return 0;
11470}
11471_ACEOF
11472if ac_fn_c_try_compile "$LINENO"; then :
11473
11474$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11475
11476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11477$as_echo "yes" >&6; }
11478else
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11480$as_echo "no" >&6; }
11481
11482fi
11483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11485$as_echo_n "checking for kqueue... " >&6; }
11486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011487/* end confdefs.h. */
11488
11489#include <sys/types.h>
11490#include <sys/event.h>
11491
11492int
11493main ()
11494{
11495int x=kqueue()
11496 ;
11497 return 0;
11498}
11499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011500if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011501
Matthias Kloseb9621712010-04-24 17:59:49 +000011502$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011503
Matthias Kloseb159a552010-04-25 21:00:44 +000011504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011505$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011506else
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11508$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011509
11510fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11513$as_echo_n "checking for prlimit... " >&6; }
11514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11515/* end confdefs.h. */
11516
11517#include <sys/time.h>
11518#include <sys/resource.h>
11519
11520int
11521main ()
11522{
11523void *x=prlimit
11524 ;
11525 return 0;
11526}
11527_ACEOF
11528if ac_fn_c_try_compile "$LINENO"; then :
11529
11530$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11531
11532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11533$as_echo "yes" >&6; }
11534else
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11536$as_echo "no" >&6; }
11537
11538fi
11539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11540
Martin v. Löwisd5843682002-11-21 20:41:28 +000011541# On some systems (eg. FreeBSD 5), we would find a definition of the
11542# functions ctermid_r, setgroups in the library, but no prototype
11543# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11544# address to avoid compiler warnings and potential miscompilations
11545# because of the missing prototypes.
11546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11548$as_echo_n "checking for ctermid_r... " >&6; }
11549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011550/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011551
Martin v. Löwisd5843682002-11-21 20:41:28 +000011552#include <stdio.h>
11553
Martin v. Löwisd5843682002-11-21 20:41:28 +000011554int
11555main ()
11556{
11557void* p = ctermid_r
11558 ;
11559 return 0;
11560}
11561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011565
Matthias Kloseb159a552010-04-25 21:00:44 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011568else
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011571
11572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11574
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11576$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011577if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011578 $as_echo_n "(cached) " >&6
11579else
11580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011581/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011582#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011583int
11584main ()
11585{
11586void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011587
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011588 ;
11589 return 0;
11590}
11591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011592if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011593 ac_cv_flock_decl=yes
11594else
11595 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011596
11597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011599
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011600fi
11601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11602$as_echo "$ac_cv_flock_decl" >&6; }
11603if test "x${ac_cv_flock_decl}" = xyes; then
11604 for ac_func in flock
11605do :
11606 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011607if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011608 cat >>confdefs.h <<_ACEOF
11609#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011610_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011611
Antoine Pitroua3000072010-09-07 14:52:42 +000011612else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011614$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011615if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011616 $as_echo_n "(cached) " >&6
11617else
11618 ac_check_lib_save_LIBS=$LIBS
11619LIBS="-lbsd $LIBS"
11620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11621/* end confdefs.h. */
11622
11623/* Override any GCC internal prototype to avoid an error.
11624 Use char because int might match the return type of a GCC
11625 builtin and then its argument prototype would still apply. */
11626#ifdef __cplusplus
11627extern "C"
11628#endif
11629char flock ();
11630int
11631main ()
11632{
11633return flock ();
11634 ;
11635 return 0;
11636}
11637_ACEOF
11638if ac_fn_c_try_link "$LINENO"; then :
11639 ac_cv_lib_bsd_flock=yes
11640else
11641 ac_cv_lib_bsd_flock=no
11642fi
11643rm -f core conftest.err conftest.$ac_objext \
11644 conftest$ac_exeext conftest.$ac_ext
11645LIBS=$ac_check_lib_save_LIBS
11646fi
11647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11648$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011649if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011650 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011651
11652
11653$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11654
11655
11656fi
11657
11658
11659fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011660done
11661
Antoine Pitroua3000072010-09-07 14:52:42 +000011662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11665$as_echo_n "checking for getpagesize... " >&6; }
11666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011667/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011668
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011669#include <unistd.h>
11670
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011671int
11672main ()
11673{
11674void* p = getpagesize
11675 ;
11676 return 0;
11677}
11678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011682
Matthias Kloseb159a552010-04-25 21:00:44 +000011683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11687$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011688
11689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011691
Victor Stinner984890f2011-11-24 13:53:38 +010011692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11693$as_echo_n "checking for broken unsetenv... " >&6; }
11694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11695/* end confdefs.h. */
11696
11697#include <stdlib.h>
11698
11699int
11700main ()
11701{
11702int res = unsetenv("DUMMY")
11703 ;
11704 return 0;
11705}
11706_ACEOF
11707if ac_fn_c_try_compile "$LINENO"; then :
11708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11709$as_echo "no" >&6; }
11710else
11711
11712$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11713
11714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11715$as_echo "yes" >&6; }
11716
11717fi
11718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11719
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011720for ac_prog in true
11721do
11722 # Extract the first word of "$ac_prog", so it can be a program name with args.
11723set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11725$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011726if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011728else
11729 if test -n "$TRUE"; then
11730 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11731else
11732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11733for as_dir in $PATH
11734do
11735 IFS=$as_save_IFS
11736 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011737 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011739 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 $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 +000011741 break 2
11742 fi
11743done
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011746
11747fi
11748fi
11749TRUE=$ac_cv_prog_TRUE
11750if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11752$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011753else
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11755$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011756fi
11757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011758
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011759 test -n "$TRUE" && break
11760done
11761test -n "$TRUE" || TRUE="/bin/true"
11762
11763
Matthias Kloseb9621712010-04-24 17:59:49 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11765$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011766if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011768else
11769 ac_check_lib_save_LIBS=$LIBS
11770LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011772/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774/* Override any GCC internal prototype to avoid an error.
11775 Use char because int might match the return type of a GCC
11776 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011777#ifdef __cplusplus
11778extern "C"
11779#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011780char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011781int
11782main ()
11783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011784return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011785 ;
11786 return 0;
11787}
11788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011790 ac_cv_lib_c_inet_aton=yes
11791else
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011794rm -f core conftest.err conftest.$ac_objext \
11795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796LIBS=$ac_check_lib_save_LIBS
11797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11799$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011800if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011801 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11804$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011805if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011807else
11808 ac_check_lib_save_LIBS=$LIBS
11809LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011811/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011813/* Override any GCC internal prototype to avoid an error.
11814 Use char because int might match the return type of a GCC
11815 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011816#ifdef __cplusplus
11817extern "C"
11818#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011819char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820int
11821main ()
11822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011823return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011824 ;
11825 return 0;
11826}
11827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011828if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011829 ac_cv_lib_resolv_inet_aton=yes
11830else
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011833rm -f core conftest.err conftest.$ac_objext \
11834 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011835LIBS=$ac_check_lib_save_LIBS
11836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11838$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011839if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840 cat >>confdefs.h <<_ACEOF
11841#define HAVE_LIBRESOLV 1
11842_ACEOF
11843
11844 LIBS="-lresolv $LIBS"
11845
11846fi
11847
11848
11849fi
11850
11851
Christian Heimesd0764e22007-12-04 15:00:33 +000011852# On Tru64, chflags seems to be present, but calling it will
11853# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11855$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011856if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011858else
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011860 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011863/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011864
Christian Heimesd0764e22007-12-04 15:00:33 +000011865#include <sys/stat.h>
11866#include <unistd.h>
11867int main(int argc, char*argv[])
11868{
11869 if(chflags(argv[0], 0) != 0)
11870 return 1;
11871 return 0;
11872}
Ned Deily3eb67d52011-06-28 00:00:28 -070011873
Christian Heimesd0764e22007-12-04 15:00:33 +000011874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011875if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011876 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011882fi
11883
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011884
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11887$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011888if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011890if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011891 ac_cv_have_chflags="yes"
11892else
11893 ac_cv_have_chflags="no"
11894fi
11895
11896fi
11897if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011898
Matthias Kloseb9621712010-04-24 17:59:49 +000011899$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011900
11901fi
11902
Matthias Kloseb9621712010-04-24 17:59:49 +000011903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11904$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011905if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011906 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011907else
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011909 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011912/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011913
Christian Heimesd0764e22007-12-04 15:00:33 +000011914#include <sys/stat.h>
11915#include <unistd.h>
11916int main(int argc, char*argv[])
11917{
11918 if(lchflags(argv[0], 0) != 0)
11919 return 1;
11920 return 0;
11921}
Ned Deily3eb67d52011-06-28 00:00:28 -070011922
Christian Heimesd0764e22007-12-04 15:00:33 +000011923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11930 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011931fi
11932
11933
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11936$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011937if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011939if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011940 ac_cv_have_lchflags="yes"
11941else
11942 ac_cv_have_lchflags="no"
11943fi
11944
11945fi
11946if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011947
Matthias Kloseb9621712010-04-24 17:59:49 +000011948$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011949
11950fi
11951
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011952case $ac_sys_system/$ac_sys_release in
11953Darwin/*)
11954 _CUR_CFLAGS="${CFLAGS}"
11955 _CUR_LDFLAGS="${LDFLAGS}"
11956 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11957 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11958 ;;
11959esac
11960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11962$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011963if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011965else
11966 ac_check_lib_save_LIBS=$LIBS
11967LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011969/* end confdefs.h. */
11970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011971/* Override any GCC internal prototype to avoid an error.
11972 Use char because int might match the return type of a GCC
11973 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011974#ifdef __cplusplus
11975extern "C"
11976#endif
11977char inflateCopy ();
11978int
11979main ()
11980{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011981return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011982 ;
11983 return 0;
11984}
11985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011986if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011987 ac_cv_lib_z_inflateCopy=yes
11988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011991rm -f core conftest.err conftest.$ac_objext \
11992 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011993LIBS=$ac_check_lib_save_LIBS
11994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11996$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011997if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012000
12001fi
12002
12003
12004case $ac_sys_system/$ac_sys_release in
12005Darwin/*)
12006 CFLAGS="${_CUR_CFLAGS}"
12007 LDFLAGS="${_CUR_LDFLAGS}"
12008 ;;
12009esac
12010
Matthias Kloseb9621712010-04-24 17:59:49 +000012011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12012$as_echo_n "checking for hstrerror... " >&6; }
12013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012014/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012015
Martin v. Löwise9416172003-05-03 10:12:45 +000012016#include <netdb.h>
12017
Martin v. Löwise9416172003-05-03 10:12:45 +000012018int
12019main ()
12020{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012021void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012022 ;
12023 return 0;
12024}
12025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012026if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012029
Matthias Kloseb159a552010-04-25 21:00:44 +000012030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012031$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12034$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012035
12036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012037rm -f core conftest.err conftest.$ac_objext \
12038 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12041$as_echo_n "checking for inet_aton... " >&6; }
12042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012043/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012044
Martin v. Löwis86d66262006-02-17 08:40:11 +000012045#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012046#include <sys/socket.h>
12047#include <netinet/in.h>
12048#include <arpa/inet.h>
12049
Martin v. Löwise9416172003-05-03 10:12:45 +000012050int
12051main ()
12052{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012053void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012054 ;
12055 return 0;
12056}
12057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012058if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012061
Matthias Kloseb159a552010-04-25 21:00:44 +000012062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012063$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012064else
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12066$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012067
12068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012069rm -f core conftest.err conftest.$ac_objext \
12070 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071
Matthias Kloseb9621712010-04-24 17:59:49 +000012072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12073$as_echo_n "checking for inet_pton... " >&6; }
12074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012075/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012076
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012077#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012078#include <sys/socket.h>
12079#include <netinet/in.h>
12080#include <arpa/inet.h>
12081
Martin v. Löwise9416172003-05-03 10:12:45 +000012082int
12083main ()
12084{
12085void* p = inet_pton
12086 ;
12087 return 0;
12088}
12089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012093
Matthias Kloseb159a552010-04-25 21:00:44 +000012094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012095$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012096else
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12098$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012099
12100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012102
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012103# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12105$as_echo_n "checking for setgroups... " >&6; }
12106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012107/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012108
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012109#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012110#ifdef HAVE_GRP_H
12111#include <grp.h>
12112#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012113
Martin v. Löwisd5843682002-11-21 20:41:28 +000012114int
12115main ()
12116{
12117void* p = setgroups
12118 ;
12119 return 0;
12120}
12121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012125
Matthias Kloseb159a552010-04-25 21:00:44 +000012126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012127$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12130$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012131
12132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012134
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012135# check for openpty and forkpty
12136
12137for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012138do :
12139 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012140if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012141 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012142#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012143_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012144
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12147$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012148if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012150else
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012152LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156/* Override any GCC internal prototype to avoid an error.
12157 Use char because int might match the return type of a GCC
12158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012159#ifdef __cplusplus
12160extern "C"
12161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012162char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012163int
12164main ()
12165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 ;
12168 return 0;
12169}
12170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012173else
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176rm -f core conftest.err conftest.$ac_objext \
12177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012178LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12181$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012182if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012184 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012185else
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12187$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012188if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012190else
12191 ac_check_lib_save_LIBS=$LIBS
12192LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012194/* end confdefs.h. */
12195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196/* Override any GCC internal prototype to avoid an error.
12197 Use char because int might match the return type of a GCC
12198 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012199#ifdef __cplusplus
12200extern "C"
12201#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012202char openpty ();
12203int
12204main ()
12205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012207 ;
12208 return 0;
12209}
12210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012211if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012212 ac_cv_lib_bsd_openpty=yes
12213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012216rm -f core conftest.err conftest.$ac_objext \
12217 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012218LIBS=$ac_check_lib_save_LIBS
12219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12221$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012222if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012224 LIBS="$LIBS -lbsd"
12225fi
12226
12227
12228fi
12229
Fred Drake8cef4cf2000-06-28 16:40:38 +000012230
12231fi
12232done
12233
12234for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012235do :
12236 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012237if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012238 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012239#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012240_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012241
Fred Drake8cef4cf2000-06-28 16:40:38 +000012242else
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12244$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012245if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012247else
Martin v. Löwis11437992002-04-12 09:54:03 +000012248 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012249LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253/* Override any GCC internal prototype to avoid an error.
12254 Use char because int might match the return type of a GCC
12255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012256#ifdef __cplusplus
12257extern "C"
12258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012259char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012260int
12261main ()
12262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 ;
12265 return 0;
12266}
12267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270else
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273rm -f core conftest.err conftest.$ac_objext \
12274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012275LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12278$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012279if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012281 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012282else
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12284$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012285if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012287else
12288 ac_check_lib_save_LIBS=$LIBS
12289LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012291/* end confdefs.h. */
12292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293/* Override any GCC internal prototype to avoid an error.
12294 Use char because int might match the return type of a GCC
12295 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012296#ifdef __cplusplus
12297extern "C"
12298#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012299char forkpty ();
12300int
12301main ()
12302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012304 ;
12305 return 0;
12306}
12307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012309 ac_cv_lib_bsd_forkpty=yes
12310else
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012313rm -f core conftest.err conftest.$ac_objext \
12314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012315LIBS=$ac_check_lib_save_LIBS
12316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12318$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012319if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012321 LIBS="$LIBS -lbsd"
12322fi
12323
12324
12325fi
12326
Fred Drake8cef4cf2000-06-28 16:40:38 +000012327
12328fi
12329done
12330
Jack Jansendd19cf82001-12-06 22:36:17 +000012331
Christian Heimesb186d002008-03-18 15:15:01 +000012332# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012333for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012334do :
12335 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012336if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012337 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012338#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012339_ACEOF
12340
12341fi
12342done
12343
12344
Michael W. Hudson54241132001-12-07 15:38:26 +000012345# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012346for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012347do :
12348 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12349ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012350if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012351 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012352#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012353_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012354
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012356done
12357
Michael W. Hudson54241132001-12-07 15:38:26 +000012358
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012359ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012360if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012361 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012362
Martin v. Löwis1142de32002-03-29 16:28:31 +000012363else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012365 *" dup2.$ac_objext "* ) ;;
12366 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012368esac
12369
Martin v. Löwis1142de32002-03-29 16:28:31 +000012370fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012371
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012372ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012373if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012374 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12375
12376else
12377 case " $LIBOBJS " in
12378 *" strdup.$ac_objext "* ) ;;
12379 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12380 ;;
12381esac
12382
12383fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012384
12385
12386for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012387do :
12388 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012389if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012394/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012395#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012396int
12397main ()
12398{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012399getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012400 ;
12401 return 0;
12402}
12403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012407
Guido van Rossum627b2d71993-12-24 10:39:16 +000012408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012410
Guido van Rossum627b2d71993-12-24 10:39:16 +000012411fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012412done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012413
Jack Jansen150753c2003-03-29 22:07:47 +000012414for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012415do :
12416 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012417if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012419#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012422/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012423#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012424int
12425main ()
12426{
12427setpgrp(0,0);
12428 ;
12429 return 0;
12430}
12431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
Matthias Kloseb9621712010-04-24 17:59:49 +000012434$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012435
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012438
12439fi
12440done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012441
Thomas Wouters3a584202000-08-05 23:28:51 +000012442for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012443do :
12444 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012445if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012446 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012447#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012450/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012451#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012452int
12453main ()
12454{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012455gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012456 ;
12457 return 0;
12458}
12459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012460if ac_fn_c_try_compile "$LINENO"; then :
12461
Guido van Rossum627b2d71993-12-24 10:39:16 +000012462else
Skip Montanaro6dead952003-09-25 14:50:04 +000012463
Matthias Kloseb9621712010-04-24 17:59:49 +000012464$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012465
Martin v. Löwis11437992002-04-12 09:54:03 +000012466
Guido van Rossum627b2d71993-12-24 10:39:16 +000012467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012469
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012470fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012471done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012472
Michael W. Hudson54241132001-12-07 15:38:26 +000012473
Victor Stinnere0be4232011-10-25 13:06:09 +020012474for ac_func in clock_gettime
12475do :
12476 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12477if test "x$ac_cv_func_clock_gettime" = xyes; then :
12478 cat >>confdefs.h <<_ACEOF
12479#define HAVE_CLOCK_GETTIME 1
12480_ACEOF
12481
12482else
12483
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12485$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12486if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12487 $as_echo_n "(cached) " >&6
12488else
12489 ac_check_lib_save_LIBS=$LIBS
12490LIBS="-lrt $LIBS"
12491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12492/* end confdefs.h. */
12493
12494/* Override any GCC internal prototype to avoid an error.
12495 Use char because int might match the return type of a GCC
12496 builtin and then its argument prototype would still apply. */
12497#ifdef __cplusplus
12498extern "C"
12499#endif
12500char clock_gettime ();
12501int
12502main ()
12503{
12504return clock_gettime ();
12505 ;
12506 return 0;
12507}
12508_ACEOF
12509if ac_fn_c_try_link "$LINENO"; then :
12510 ac_cv_lib_rt_clock_gettime=yes
12511else
12512 ac_cv_lib_rt_clock_gettime=no
12513fi
12514rm -f core conftest.err conftest.$ac_objext \
12515 conftest$ac_exeext conftest.$ac_ext
12516LIBS=$ac_check_lib_save_LIBS
12517fi
12518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12519$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12520if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12521
Victor Stinner7efb8332014-08-29 15:41:08 +020012522 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012523 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12524
12525
12526$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12527
12528
12529fi
12530
12531
12532fi
12533done
12534
12535
12536for ac_func in clock_getres
12537do :
12538 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12539if test "x$ac_cv_func_clock_getres" = xyes; then :
12540 cat >>confdefs.h <<_ACEOF
12541#define HAVE_CLOCK_GETRES 1
12542_ACEOF
12543
12544else
12545
12546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12547$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12548if ${ac_cv_lib_rt_clock_getres+:} false; then :
12549 $as_echo_n "(cached) " >&6
12550else
12551 ac_check_lib_save_LIBS=$LIBS
12552LIBS="-lrt $LIBS"
12553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12554/* end confdefs.h. */
12555
12556/* Override any GCC internal prototype to avoid an error.
12557 Use char because int might match the return type of a GCC
12558 builtin and then its argument prototype would still apply. */
12559#ifdef __cplusplus
12560extern "C"
12561#endif
12562char clock_getres ();
12563int
12564main ()
12565{
12566return clock_getres ();
12567 ;
12568 return 0;
12569}
12570_ACEOF
12571if ac_fn_c_try_link "$LINENO"; then :
12572 ac_cv_lib_rt_clock_getres=yes
12573else
12574 ac_cv_lib_rt_clock_getres=no
12575fi
12576rm -f core conftest.err conftest.$ac_objext \
12577 conftest$ac_exeext conftest.$ac_ext
12578LIBS=$ac_check_lib_save_LIBS
12579fi
12580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12581$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12582if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12583
12584 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12585
12586
12587fi
12588
12589
12590fi
12591done
12592
12593
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012594for ac_func in clock_settime
12595do :
12596 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12597if test "x$ac_cv_func_clock_settime" = xyes; then :
12598 cat >>confdefs.h <<_ACEOF
12599#define HAVE_CLOCK_SETTIME 1
12600_ACEOF
12601
12602else
12603
12604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12605$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12606if ${ac_cv_lib_rt_clock_settime+:} false; then :
12607 $as_echo_n "(cached) " >&6
12608else
12609 ac_check_lib_save_LIBS=$LIBS
12610LIBS="-lrt $LIBS"
12611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12612/* end confdefs.h. */
12613
12614/* Override any GCC internal prototype to avoid an error.
12615 Use char because int might match the return type of a GCC
12616 builtin and then its argument prototype would still apply. */
12617#ifdef __cplusplus
12618extern "C"
12619#endif
12620char clock_settime ();
12621int
12622main ()
12623{
12624return clock_settime ();
12625 ;
12626 return 0;
12627}
12628_ACEOF
12629if ac_fn_c_try_link "$LINENO"; then :
12630 ac_cv_lib_rt_clock_settime=yes
12631else
12632 ac_cv_lib_rt_clock_settime=no
12633fi
12634rm -f core conftest.err conftest.$ac_objext \
12635 conftest$ac_exeext conftest.$ac_ext
12636LIBS=$ac_check_lib_save_LIBS
12637fi
12638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12639$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12640if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12641
12642 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12643
12644
12645fi
12646
12647
12648fi
12649done
12650
12651
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12653$as_echo_n "checking for major... " >&6; }
12654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012656
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012657#if defined(MAJOR_IN_MKDEV)
12658#include <sys/mkdev.h>
12659#elif defined(MAJOR_IN_SYSMACROS)
12660#include <sys/sysmacros.h>
12661#else
12662#include <sys/types.h>
12663#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012664
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012665int
12666main ()
12667{
12668
12669 makedev(major(0),minor(0));
12670
12671 ;
12672 return 0;
12673}
12674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012675if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012676
12677
Matthias Kloseb9621712010-04-24 17:59:49 +000012678$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12681$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012682
12683else
Skip Montanaro6dead952003-09-25 14:50:04 +000012684
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12686$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012687
12688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012689rm -f core conftest.err conftest.$ac_objext \
12690 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012691
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012692# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12693# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12695$as_echo_n "checking for if_nameindex... " >&6; }
12696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12697/* end confdefs.h. */
12698
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012699#include <stdio.h>
12700#ifdef STDC_HEADERS
12701# include <stdlib.h>
12702# include <stddef.h>
12703#else
12704# ifdef HAVE_STDLIB_H
12705# include <stdlib.h>
12706# endif
12707#endif
12708#ifdef HAVE_SYS_SOCKET_H
12709# include <sys/socket.h>
12710#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012711#ifdef HAVE_NET_IF_H
12712# include <net/if.h>
12713#endif
12714
12715int
12716main ()
12717{
12718struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12719 ;
12720 return 0;
12721}
12722_ACEOF
12723if ac_fn_c_try_link "$LINENO"; then :
12724
12725$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12726
12727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12728$as_echo "yes" >&6; }
12729else
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12731$as_echo "no" >&6; }
12732
12733fi
12734rm -f core conftest.err conftest.$ac_objext \
12735 conftest$ac_exeext conftest.$ac_ext
12736
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012737# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12738# macro is not defined in android-ndk-r13.
12739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12740$as_echo_n "checking for lockf... " >&6; }
12741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12742/* end confdefs.h. */
12743#include <unistd.h>
12744int
12745main ()
12746{
12747lockf(0, F_LOCK, 0);
12748 ;
12749 return 0;
12750}
12751_ACEOF
12752if ac_fn_c_try_link "$LINENO"; then :
12753
12754$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12755
12756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12757$as_echo "yes" >&6; }
12758else
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12760$as_echo "no" >&6; }
12761
12762fi
12763rm -f core conftest.err conftest.$ac_objext \
12764 conftest$ac_exeext conftest.$ac_ext
12765
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012766# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012767# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12769$as_echo_n "checking for getaddrinfo... " >&6; }
12770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012771/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012772
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012773#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012774#include <sys/socket.h>
12775#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012776#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012777
Martin v. Löwis11437992002-04-12 09:54:03 +000012778int
12779main ()
12780{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012781getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012782 ;
12783 return 0;
12784}
12785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012786if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012787 have_getaddrinfo=yes
12788else
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012791rm -f core conftest.err conftest.$ac_objext \
12792 conftest$ac_exeext conftest.$ac_ext
12793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12794$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012795if test $have_getaddrinfo = yes
12796then
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12798$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012799 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012801else
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012803
12804if test "${enable_ipv6+set}" = set; then
12805 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12806else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012807 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012808fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012809else
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012811/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012812
Stefan Krah19c21392012-11-22 23:47:32 +010012813#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012814#include <sys/types.h>
12815#include <netdb.h>
12816#include <string.h>
12817#include <sys/socket.h>
12818#include <netinet/in.h>
12819
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012820int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012821{
12822 int passive, gaierr, inet4 = 0, inet6 = 0;
12823 struct addrinfo hints, *ai, *aitop;
12824 char straddr[INET6_ADDRSTRLEN], strport[16];
12825
12826 for (passive = 0; passive <= 1; passive++) {
12827 memset(&hints, 0, sizeof(hints));
12828 hints.ai_family = AF_UNSPEC;
12829 hints.ai_flags = passive ? AI_PASSIVE : 0;
12830 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012831 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012832 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12833 (void)gai_strerror(gaierr);
12834 goto bad;
12835 }
12836 for (ai = aitop; ai; ai = ai->ai_next) {
12837 if (ai->ai_addr == NULL ||
12838 ai->ai_addrlen == 0 ||
12839 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12840 straddr, sizeof(straddr), strport, sizeof(strport),
12841 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12842 goto bad;
12843 }
12844 switch (ai->ai_family) {
12845 case AF_INET:
12846 if (strcmp(strport, "54321") != 0) {
12847 goto bad;
12848 }
12849 if (passive) {
12850 if (strcmp(straddr, "0.0.0.0") != 0) {
12851 goto bad;
12852 }
12853 } else {
12854 if (strcmp(straddr, "127.0.0.1") != 0) {
12855 goto bad;
12856 }
12857 }
12858 inet4++;
12859 break;
12860 case AF_INET6:
12861 if (strcmp(strport, "54321") != 0) {
12862 goto bad;
12863 }
12864 if (passive) {
12865 if (strcmp(straddr, "::") != 0) {
12866 goto bad;
12867 }
12868 } else {
12869 if (strcmp(straddr, "::1") != 0) {
12870 goto bad;
12871 }
12872 }
12873 inet6++;
12874 break;
12875 case AF_UNSPEC:
12876 goto bad;
12877 break;
12878 default:
12879 /* another family support? */
12880 break;
12881 }
12882 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012883 freeaddrinfo(aitop);
12884 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012885 }
12886
12887 if (!(inet4 == 0 || inet4 == 2))
12888 goto bad;
12889 if (!(inet6 == 0 || inet6 == 2))
12890 goto bad;
12891
12892 if (aitop)
12893 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012894 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012895
12896 bad:
12897 if (aitop)
12898 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012899 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012900}
12901
Martin v. Löwis11437992002-04-12 09:54:03 +000012902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012903if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012904 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012905else
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012912fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012913
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12917$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12918
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012919if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012920then
12921 if test $ipv6 = yes
12922 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012923 echo 'Fatal: You must get working getaddrinfo() function.'
12924 echo ' or you can specify "--disable-ipv6"'.
12925 exit 1
12926 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012927else
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012930
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012931fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012932
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012933for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012934do :
12935 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012936if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012938#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012939_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012940
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012941fi
12942done
12943
Michael W. Hudson54241132001-12-07 15:38:26 +000012944
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12947$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012948if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950else
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012952/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953#include <sys/types.h>
12954#include <sys/time.h>
12955#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012956
Martin v. Löwis11437992002-04-12 09:54:03 +000012957int
12958main ()
12959{
12960if ((struct tm *) 0)
12961return 0;
12962 ;
12963 return 0;
12964}
12965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012966if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12974$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012975if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978
12979fi
12980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12982$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012983if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012984 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012985else
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012987/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012988#include <sys/types.h>
12989#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012990
Martin v. Löwis11437992002-04-12 09:54:03 +000012991int
12992main ()
12993{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994struct tm tm;
12995 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013001if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013002 ac_cv_struct_tm=time.h
13003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13009$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013010if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013013
13014fi
13015
Matthias Kloseb9621712010-04-24 17:59:49 +000013016ac_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 +000013017#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019"
Victor Stinnere0be4232011-10-25 13:06:09 +020013020if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
13022cat >>confdefs.h <<_ACEOF
13023#define HAVE_STRUCT_TM_TM_ZONE 1
13024_ACEOF
13025
13026
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013027fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013028
Martin v. Löwis11437992002-04-12 09:54:03 +000013029if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032
13033else
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13035"
Victor Stinnere0be4232011-10-25 13:06:09 +020013036if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038else
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040fi
13041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013043#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044_ACEOF
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13047$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013048if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013050else
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013052/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013053#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054#if !HAVE_DECL_TZNAME
13055extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
Martin v. Löwis11437992002-04-12 09:54:03 +000013058int
13059main ()
13060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013062 ;
13063 return 0;
13064}
13065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013066if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013067 ac_cv_var_tzname=yes
13068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013071rm -f core conftest.err conftest.$ac_objext \
13072 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13075$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013076 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013080 fi
13081fi
13082
Matthias Kloseb9621712010-04-24 17:59:49 +000013083ac_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 +020013084if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013085
13086cat >>confdefs.h <<_ACEOF
13087#define HAVE_STRUCT_STAT_ST_RDEV 1
13088_ACEOF
13089
13090
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013091fi
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093ac_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 +020013094if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013095
Martin v. Löwis11437992002-04-12 09:54:03 +000013096cat >>confdefs.h <<_ACEOF
13097#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13098_ACEOF
13099
13100
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013101fi
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103ac_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 +020013104if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013105
13106cat >>confdefs.h <<_ACEOF
13107#define HAVE_STRUCT_STAT_ST_FLAGS 1
13108_ACEOF
13109
13110
13111fi
13112
Matthias Kloseb9621712010-04-24 17:59:49 +000013113ac_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 +020013114if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013115
13116cat >>confdefs.h <<_ACEOF
13117#define HAVE_STRUCT_STAT_ST_GEN 1
13118_ACEOF
13119
13120
13121fi
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123ac_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 +020013124if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013125
13126cat >>confdefs.h <<_ACEOF
13127#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13128_ACEOF
13129
13130
13131fi
13132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133ac_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 +020013134if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013135
Martin v. Löwis11437992002-04-12 09:54:03 +000013136cat >>confdefs.h <<_ACEOF
13137#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13138_ACEOF
13139
13140
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013141fi
13142
Stefan Krah267b6392016-04-26 01:09:18 +020013143ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13144 #include <sys/types.h>
13145 #include <pwd.h>
13146
13147"
13148if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13149
13150cat >>confdefs.h <<_ACEOF
13151#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13152_ACEOF
13153
13154
13155fi
13156ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13157 #include <sys/types.h>
13158 #include <pwd.h>
13159
13160"
13161if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13162
13163cat >>confdefs.h <<_ACEOF
13164#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13165_ACEOF
13166
13167
13168fi
13169
Zachary Ware6a6967e2016-10-01 00:47:27 -050013170# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13171ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13172"
13173if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13174
13175cat >>confdefs.h <<_ACEOF
13176#define HAVE_SIGINFO_T_SI_BAND 1
13177_ACEOF
13178
13179
13180fi
13181
Michael W. Hudson54241132001-12-07 15:38:26 +000013182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13184$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013185if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013187else
Matthias Kloseb159a552010-04-25 21:00:44 +000013188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013190/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013191#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013192int
13193main ()
13194{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013195return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 ;
13197 return 0;
13198}
13199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013200if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013201 ac_cv_header_time_altzone=yes
13202else
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207fi
13208
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13210$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013211if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013214
13215fi
13216
Guido van Rossumda88dad1995-01-26 00:46:29 +000013217was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13219$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013221/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013222
13223#include <sys/types.h>
13224#include <sys/select.h>
13225#include <sys/time.h>
13226
Martin v. Löwis11437992002-04-12 09:54:03 +000013227int
13228main ()
13229{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013230;
Martin v. Löwis11437992002-04-12 09:54:03 +000013231 ;
13232 return 0;
13233}
13234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013236
13237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013240 was_it_defined=yes
13241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13245$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13248$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013249if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013253/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013254#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013255int
13256main ()
13257{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013258struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 ;
13260 return 0;
13261}
13262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013263if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013264 ac_cv_struct_addrinfo=yes
13265else
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13269fi
13270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13272$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013273if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276
13277fi
13278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13280$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013281if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013285/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013286
13287# include <sys/types.h>
13288# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013289int
13290main ()
13291{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 ;
13294 return 0;
13295}
13296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013298 ac_cv_struct_sockaddr_storage=yes
13299else
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13303fi
13304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13306$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013307if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310
13311fi
13312
Christian Heimesdffa3942016-09-05 23:54:41 +020013313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13314$as_echo_n "checking for sockaddr_alg... " >&6; }
13315if ${ac_cv_struct_sockaddr_alg+:} false; then :
13316 $as_echo_n "(cached) " >&6
13317else
13318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13319/* end confdefs.h. */
13320
13321# include <sys/types.h>
13322# include <sys/socket.h>
13323# include <linux/if_alg.h>
13324int
13325main ()
13326{
13327struct sockaddr_alg s
13328 ;
13329 return 0;
13330}
13331_ACEOF
13332if ac_fn_c_try_compile "$LINENO"; then :
13333 ac_cv_struct_sockaddr_alg=yes
13334else
13335 ac_cv_struct_sockaddr_alg=no
13336fi
13337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13338fi
13339
13340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13341$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13342if test $ac_cv_struct_sockaddr_alg = yes; then
13343
13344$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13345
13346fi
13347
Guido van Rossum627b2d71993-12-24 10:39:16 +000013348# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13351$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013352if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013354else
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013357$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013358int
13359main ()
13360{
13361static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013362test_array [0] = 0;
13363return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
13365 ;
13366 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013367}
Martin v. Löwis11437992002-04-12 09:54:03 +000013368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013370 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13377$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013378if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013380
13381fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13384$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013385if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013387else
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013389/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391int
13392main ()
13393{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013394
Martin v. Löwis11437992002-04-12 09:54:03 +000013395#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013396 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013398 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013399 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400 char const *const *pcpcc;
13401 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013402 /* NEC SVR4.0.2 mips cc rejects this. */
13403 struct point {int x, y;};
13404 static struct point const zero = {0,0};
13405 /* AIX XL C 1.02.0.0 rejects this.
13406 It does not let you subtract one const X* pointer from another in
13407 an arm of an if-expression whose if-part is not a constant
13408 expression */
13409 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412 ++pcpcc;
13413 ppc = (char**) pcpcc;
13414 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013415 { /* SCO 3.2v4 cc rejects this sort of thing. */
13416 char tx;
13417 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013419
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 }
13423 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13424 int x[] = {25, 17};
13425 const int *foo = &x[0];
13426 ++foo;
13427 }
13428 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13429 typedef const int *iptr;
13430 iptr p = 0;
13431 ++p;
13432 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013433 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013435 struct s { int j; const int *ap[3]; } bx;
13436 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 }
13438 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13439 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013440 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013443#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013444
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 ;
13446 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447}
Martin v. Löwis11437992002-04-12 09:54:03 +000013448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013449if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450 ac_cv_c_const=yes
13451else
Matthias Kloseb9621712010-04-24 17:59:49 +000013452 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13457$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013458if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013461
13462fi
13463
Michael W. Hudson54241132001-12-07 15:38:26 +000013464
Guido van Rossumda88dad1995-01-26 00:46:29 +000013465works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13467$as_echo_n "checking for working signed char... " >&6; }
13468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013469/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013470
Martin v. Löwis11437992002-04-12 09:54:03 +000013471int
13472main ()
13473{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013474signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013475 ;
13476 return 0;
13477}
13478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013479if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013480 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013481else
Skip Montanaro6dead952003-09-25 14:50:04 +000013482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013484
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013485
Guido van Rossum7f43da71994-08-01 12:15:30 +000013486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13489$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013490
Guido van Rossumda88dad1995-01-26 00:46:29 +000013491have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13493$as_echo_n "checking for prototypes... " >&6; }
13494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013495/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013496int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013497int
13498main ()
13499{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013500return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013501 ;
13502 return 0;
13503}
13504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
Matthias Kloseb159a552010-04-25 21:00:44 +000013509 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13513$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013514
Guido van Rossumda88dad1995-01-26 00:46:29 +000013515works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13517$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013519/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013520
13521#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013522int foo(int x, ...) {
13523 va_list va;
13524 va_start(va, x);
13525 va_arg(va, int);
13526 va_arg(va, char *);
13527 va_arg(va, double);
13528 return 0;
13529}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013530
Martin v. Löwis11437992002-04-12 09:54:03 +000013531int
13532main ()
13533{
Guido van Rossum90eea071996-08-30 20:58:57 +000013534return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013535 ;
13536 return 0;
13537}
13538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013543
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013544 works=yes
13545
Guido van Rossum627b2d71993-12-24 10:39:16 +000013546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13549$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013550
Martin v. Löwisd6320502004-08-12 13:45:08 +000013551# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13553$as_echo_n "checking for socketpair... " >&6; }
13554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013555/* end confdefs.h. */
13556
13557#include <sys/types.h>
13558#include <sys/socket.h>
13559
13560int
13561main ()
13562{
13563void *x=socketpair
13564 ;
13565 return 0;
13566}
13567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013568if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013571
Matthias Kloseb159a552010-04-25 21:00:44 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013573$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013574else
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13576$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013577
13578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013580
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013581# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13583$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013585/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013586#include <sys/types.h>
13587#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013588int
13589main ()
13590{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013591struct sockaddr x;
13592x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 ;
13594 return 0;
13595}
13596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013597if ac_fn_c_try_compile "$LINENO"; then :
13598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13599$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013602
13603else
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13605$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013606
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013611
13612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013614if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13619$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013620 OLD_CFLAGS=$CFLAGS
13621 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013623/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013624
13625# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013626
Martin v. Löwis11437992002-04-12 09:54:03 +000013627int
13628main ()
13629{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013630
13631 char *name;
13632 struct hostent *he, *res;
13633 char buffer[2048];
13634 int buflen = 2048;
13635 int h_errnop;
13636
13637 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013638
13639 ;
13640 return 0;
13641}
13642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013644
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013646
Martin v. Löwis11437992002-04-12 09:54:03 +000013647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13651$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013653else
Skip Montanaro6dead952003-09-25 14:50:04 +000013654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13656$as_echo "no" >&6; }
13657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13658$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013660/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013661
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013662# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
Martin v. Löwis11437992002-04-12 09:54:03 +000013664int
13665main ()
13666{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013667
13668 char *name;
13669 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013670 char buffer[2048];
13671 int buflen = 2048;
13672 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013673
Matthias Kloseb159a552010-04-25 21:00:44 +000013674 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
13676 ;
13677 return 0;
13678}
13679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013680if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013683
Martin v. Löwis11437992002-04-12 09:54:03 +000013684
Matthias Kloseb159a552010-04-25 21:00:44 +000013685$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13688$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013689
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013690else
Skip Montanaro6dead952003-09-25 14:50:04 +000013691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13693$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13695$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13697/* end confdefs.h. */
13698
13699# include <netdb.h>
13700
13701int
13702main ()
13703{
13704
13705 char *name;
13706 struct hostent *he;
13707 struct hostent_data data;
13708
13709 (void) gethostbyname_r(name, he, &data);
13710
13711 ;
13712 return 0;
13713}
13714_ACEOF
13715if ac_fn_c_try_compile "$LINENO"; then :
13716
13717 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13718
13719
13720$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13721
13722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13723$as_echo "yes" >&6; }
13724
13725else
13726
13727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13728$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013729
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013732
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013735
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013738 CFLAGS=$OLD_CFLAGS
13739
13740else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 for ac_func in gethostbyname
13743do :
13744 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013745if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013747#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013748_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013749
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013750fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013751done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013752
Michael W. Hudson54241132001-12-07 15:38:26 +000013753
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013754fi
13755
Michael W. Hudson54241132001-12-07 15:38:26 +000013756
13757
13758
13759
13760
13761
Guido van Rossum627b2d71993-12-24 10:39:16 +000013762# checks for system services
13763# (none yet)
13764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013765# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013766ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013767if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013768
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013769else
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13771$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013772if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013773 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774else
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013776LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780/* Override any GCC internal prototype to avoid an error.
13781 Use char because int might match the return type of a GCC
13782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013783#ifdef __cplusplus
13784extern "C"
13785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013786char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013787int
13788main ()
13789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 ;
13792 return 0;
13793}
13794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013795if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013797else
Matthias Kloseb9621712010-04-24 17:59:49 +000013798 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013800rm -f core conftest.err conftest.$ac_objext \
13801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013802LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13805$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013806if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 cat >>confdefs.h <<_ACEOF
13808#define HAVE_LIBIEEE 1
13809_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013811 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812
Guido van Rossum627b2d71993-12-24 10:39:16 +000013813fi
13814
Michael W. Hudson54241132001-12-07 15:38:26 +000013815
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013816fi
13817
Michael W. Hudson54241132001-12-07 15:38:26 +000013818
Guido van Rossum7f253911997-05-09 02:42:48 +000013819# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13821$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013824if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013826if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013827then
13828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13832$as_echo "yes" >&6; }
13833else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13834$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013835fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013836else
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13838$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839fi
13840
Guido van Rossum7f253911997-05-09 02:42:48 +000013841
Guido van Rossum7f43da71994-08-01 12:15:30 +000013842# check for --with-libm=...
13843
Guido van Rossum563e7081996-09-10 18:20:48 +000013844case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013845Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013846*) LIBM=-lm
13847esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13849$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013851# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013852if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013854if test "$withval" = no
13855then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13857$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013858elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013859then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13861$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013862else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013863fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013864else
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13866$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867fi
13868
Guido van Rossum7f43da71994-08-01 12:15:30 +000013869
13870# check for --with-libc=...
13871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13873$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013876if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013878if test "$withval" = no
13879then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13881$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013882elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013883then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13885$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013886else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013887fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013888else
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13890$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891fi
13892
Guido van Rossum7f43da71994-08-01 12:15:30 +000013893
Stefan Krah1919b7e2012-03-21 18:25:23 +010013894# **************************************
13895# * Check for gcc x64 inline assembler *
13896# **************************************
13897
13898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13899$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13901/* end confdefs.h. */
13902
13903int
13904main ()
13905{
13906
13907 __asm__ __volatile__ ("movq %rcx, %rax");
13908
13909 ;
13910 return 0;
13911}
13912_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013913if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013914 have_gcc_asm_for_x64=yes
13915else
13916 have_gcc_asm_for_x64=no
13917fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013918rm -f core conftest.err conftest.$ac_objext \
13919 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13921$as_echo "$have_gcc_asm_for_x64" >&6; }
13922if test "$have_gcc_asm_for_x64" = yes
13923then
13924
13925$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13926
13927fi
13928
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013929# **************************************************
13930# * Check for various properties of floating point *
13931# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13934$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013935if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013937else
13938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013940 ac_cv_little_endian_double=no
13941else
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013943/* end confdefs.h. */
13944
13945#include <string.h>
13946int main() {
13947 double x = 9006104071832581.0;
13948 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13949 return 0;
13950 else
13951 return 1;
13952}
13953
13954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013955if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013956 ac_cv_little_endian_double=yes
13957else
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013962fi
13963
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013964fi
13965
Matthias Kloseb9621712010-04-24 17:59:49 +000013966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13967$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968if test "$ac_cv_little_endian_double" = yes
13969then
13970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013972
13973fi
13974
Matthias Kloseb9621712010-04-24 17:59:49 +000013975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13976$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013977if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013979else
13980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013982 ac_cv_big_endian_double=no
13983else
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013985/* end confdefs.h. */
13986
13987#include <string.h>
13988int main() {
13989 double x = 9006104071832581.0;
13990 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13991 return 0;
13992 else
13993 return 1;
13994}
13995
13996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013997if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013998 ac_cv_big_endian_double=yes
13999else
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14003 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014004fi
14005
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014006fi
14007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14009$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014010if test "$ac_cv_big_endian_double" = yes
14011then
14012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014014
14015fi
14016
14017# Some ARM platforms use a mixed-endian representation for doubles.
14018# While Python doesn't currently have full support for these platforms
14019# (see e.g., issue 1762561), we can at least make sure that float <-> string
14020# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14022$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014023if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014025else
14026
Matthias Kloseb9621712010-04-24 17:59:49 +000014027if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014028 ac_cv_mixed_endian_double=no
14029else
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014031/* end confdefs.h. */
14032
14033#include <string.h>
14034int main() {
14035 double x = 9006104071832581.0;
14036 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14037 return 0;
14038 else
14039 return 1;
14040}
14041
14042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014043if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014044 ac_cv_mixed_endian_double=yes
14045else
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14049 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014050fi
14051
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014052fi
14053
Matthias Kloseb9621712010-04-24 17:59:49 +000014054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14055$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014056if test "$ac_cv_mixed_endian_double" = yes
14057then
14058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014060
14061fi
14062
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014063# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014064# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014065# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014066# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014067# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014068# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014069
14070# This inline assembler syntax may also work for suncc and icc,
14071# so we try it on all platforms.
14072
Matthias Kloseb9621712010-04-24 17:59:49 +000014073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14074$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014076/* end confdefs.h. */
14077
14078int
14079main ()
14080{
14081
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014082 unsigned short cw;
14083 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14084 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014085
14086 ;
14087 return 0;
14088}
14089_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014090if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014091 have_gcc_asm_for_x87=yes
14092else
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014094fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014095rm -f core conftest.err conftest.$ac_objext \
14096 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14098$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014099if test "$have_gcc_asm_for_x87" = yes
14100then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014103
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014105
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14107$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14109/* end confdefs.h. */
14110
14111int
14112main ()
14113{
14114
14115 unsigned int fpcr;
14116 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14117 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14118
14119 ;
14120 return 0;
14121}
14122_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014123if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014124 have_gcc_asm_for_mc68881=yes
14125else
14126 have_gcc_asm_for_mc68881=no
14127fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014128rm -f core conftest.err conftest.$ac_objext \
14129 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14131$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14132if test "$have_gcc_asm_for_mc68881" = yes
14133then
14134
14135$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14136
14137fi
14138
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014139# Detect whether system arithmetic is subject to x87-style double
14140# rounding issues. The result of this test has little meaning on non
14141# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14142# mode is round-to-nearest and double rounding issues are present, and
14143# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14145$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014146# $BASECFLAGS may affect the result
14147ac_save_cc="$CC"
14148CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014149if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014150 ac_cv_x87_double_rounding=no
14151else
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014153/* end confdefs.h. */
14154
14155#include <stdlib.h>
14156#include <math.h>
14157int main() {
14158 volatile double x, y, z;
14159 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14160 x = 0.99999999999999989; /* 1-2**-53 */
14161 y = 1./x;
14162 if (y != 1.)
14163 exit(0);
14164 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14165 x = 1e16;
14166 y = 2.99999;
14167 z = x + y;
14168 if (z != 1e16+4.)
14169 exit(0);
14170 /* both tests show evidence of double rounding */
14171 exit(1);
14172}
14173
14174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014175if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014176 ac_cv_x87_double_rounding=no
14177else
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14181 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014182fi
14183
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014184CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14186$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014187if test "$ac_cv_x87_double_rounding" = yes
14188then
14189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014191
14192fi
14193
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014194# ************************************
14195# * Check for mathematical functions *
14196# ************************************
14197
14198LIBS_SAVE=$LIBS
14199LIBS="$LIBS $LIBM"
14200
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014201for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14202do :
14203 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14204ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014205if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014206 cat >>confdefs.h <<_ACEOF
14207#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14208_ACEOF
14209
14210fi
14211done
14212
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014213for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014214do :
14215 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14216ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014217if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014218 cat >>confdefs.h <<_ACEOF
14219#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14220_ACEOF
14221
14222fi
14223done
14224
14225ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14226"
Victor Stinnere0be4232011-10-25 13:06:09 +020014227if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014228 ac_have_decl=1
14229else
14230 ac_have_decl=0
14231fi
14232
14233cat >>confdefs.h <<_ACEOF
14234#define HAVE_DECL_ISINF $ac_have_decl
14235_ACEOF
14236ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14237"
Victor Stinnere0be4232011-10-25 13:06:09 +020014238if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014239 ac_have_decl=1
14240else
14241 ac_have_decl=0
14242fi
14243
14244cat >>confdefs.h <<_ACEOF
14245#define HAVE_DECL_ISNAN $ac_have_decl
14246_ACEOF
14247ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14248"
Victor Stinnere0be4232011-10-25 13:06:09 +020014249if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014250 ac_have_decl=1
14251else
14252 ac_have_decl=0
14253fi
14254
14255cat >>confdefs.h <<_ACEOF
14256#define HAVE_DECL_ISFINITE $ac_have_decl
14257_ACEOF
14258
14259
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014260# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14261# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14263$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014264if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014266else
14267
Matthias Kloseb9621712010-04-24 17:59:49 +000014268if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014269 ac_cv_tanh_preserves_zero_sign=no
14270else
Matthias Kloseb9621712010-04-24 17:59:49 +000014271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014272/* end confdefs.h. */
14273
14274#include <math.h>
14275#include <stdlib.h>
14276int main() {
14277 /* return 0 if either negative zeros don't exist
14278 on this platform or if negative zeros exist
14279 and tanh(-0.) == -0. */
14280 if (atan2(0., -1.) == atan2(-0., -1.) ||
14281 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14282 else exit(1);
14283}
14284
14285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014286if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014287 ac_cv_tanh_preserves_zero_sign=yes
14288else
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14292 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014293fi
14294
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014295fi
14296
Matthias Kloseb9621712010-04-24 17:59:49 +000014297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14298$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014299if test "$ac_cv_tanh_preserves_zero_sign" = yes
14300then
14301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014303
14304fi
14305
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014306if test "$ac_cv_func_log1p" = yes
14307then
14308 # On some versions of AIX, log1p(-0.) returns 0. instead of
14309 # -0. See issue #9920.
14310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14311$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014312 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014313 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014314else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014315
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014316 if test "$cross_compiling" = yes; then :
14317 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014318else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14320/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014321
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014322 #include <math.h>
14323 #include <stdlib.h>
14324 int main() {
14325 /* Fail if the signs of log1p(-0.) and -0. can be
14326 distinguished. */
14327 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14328 return 0;
14329 else
14330 return 1;
14331 }
14332
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014333_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014334if ac_fn_c_try_run "$LINENO"; then :
14335 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014336else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014337 ac_cv_log1p_drops_zero_sign=yes
14338fi
14339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014341fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014342
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014343fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014344
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14346$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14347fi
14348if test "$ac_cv_log1p_drops_zero_sign" = yes
14349then
14350
14351$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14352
14353fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014354
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014355LIBS=$LIBS_SAVE
14356
Mark Dickinsona614f042009-11-28 12:48:43 +000014357# For multiprocessing module, check that sem_open
14358# actually works. For FreeBSD versions <= 7.2,
14359# the kernel module that provides POSIX semaphores
14360# isn't loaded by default, so an attempt to call
14361# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14363$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014364if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014366else
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014368 ac_cv_posix_semaphores_enabled=yes
14369else
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014371/* end confdefs.h. */
14372
14373#include <unistd.h>
14374#include <fcntl.h>
14375#include <stdio.h>
14376#include <semaphore.h>
14377#include <sys/stat.h>
14378
14379int main(void) {
14380 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14381 if (a == SEM_FAILED) {
14382 perror("sem_open");
14383 return 1;
14384 }
14385 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014386 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014387 return 0;
14388}
14389
14390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014391if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014392 ac_cv_posix_semaphores_enabled=yes
14393else
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14397 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014398fi
14399
14400
Mark Dickinsona614f042009-11-28 12:48:43 +000014401fi
14402
Matthias Kloseb9621712010-04-24 17:59:49 +000014403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14404$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014405if test $ac_cv_posix_semaphores_enabled = no
14406then
14407
Matthias Kloseb9621712010-04-24 17:59:49 +000014408$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014409
14410fi
14411
Mark Dickinson10683072009-04-18 21:18:19 +000014412# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14414$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014415if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014416 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014417else
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014419 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014420else
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014422/* end confdefs.h. */
14423
14424#include <unistd.h>
14425#include <fcntl.h>
14426#include <stdio.h>
14427#include <semaphore.h>
14428#include <sys/stat.h>
14429
14430int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014431 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014432 int count;
14433 int res;
14434 if(a==SEM_FAILED){
14435 perror("sem_open");
14436 return 1;
14437
14438 }
14439 res = sem_getvalue(a, &count);
14440 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014441 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014442 return res==-1 ? 1 : 0;
14443}
14444
Mark Dickinson10683072009-04-18 21:18:19 +000014445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014446if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014447 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014448else
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14452 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014453fi
14454
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014455
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014456fi
14457
Matthias Kloseb9621712010-04-24 17:59:49 +000014458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14459$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014460if test $ac_cv_broken_sem_getvalue = yes
14461then
14462
Matthias Kloseb9621712010-04-24 17:59:49 +000014463$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014464
14465fi
14466
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014467ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14468"
14469if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14470 ac_have_decl=1
14471else
14472 ac_have_decl=0
14473fi
14474
14475cat >>confdefs.h <<_ACEOF
14476#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14477_ACEOF
14478ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14479"
14480if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14481 ac_have_decl=1
14482else
14483 ac_have_decl=0
14484fi
14485
14486cat >>confdefs.h <<_ACEOF
14487#define HAVE_DECL_RTLD_NOW $ac_have_decl
14488_ACEOF
14489ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14490"
14491if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14492 ac_have_decl=1
14493else
14494 ac_have_decl=0
14495fi
14496
14497cat >>confdefs.h <<_ACEOF
14498#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14499_ACEOF
14500ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14501"
14502if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14503 ac_have_decl=1
14504else
14505 ac_have_decl=0
14506fi
14507
14508cat >>confdefs.h <<_ACEOF
14509#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14510_ACEOF
14511ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14512"
14513if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14514 ac_have_decl=1
14515else
14516 ac_have_decl=0
14517fi
14518
14519cat >>confdefs.h <<_ACEOF
14520#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14521_ACEOF
14522ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14523"
14524if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14525 ac_have_decl=1
14526else
14527 ac_have_decl=0
14528fi
14529
14530cat >>confdefs.h <<_ACEOF
14531#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14532_ACEOF
14533ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14534"
14535if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14536 ac_have_decl=1
14537else
14538 ac_have_decl=0
14539fi
14540
14541cat >>confdefs.h <<_ACEOF
14542#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14543_ACEOF
14544
14545
Mark Dickinsonbd792642009-03-18 20:06:12 +000014546# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14548$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014549# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014550if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014551 enableval=$enable_big_digits; case $enable_big_digits in
14552yes)
14553 enable_big_digits=30 ;;
14554no)
14555 enable_big_digits=15 ;;
1455615|30)
14557 ;;
14558*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014559 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 +000014560esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14562$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014563
14564cat >>confdefs.h <<_ACEOF
14565#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14566_ACEOF
14567
14568
14569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14571$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014572fi
14573
14574
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014576ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014577if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
14579
Matthias Kloseb9621712010-04-24 17:59:49 +000014580$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014581
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014582 wchar_h="yes"
14583
Guido van Rossumef2255b2000-03-10 22:30:29 +000014584else
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014586
14587fi
14588
Michael W. Hudson54241132001-12-07 15:38:26 +000014589
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014591# determine wchar_t size
14592if test "$wchar_h" = yes
14593then
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14597# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14599$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014600if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014602else
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14604"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014605
Martin v. Löwis11437992002-04-12 09:54:03 +000014606else
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 if test "$ac_cv_type_wchar_t" = yes; then
14608 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014610as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014611See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612 else
14613 ac_cv_sizeof_wchar_t=0
14614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014616
Martin v. Löwis11437992002-04-12 09:54:03 +000014617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14619$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620
14621
14622
Martin v. Löwis11437992002-04-12 09:54:03 +000014623cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014624#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014625_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014626
Michael W. Hudson54241132001-12-07 15:38:26 +000014627
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014628fi
14629
Matthias Kloseb9621712010-04-24 17:59:49 +000014630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14631$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014632have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014634/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014635
14636#include <tcl.h>
14637#if TCL_UTF_MAX != 6
14638# error "NOT UCS4_TCL"
14639#endif
14640int
14641main ()
14642{
14643
14644 ;
14645 return 0;
14646}
14647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014649
14650
Matthias Kloseb9621712010-04-24 17:59:49 +000014651$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014652
14653 have_ucs4_tcl=yes
14654
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14658$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014659
Skip Montanaro6dead952003-09-25 14:50:04 +000014660# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014661if test "$wchar_h" = yes
14662then
14663 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14665$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014666 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014668else
14669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014671 ac_cv_wchar_t_signed=yes
14672else
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014674/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014675
14676 #include <wchar.h>
14677 int main()
14678 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014679 /* Success: exit code 0 */
14680 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014681 }
14682
14683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014684if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014685 ac_cv_wchar_t_signed=yes
14686else
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014691fi
14692
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014693fi
14694
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14696$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014697fi
14698
Georg Brandl52d168a2008-01-07 18:10:24 +000014699# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014700if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014701 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014702then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014703 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014704
Matthias Kloseb9621712010-04-24 17:59:49 +000014705$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014706
Georg Brandl52d168a2008-01-07 18:10:24 +000014707else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014708 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014709fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14711$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014712
14713# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14715$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014716if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014718else
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 ac_cv_c_bigendian=unknown
14720 # See if we're dealing with a universal compiler.
14721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14722/* end confdefs.h. */
14723#ifndef __APPLE_CC__
14724 not a universal capable compiler
14725 #endif
14726 typedef int dummy;
14727
Skip Montanaro6dead952003-09-25 14:50:04 +000014728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014729if ac_fn_c_try_compile "$LINENO"; then :
14730
14731 # Check for potential -arch flags. It is not universal unless
14732 # there are at least two -arch flags with different values.
14733 ac_arch=
14734 ac_prev=
14735 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14736 if test -n "$ac_prev"; then
14737 case $ac_word in
14738 i?86 | x86_64 | ppc | ppc64)
14739 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14740 ac_arch=$ac_word
14741 else
14742 ac_cv_c_bigendian=universal
14743 break
14744 fi
14745 ;;
14746 esac
14747 ac_prev=
14748 elif test "x$ac_word" = "x-arch"; then
14749 ac_prev=arch
14750 fi
14751 done
14752fi
14753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14754 if test $ac_cv_c_bigendian = unknown; then
14755 # See if sys/param.h defines the BYTE_ORDER macro.
14756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014757/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014758#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014759 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014760
Martin v. Löwis11437992002-04-12 09:54:03 +000014761int
14762main ()
14763{
Matthias Kloseb9621712010-04-24 17:59:49 +000014764#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14765 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14766 && LITTLE_ENDIAN)
14767 bogus endian macros
14768 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014769
14770 ;
14771 return 0;
14772}
14773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014774if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014775 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014777/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014778#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014780
Martin v. Löwis11437992002-04-12 09:54:03 +000014781int
14782main ()
14783{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014784#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 not big endian
14786 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014787
14788 ;
14789 return 0;
14790}
14791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014792if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014793 ac_cv_c_bigendian=yes
14794else
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014798fi
14799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14800 fi
14801 if test $ac_cv_c_bigendian = unknown; then
14802 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014804/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014805#include <limits.h>
14806
Martin v. Löwis11437992002-04-12 09:54:03 +000014807int
14808main ()
14809{
Matthias Kloseb9621712010-04-24 17:59:49 +000014810#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14811 bogus endian macros
14812 #endif
14813
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 ;
14815 return 0;
14816}
14817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014818if ac_fn_c_try_compile "$LINENO"; then :
14819 # It does; now see whether it defined to _BIG_ENDIAN or not.
14820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14821/* end confdefs.h. */
14822#include <limits.h>
14823
14824int
14825main ()
14826{
14827#ifndef _BIG_ENDIAN
14828 not big endian
14829 #endif
14830
14831 ;
14832 return 0;
14833}
14834_ACEOF
14835if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014837else
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14841fi
14842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14843 fi
14844 if test $ac_cv_c_bigendian = unknown; then
14845 # Compile a test program.
14846 if test "$cross_compiling" = yes; then :
14847 # Try to guess by grepping values from an object file.
14848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14849/* end confdefs.h. */
14850short int ascii_mm[] =
14851 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14852 short int ascii_ii[] =
14853 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14854 int use_ascii (int i) {
14855 return ascii_mm[i] + ascii_ii[i];
14856 }
14857 short int ebcdic_ii[] =
14858 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14859 short int ebcdic_mm[] =
14860 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14861 int use_ebcdic (int i) {
14862 return ebcdic_mm[i] + ebcdic_ii[i];
14863 }
14864 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866int
14867main ()
14868{
14869return use_ascii (foo) == use_ebcdic (foo);
14870 ;
14871 return 0;
14872}
14873_ACEOF
14874if ac_fn_c_try_compile "$LINENO"; then :
14875 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14876 ac_cv_c_bigendian=yes
14877 fi
14878 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14879 if test "$ac_cv_c_bigendian" = unknown; then
14880 ac_cv_c_bigendian=no
14881 else
14882 # finding both strings is unlikely to happen, but who knows?
14883 ac_cv_c_bigendian=unknown
14884 fi
14885 fi
14886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014888else
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014890/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014892int
14893main ()
14894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 /* Are we little or big endian? From Harbison&Steele. */
14897 union
14898 {
14899 long int l;
14900 char c[sizeof (long int)];
14901 } u;
14902 u.l = 1;
14903 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904
14905 ;
14906 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014907}
Martin v. Löwis11437992002-04-12 09:54:03 +000014908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014909if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014910 ac_cv_c_bigendian=no
14911else
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14915 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14921$as_echo "$ac_cv_c_bigendian" >&6; }
14922 case $ac_cv_c_bigendian in #(
14923 yes)
14924 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14925;; #(
14926 no)
14927 ;; #(
14928 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014929
Matthias Kloseb9621712010-04-24 17:59:49 +000014930$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014931
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 ;; #(
14933 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014934 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014935 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014937
Michael W. Hudson54241132001-12-07 15:38:26 +000014938
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014939# ABI version string for Python extension modules. This appears between the
14940# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14941# from the following attributes which affect the ABI of this Python build (in
14942# this order):
14943#
14944# * The Python implementation (always 'cpython-' for us)
14945# * The major and minor version numbers
14946# * --with-pydebug (adds a 'd')
14947# * --with-pymalloc (adds a 'm')
14948# * --with-wide-unicode (adds a 'u')
14949#
14950# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014951# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14952# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014953
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14955$as_echo_n "checking ABIFLAGS... " >&6; }
14956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14957$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14959$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014960SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14962$as_echo "$SOABI" >&6; }
14963
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014964
14965case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014966 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014967 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14968 *)
14969 EXT_SUFFIX=${SHLIB_SUFFIX};;
14970esac
14971
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14973$as_echo_n "checking LDVERSION... " >&6; }
14974LDVERSION='$(VERSION)$(ABIFLAGS)'
14975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14976$as_echo "$LDVERSION" >&6; }
14977
doko@python.org87421192013-01-26 11:39:31 +010014978
doko@ubuntu.com55532312016-06-14 08:55:19 +020014979if test x$PLATFORM_TRIPLET = x; then
14980 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14981else
14982 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14983fi
doko@python.org87421192013-01-26 11:39:31 +010014984
14985
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014986# Check whether right shifting a negative integer extends the sign bit
14987# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14989$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014990if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014992else
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
Matthias Kloseb9621712010-04-24 17:59:49 +000014994if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014995 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014996else
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014998/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014999
15000int main()
15001{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015002 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015003}
15004
Martin v. Löwis11437992002-04-12 09:54:03 +000015005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015006if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015007 ac_cv_rshift_extends_sign=yes
15008else
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15012 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015013fi
15014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015fi
15016
Matthias Kloseb9621712010-04-24 17:59:49 +000015017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15018$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015019if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015020then
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
Matthias Kloseb9621712010-04-24 17:59:49 +000015022$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015023
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015024fi
15025
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015026# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15028$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015029if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015031else
Martin v. Löwis11437992002-04-12 09:54:03 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015034/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015035#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015036int
15037main ()
15038{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015039
15040 FILE *f = fopen("/dev/null", "r");
15041 flockfile(f);
15042 getc_unlocked(f);
15043 funlockfile(f);
15044
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 ;
15046 return 0;
15047}
15048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015049if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015050 ac_cv_have_getc_unlocked=yes
15051else
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 ac_cv_have_getc_unlocked=no
15053fi
15054rm -f core conftest.err conftest.$ac_objext \
15055 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15059$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015060if test "$ac_cv_have_getc_unlocked" = yes
15061then
Martin v. Löwis11437992002-04-12 09:54:03 +000015062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015064
15065fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015066
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015067# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015068# save the value of LIBS so we don't actually link Python with readline
15069LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015070
Gregory P. Smith18820942008-09-07 06:24:49 +000015071# On some systems we need to link readline to a termcap compatible
15072# library. NOTE: Keep the precedence of listed libraries synchronised
15073# with setup.py.
15074py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15076$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015077for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015078 if test -z "$py_libtermcap"; then
15079 READLINE_LIBS="-lreadline"
15080 else
15081 READLINE_LIBS="-lreadline -l$py_libtermcap"
15082 fi
15083 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015085/* end confdefs.h. */
15086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087/* Override any GCC internal prototype to avoid an error.
15088 Use char because int might match the return type of a GCC
15089 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015090#ifdef __cplusplus
15091extern "C"
15092#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015093char readline ();
15094int
15095main ()
15096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015098 ;
15099 return 0;
15100}
15101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015102if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015103 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015105rm -f core conftest.err conftest.$ac_objext \
15106 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015107 if test $py_cv_lib_readline = yes; then
15108 break
15109 fi
15110done
15111# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15112#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015113if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15115$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015116else
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15118$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015119
Matthias Kloseb9621712010-04-24 17:59:49 +000015120$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015121
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015122fi
15123
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015124# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015126/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015127#include <readline/readline.h>
15128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015129if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015130 have_readline=yes
15131else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015132 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015133
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015134fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015135rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015136if test $have_readline = yes
15137then
Matthias Kloseb9621712010-04-24 17:59:49 +000015138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015139/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015140#include <readline/readline.h>
15141
15142_ACEOF
15143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015145
Matthias Kloseb9621712010-04-24 17:59:49 +000015146$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015147
15148fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015149rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015150
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015152/* end confdefs.h. */
15153#include <readline/readline.h>
15154
15155_ACEOF
15156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015158
Matthias Kloseb9621712010-04-24 17:59:49 +000015159$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015160
15161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015162rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015163
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015164fi
15165
Martin v. Löwis0daad592001-09-30 21:09:59 +000015166# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15168$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015169if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015171else
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015173LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177/* Override any GCC internal prototype to avoid an error.
15178 Use char because int might match the return type of a GCC
15179 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015180#ifdef __cplusplus
15181extern "C"
15182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015183char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015184int
15185main ()
15186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 ;
15189 return 0;
15190}
15191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015192if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015194else
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015197rm -f core conftest.err conftest.$ac_objext \
15198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015199LIBS=$ac_check_lib_save_LIBS
15200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15202$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015203if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015206
Martin v. Löwis0daad592001-09-30 21:09:59 +000015207fi
15208
Michael W. Hudson54241132001-12-07 15:38:26 +000015209
Thomas Wouters89d996e2007-09-08 17:39:28 +000015210# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15212$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015213if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015215else
15216 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015217LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015219/* end confdefs.h. */
15220
15221/* Override any GCC internal prototype to avoid an error.
15222 Use char because int might match the return type of a GCC
15223 builtin and then its argument prototype would still apply. */
15224#ifdef __cplusplus
15225extern "C"
15226#endif
15227char rl_completion_display_matches_hook ();
15228int
15229main ()
15230{
15231return rl_completion_display_matches_hook ();
15232 ;
15233 return 0;
15234}
15235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015236if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015237 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15238else
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015241rm -f core conftest.err conftest.$ac_objext \
15242 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015243LIBS=$ac_check_lib_save_LIBS
15244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15246$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015247if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015248
Matthias Kloseb9621712010-04-24 17:59:49 +000015249$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015250
15251fi
15252
15253
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015254# also in 4.0, but not in editline
15255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15256$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15257if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15258 $as_echo_n "(cached) " >&6
15259else
15260 ac_check_lib_save_LIBS=$LIBS
15261LIBS="-lreadline $READLINE_LIBS $LIBS"
15262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15263/* end confdefs.h. */
15264
15265/* Override any GCC internal prototype to avoid an error.
15266 Use char because int might match the return type of a GCC
15267 builtin and then its argument prototype would still apply. */
15268#ifdef __cplusplus
15269extern "C"
15270#endif
15271char rl_resize_terminal ();
15272int
15273main ()
15274{
15275return rl_resize_terminal ();
15276 ;
15277 return 0;
15278}
15279_ACEOF
15280if ac_fn_c_try_link "$LINENO"; then :
15281 ac_cv_lib_readline_rl_resize_terminal=yes
15282else
15283 ac_cv_lib_readline_rl_resize_terminal=no
15284fi
15285rm -f core conftest.err conftest.$ac_objext \
15286 conftest$ac_exeext conftest.$ac_ext
15287LIBS=$ac_check_lib_save_LIBS
15288fi
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15290$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15291if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15292
15293$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15294
15295fi
15296
15297
Martin v. Löwis0daad592001-09-30 21:09:59 +000015298# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15300$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015301if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015303else
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015305LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309/* Override any GCC internal prototype to avoid an error.
15310 Use char because int might match the return type of a GCC
15311 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015312#ifdef __cplusplus
15313extern "C"
15314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015315char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015316int
15317main ()
15318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 ;
15321 return 0;
15322}
15323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015324if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015326else
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015329rm -f core conftest.err conftest.$ac_objext \
15330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015331LIBS=$ac_check_lib_save_LIBS
15332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15334$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015335if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015336
Matthias Kloseb9621712010-04-24 17:59:49 +000015337$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015338
Guido van Rossum353ae582001-07-10 16:45:32 +000015339fi
15340
Jack Jansendd19cf82001-12-06 22:36:17 +000015341
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015342# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015344/* end confdefs.h. */
15345#include <readline/readline.h>
15346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015347if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015348 have_readline=yes
15349else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015350 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015351
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015352fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015353rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015354if test $have_readline = yes
15355then
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015357/* end confdefs.h. */
15358#include <readline/readline.h>
15359
15360_ACEOF
15361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015363
Matthias Kloseb9621712010-04-24 17:59:49 +000015364$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015365
15366fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015367rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015368
15369fi
15370
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15372$as_echo_n "checking for append_history in -lreadline... " >&6; }
15373if ${ac_cv_lib_readline_append_history+:} false; then :
15374 $as_echo_n "(cached) " >&6
15375else
15376 ac_check_lib_save_LIBS=$LIBS
15377LIBS="-lreadline $READLINE_LIBS $LIBS"
15378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15379/* end confdefs.h. */
15380
15381/* Override any GCC internal prototype to avoid an error.
15382 Use char because int might match the return type of a GCC
15383 builtin and then its argument prototype would still apply. */
15384#ifdef __cplusplus
15385extern "C"
15386#endif
15387char append_history ();
15388int
15389main ()
15390{
15391return append_history ();
15392 ;
15393 return 0;
15394}
15395_ACEOF
15396if ac_fn_c_try_link "$LINENO"; then :
15397 ac_cv_lib_readline_append_history=yes
15398else
15399 ac_cv_lib_readline_append_history=no
15400fi
15401rm -f core conftest.err conftest.$ac_objext \
15402 conftest$ac_exeext conftest.$ac_ext
15403LIBS=$ac_check_lib_save_LIBS
15404fi
15405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15406$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15407if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15408
15409$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15410
15411fi
15412
15413
Martin v. Löwis82bca632006-02-10 20:49:30 +000015414# End of readline checks: restore LIBS
15415LIBS=$LIBS_no_readline
15416
Matthias Kloseb9621712010-04-24 17:59:49 +000015417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15418$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015419if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015421else
Martin v. Löwis11437992002-04-12 09:54:03 +000015422
Matthias Kloseb9621712010-04-24 17:59:49 +000015423if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015424 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015425else
Matthias Kloseb9621712010-04-24 17:59:49 +000015426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015427/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015428
15429int main()
15430{
15431 int val1 = nice(1);
15432 if (val1 != -1 && val1 == nice(2))
15433 exit(0);
15434 exit(1);
15435}
15436
Martin v. Löwis11437992002-04-12 09:54:03 +000015437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015438if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015439 ac_cv_broken_nice=yes
15440else
Matthias Kloseb9621712010-04-24 17:59:49 +000015441 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15444 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015445fi
15446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447fi
15448
Matthias Kloseb9621712010-04-24 17:59:49 +000015449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15450$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015451if test "$ac_cv_broken_nice" = yes
15452then
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
Matthias Kloseb9621712010-04-24 17:59:49 +000015454$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015455
15456fi
15457
Matthias Kloseb9621712010-04-24 17:59:49 +000015458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15459$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015460if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015461 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015462else
Matthias Kloseb9621712010-04-24 17:59:49 +000015463 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015464 ac_cv_broken_poll=no
15465else
Matthias Kloseb9621712010-04-24 17:59:49 +000015466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015467/* end confdefs.h. */
15468
15469#include <poll.h>
15470
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015471int main()
15472{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015473 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015474 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015475
15476 close (42);
15477
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015478 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015479 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015480 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015481 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015482 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015483 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015484 return 1;
15485}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015486
15487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015488if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015489 ac_cv_broken_poll=yes
15490else
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15494 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015497fi
15498
Matthias Kloseb9621712010-04-24 17:59:49 +000015499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15500$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015501if test "$ac_cv_broken_poll" = yes
15502then
15503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015505
15506fi
15507
Brett Cannon43802422005-02-10 20:48:03 +000015508# 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 +000015509# (which is not required by ISO C or UNIX spec) and/or if we support
15510# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015511ac_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 +000015512#include <$ac_cv_struct_tm>
15513
Matthias Kloseb9621712010-04-24 17:59:49 +000015514"
Victor Stinnere0be4232011-10-25 13:06:09 +020015515if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015516
15517cat >>confdefs.h <<_ACEOF
15518#define HAVE_STRUCT_TM_TM_ZONE 1
15519_ACEOF
15520
15521
15522fi
15523
15524if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015527
15528else
Matthias Kloseb9621712010-04-24 17:59:49 +000015529 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15530"
Victor Stinnere0be4232011-10-25 13:06:09 +020015531if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533else
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535fi
15536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015538#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015539_ACEOF
15540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15542$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015543if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015545else
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015547/* end confdefs.h. */
15548#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549#if !HAVE_DECL_TZNAME
15550extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015551#endif
15552
15553int
15554main ()
15555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015556return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015557 ;
15558 return 0;
15559}
15560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015561if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015562 ac_cv_var_tzname=yes
15563else
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015566rm -f core conftest.err conftest.$ac_objext \
15567 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15570$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015571 if test $ac_cv_var_tzname = yes; then
15572
Matthias Kloseb9621712010-04-24 17:59:49 +000015573$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015574
15575 fi
15576fi
15577
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015578
Martin v. Löwis1d459062005-03-14 21:23:33 +000015579# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15581$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015582if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015583 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015584else
15585
Matthias Kloseb9621712010-04-24 17:59:49 +000015586if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015587 ac_cv_working_tzset=no
15588else
Matthias Kloseb9621712010-04-24 17:59:49 +000015589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015590/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015591
15592#include <stdlib.h>
15593#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015594#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015595
15596#if HAVE_TZNAME
15597extern char *tzname[];
15598#endif
15599
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015600int main()
15601{
Brett Cannon18367812003-09-19 00:59:16 +000015602 /* Note that we need to ensure that not only does tzset(3)
15603 do 'something' with localtime, but it works as documented
15604 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015605 This includes making sure that tzname is set properly if
15606 tm->tm_zone does not exist since it is the alternative way
15607 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015608
15609 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015610 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015611 */
15612
Martin v. Löwis1d459062005-03-14 21:23:33 +000015613 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015614 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15615
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015616 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015617 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015618 if (localtime(&groundhogday)->tm_hour != 0)
15619 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015620#if HAVE_TZNAME
15621 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15622 if (strcmp(tzname[0], "UTC") ||
15623 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15624 exit(1);
15625#endif
Brett Cannon18367812003-09-19 00:59:16 +000015626
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015627 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015628 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015629 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015630 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015631#if HAVE_TZNAME
15632 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15633 exit(1);
15634#endif
Brett Cannon18367812003-09-19 00:59:16 +000015635
15636 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15637 tzset();
15638 if (localtime(&groundhogday)->tm_hour != 11)
15639 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015640#if HAVE_TZNAME
15641 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15642 exit(1);
15643#endif
15644
15645#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015646 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15647 exit(1);
15648 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15649 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015650#endif
Brett Cannon18367812003-09-19 00:59:16 +000015651
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015652 exit(0);
15653}
15654
15655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015656if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015657 ac_cv_working_tzset=yes
15658else
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15662 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015663fi
15664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015665fi
15666
Matthias Kloseb9621712010-04-24 17:59:49 +000015667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15668$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015669if test "$ac_cv_working_tzset" = yes
15670then
15671
Matthias Kloseb9621712010-04-24 17:59:49 +000015672$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015673
15674fi
15675
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015676# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15678$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015679if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015681else
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015683/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015684#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015685int
15686main ()
15687{
15688
15689struct stat st;
15690st.st_mtim.tv_nsec = 1;
15691
15692 ;
15693 return 0;
15694}
15695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015696if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015697 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015698else
Matthias Kloseb9621712010-04-24 17:59:49 +000015699 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15702fi
15703
Matthias Kloseb9621712010-04-24 17:59:49 +000015704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15705$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015706if test "$ac_cv_stat_tv_nsec" = yes
15707then
15708
Matthias Kloseb9621712010-04-24 17:59:49 +000015709$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015710
15711fi
15712
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015713# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15715$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015716if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015718else
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015720/* end confdefs.h. */
15721#include <sys/stat.h>
15722int
15723main ()
15724{
15725
15726struct stat st;
15727st.st_mtimespec.tv_nsec = 1;
15728
15729 ;
15730 return 0;
15731}
15732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015733if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015734 ac_cv_stat_tv_nsec2=yes
15735else
Matthias Kloseb9621712010-04-24 17:59:49 +000015736 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15739fi
15740
Matthias Kloseb9621712010-04-24 17:59:49 +000015741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15742$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015743if test "$ac_cv_stat_tv_nsec2" = yes
15744then
15745
Matthias Kloseb9621712010-04-24 17:59:49 +000015746$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015747
15748fi
15749
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015750# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015751ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015752if test "$cross_compiling" = no; then
15753 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15754fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015755
15756for ac_header in curses.h ncurses.h
15757do :
15758 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15759ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15760if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15761 cat >>confdefs.h <<_ACEOF
15762#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15763_ACEOF
15764
15765fi
15766
15767done
15768
15769
15770# On Solaris, term.h requires curses.h
15771for ac_header in term.h
15772do :
15773 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15774#ifdef HAVE_CURSES_H
15775#include <curses.h>
15776#endif
15777
15778"
15779if test "x$ac_cv_header_term_h" = xyes; then :
15780 cat >>confdefs.h <<_ACEOF
15781#define HAVE_TERM_H 1
15782_ACEOF
15783
15784fi
15785
15786done
15787
15788
Jack Jansen666b1e72001-10-31 12:11:48 +000015789# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15791$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015792if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015794else
Matthias Kloseb9621712010-04-24 17:59:49 +000015795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015796/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015797#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015798int
15799main ()
15800{
Jack Jansen666b1e72001-10-31 12:11:48 +000015801
15802 int rtn;
15803 rtn = mvwdelch(0,0,0);
15804
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 ;
15806 return 0;
15807}
15808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015809if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015810 ac_cv_mvwdelch_is_expression=yes
15811else
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15815fi
15816
Matthias Kloseb9621712010-04-24 17:59:49 +000015817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15818$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015819
15820if test "$ac_cv_mvwdelch_is_expression" = yes
15821then
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015824
15825fi
15826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15828$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015829if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015831else
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015833/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015834#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015835int
15836main ()
15837{
Jack Jansen666b1e72001-10-31 12:11:48 +000015838
15839 WINDOW *w;
15840 w->_flags = 0;
15841
Martin v. Löwis11437992002-04-12 09:54:03 +000015842 ;
15843 return 0;
15844}
15845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015846if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015847 ac_cv_window_has_flags=yes
15848else
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15852fi
15853
Matthias Kloseb9621712010-04-24 17:59:49 +000015854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15855$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015856
Jack Jansen666b1e72001-10-31 12:11:48 +000015857
15858if test "$ac_cv_window_has_flags" = yes
15859then
Martin v. Löwis11437992002-04-12 09:54:03 +000015860
Matthias Kloseb9621712010-04-24 17:59:49 +000015861$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015862
15863fi
15864
Matthias Kloseb9621712010-04-24 17:59:49 +000015865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15866$as_echo_n "checking for is_term_resized... " >&6; }
15867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015868/* end confdefs.h. */
15869#include <curses.h>
15870int
15871main ()
15872{
15873void *x=is_term_resized
15874 ;
15875 return 0;
15876}
15877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015878if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015879
Matthias Kloseb9621712010-04-24 17:59:49 +000015880$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015881
Matthias Kloseb159a552010-04-25 21:00:44 +000015882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015883$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015884else
Matthias Kloseb9621712010-04-24 17:59:49 +000015885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15886$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015887
15888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15890
Matthias Kloseb9621712010-04-24 17:59:49 +000015891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15892$as_echo_n "checking for resize_term... " >&6; }
15893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015894/* end confdefs.h. */
15895#include <curses.h>
15896int
15897main ()
15898{
15899void *x=resize_term
15900 ;
15901 return 0;
15902}
15903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015904if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015905
Matthias Kloseb9621712010-04-24 17:59:49 +000015906$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015907
Matthias Kloseb159a552010-04-25 21:00:44 +000015908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015909$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015910else
Matthias Kloseb9621712010-04-24 17:59:49 +000015911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15912$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015913
15914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15916
Matthias Kloseb9621712010-04-24 17:59:49 +000015917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15918$as_echo_n "checking for resizeterm... " >&6; }
15919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015920/* end confdefs.h. */
15921#include <curses.h>
15922int
15923main ()
15924{
15925void *x=resizeterm
15926 ;
15927 return 0;
15928}
15929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015930if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015931
Matthias Kloseb9621712010-04-24 17:59:49 +000015932$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015933
Matthias Kloseb159a552010-04-25 21:00:44 +000015934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015935$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015936else
Matthias Kloseb9621712010-04-24 17:59:49 +000015937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15938$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015939
15940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015942# last curses configure check
15943CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015944
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15946$as_echo "$as_me: checking for device files" >&6;}
15947
15948if test "x$cross_compiling" = xyes; then
15949 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15951$as_echo_n "checking for /dev/ptmx... " >&6; }
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15953$as_echo "not set" >&6; }
15954 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15955 fi
15956 if test "${ac_cv_file__dev_ptc+set}" != set; then
15957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15958$as_echo_n "checking for /dev/ptc... " >&6; }
15959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15960$as_echo "not set" >&6; }
15961 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15962 fi
15963fi
15964
Matthias Kloseb9621712010-04-24 17:59:49 +000015965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15966$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015967if ${ac_cv_file__dev_ptmx+:} false; then :
15968 $as_echo_n "(cached) " >&6
15969else
15970 test "$cross_compiling" = yes &&
15971 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15972if test -r "/dev/ptmx"; then
15973 ac_cv_file__dev_ptmx=yes
15974else
15975 ac_cv_file__dev_ptmx=no
15976fi
15977fi
15978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15979$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15980if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015981
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015982fi
15983
15984if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015985
Matthias Kloseb9621712010-04-24 17:59:49 +000015986$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015987
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15990$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015991if ${ac_cv_file__dev_ptc+:} false; then :
15992 $as_echo_n "(cached) " >&6
15993else
15994 test "$cross_compiling" = yes &&
15995 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15996if test -r "/dev/ptc"; then
15997 ac_cv_file__dev_ptc=yes
15998else
15999 ac_cv_file__dev_ptc=no
16000fi
16001fi
16002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16003$as_echo "$ac_cv_file__dev_ptc" >&6; }
16004if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016005
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016006fi
16007
16008if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016011
Neal Norwitz865400f2003-03-21 01:42:58 +000016012fi
16013
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016014if test $ac_sys_system = Darwin
16015then
16016 LIBS="$LIBS -framework CoreFoundation"
16017fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016018
Matthias Kloseb9621712010-04-24 17:59:49 +000016019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16020$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016021if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016022 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016023else
Matthias Kloseb9621712010-04-24 17:59:49 +000016024 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016025 ac_cv_have_size_t_format="cross -- assuming yes"
16026
Thomas Wouters477c8d52006-05-27 19:21:47 +000016027else
Matthias Kloseb9621712010-04-24 17:59:49 +000016028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016029/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016030
Thomas Wouters477c8d52006-05-27 19:21:47 +000016031#include <stdio.h>
16032#include <stddef.h>
16033#include <string.h>
16034
Christian Heimes2c181612007-12-17 20:04:13 +000016035#ifdef HAVE_SYS_TYPES_H
16036#include <sys/types.h>
16037#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016038
16039#ifdef HAVE_SSIZE_T
16040typedef ssize_t Py_ssize_t;
16041#elif SIZEOF_VOID_P == SIZEOF_LONG
16042typedef long Py_ssize_t;
16043#else
16044typedef int Py_ssize_t;
16045#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016046
Christian Heimes2c181612007-12-17 20:04:13 +000016047int main()
16048{
16049 char buffer[256];
16050
Thomas Wouters477c8d52006-05-27 19:21:47 +000016051 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16052 return 1;
16053
Thomas Wouters89f507f2006-12-13 04:49:30 +000016054 if (strcmp(buffer, "123"))
16055 return 1;
16056
16057 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16058 return 1;
16059
16060 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016061 return 1;
16062
16063 return 0;
16064}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016065
Thomas Wouters477c8d52006-05-27 19:21:47 +000016066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016067if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016068 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016069else
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16073 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016074fi
16075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16078$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016079if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016080
Matthias Kloseb9621712010-04-24 17:59:49 +000016081$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016082
16083fi
16084
Matthias Kloseb9621712010-04-24 17:59:49 +000016085ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016086#ifdef HAVE_SYS_TYPES_H
16087#include <sys/types.h>
16088#endif
16089#ifdef HAVE_SYS_SOCKET_H
16090#include <sys/socket.h>
16091#endif
16092
Matthias Kloseb9621712010-04-24 17:59:49 +000016093"
Victor Stinnere0be4232011-10-25 13:06:09 +020016094if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016095
Martin v. Löwis11437992002-04-12 09:54:03 +000016096else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016097
Matthias Kloseb9621712010-04-24 17:59:49 +000016098$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016099
16100fi
16101
Michael W. Hudson54241132001-12-07 15:38:26 +000016102
Matthias Kloseb9621712010-04-24 17:59:49 +000016103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16104$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016105if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016106 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016107else
Matthias Kloseb9621712010-04-24 17:59:49 +000016108 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016109 ac_cv_broken_mbstowcs=no
16110else
Matthias Kloseb9621712010-04-24 17:59:49 +000016111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016112/* end confdefs.h. */
16113
Stefan Krah19c21392012-11-22 23:47:32 +010016114#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016115#include<stdlib.h>
16116int main() {
16117 size_t len = -1;
16118 const char *str = "text";
16119 len = mbstowcs(NULL, str, 0);
16120 return (len != 4);
16121}
16122
16123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016124if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016125 ac_cv_broken_mbstowcs=no
16126else
Matthias Kloseb9621712010-04-24 17:59:49 +000016127 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016131fi
16132
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016133fi
16134
Matthias Kloseb9621712010-04-24 17:59:49 +000016135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16136$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016137if test "$ac_cv_broken_mbstowcs" = yes
16138then
16139
Matthias Kloseb9621712010-04-24 17:59:49 +000016140$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016141
16142fi
16143
Antoine Pitroub52ec782009-01-25 16:34:23 +000016144# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16146$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016147
16148# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016149if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016150 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016151if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016152then
16153
Matthias Kloseb9621712010-04-24 17:59:49 +000016154$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016155
Matthias Kloseb9621712010-04-24 17:59:49 +000016156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16157$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016158fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016159if test "$withval" = no
16160then
16161
16162$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16163
Matthias Kloseb9621712010-04-24 17:59:49 +000016164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16165$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016166fi
16167
Antoine Pitrou042b1282010-08-13 21:15:58 +000016168else
16169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16170$as_echo "no value specified" >&6; }
16171fi
16172
Antoine Pitroub52ec782009-01-25 16:34:23 +000016173
Matthias Kloseb17289e2012-03-15 19:51:34 +010016174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16175$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16176if ${ac_cv_computed_gotos+:} false; then :
16177 $as_echo_n "(cached) " >&6
16178else
16179 if test "$cross_compiling" = yes; then :
16180 if test "${with_computed_gotos+set}" = set; then
16181 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16182 else
16183 ac_cv_computed_gotos=no
16184 fi
16185else
16186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16187/* end confdefs.h. */
16188
16189int main(int argc, char **argv)
16190{
16191 static void *targets[1] = { &&LABEL1 };
16192 goto LABEL2;
16193LABEL1:
16194 return 0;
16195LABEL2:
16196 goto *targets[0];
16197 return 1;
16198}
16199
16200_ACEOF
16201if ac_fn_c_try_run "$LINENO"; then :
16202 ac_cv_computed_gotos=yes
16203else
16204 ac_cv_computed_gotos=no
16205fi
16206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16207 conftest.$ac_objext conftest.beam conftest.$ac_ext
16208fi
16209
16210fi
16211
16212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16213$as_echo "$ac_cv_computed_gotos" >&6; }
16214case "$ac_cv_computed_gotos" in yes*)
16215
16216$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16217
16218esac
16219
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016220case $ac_sys_system in
16221AIX*)
16222
16223$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16224 ;;
16225esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016226
Michael W. Hudson54241132001-12-07 15:38:26 +000016227
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016228
16229
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016230for h in `(cd $srcdir;echo Python/thread_*.h)`
16231do
16232 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16233done
16234
Michael W. Hudson54241132001-12-07 15:38:26 +000016235
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016236SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16238$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016239for dir in $SRCDIRS; do
16240 if test ! -d $dir; then
16241 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016242 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016243done
Matthias Kloseb9621712010-04-24 17:59:49 +000016244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16245$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016246
Stefan Krah1919b7e2012-03-21 18:25:23 +010016247# Availability of -O2:
16248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16249$as_echo_n "checking for -O2... " >&6; }
16250saved_cflags="$CFLAGS"
16251CFLAGS="-O2"
16252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16253/* end confdefs.h. */
16254
16255int
16256main ()
16257{
16258
16259
16260 ;
16261 return 0;
16262}
16263_ACEOF
16264if ac_fn_c_try_compile "$LINENO"; then :
16265 have_O2=yes
16266else
16267 have_O2=no
16268fi
16269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16271$as_echo "$have_O2" >&6; }
16272CFLAGS="$saved_cflags"
16273
16274# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16275# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16277$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16278saved_cflags="$CFLAGS"
16279CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16280if test "$have_O2" = no; then
16281 CFLAGS=""
16282fi
16283if test "$cross_compiling" = yes; then :
16284 have_glibc_memmove_bug=undefined
16285else
16286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16287/* end confdefs.h. */
16288
16289#include <stdio.h>
16290#include <stdlib.h>
16291#include <string.h>
16292void foo(void *p, void *q) { memmove(p, q, 19); }
16293int main() {
16294 char a[32] = "123456789000000000";
16295 foo(&a[9], a);
16296 if (strcmp(a, "123456789123456789000000000") != 0)
16297 return 1;
16298 foo(a, &a[9]);
16299 if (strcmp(a, "123456789000000000") != 0)
16300 return 1;
16301 return 0;
16302}
16303
16304_ACEOF
16305if ac_fn_c_try_run "$LINENO"; then :
16306 have_glibc_memmove_bug=no
16307else
16308 have_glibc_memmove_bug=yes
16309fi
16310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16311 conftest.$ac_objext conftest.beam conftest.$ac_ext
16312fi
16313
16314CFLAGS="$saved_cflags"
16315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16316$as_echo "$have_glibc_memmove_bug" >&6; }
16317if test "$have_glibc_memmove_bug" = yes; then
16318
16319$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16320
16321fi
16322
16323if test "$have_gcc_asm_for_x87" = yes; then
16324 # Some versions of gcc miscompile inline asm:
16325 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16326 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16327 case $CC in
16328 *gcc*)
16329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16330$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16331 saved_cflags="$CFLAGS"
16332 CFLAGS="-O2"
16333 if test "$cross_compiling" = yes; then :
16334 have_ipa_pure_const_bug=undefined
16335else
16336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16337/* end confdefs.h. */
16338
16339 __attribute__((noinline)) int
16340 foo(int *p) {
16341 int r;
16342 asm ( "movl \$6, (%1)\n\t"
16343 "xorl %0, %0\n\t"
16344 : "=r" (r) : "r" (p) : "memory"
16345 );
16346 return r;
16347 }
16348 int main() {
16349 int p = 8;
16350 if ((foo(&p) ? : p) != 6)
16351 return 1;
16352 return 0;
16353 }
16354
16355_ACEOF
16356if ac_fn_c_try_run "$LINENO"; then :
16357 have_ipa_pure_const_bug=no
16358else
16359 have_ipa_pure_const_bug=yes
16360fi
16361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16362 conftest.$ac_objext conftest.beam conftest.$ac_ext
16363fi
16364
16365 CFLAGS="$saved_cflags"
16366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16367$as_echo "$have_ipa_pure_const_bug" >&6; }
16368 if test "$have_ipa_pure_const_bug" = yes; then
16369
16370$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16371
16372 fi
16373 ;;
16374 esac
16375fi
16376
Victor Stinner4f5366e2015-01-09 02:13:19 +010016377# Check for stdatomic.h
16378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16379$as_echo_n "checking for stdatomic.h... " >&6; }
16380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16381/* end confdefs.h. */
16382
16383
16384 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016385 atomic_int value = ATOMIC_VAR_INIT(1);
16386 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016387 int main() {
16388 int loaded_value = atomic_load(&value);
16389 return 0;
16390 }
16391
16392
16393_ACEOF
16394if ac_fn_c_try_link "$LINENO"; then :
16395 have_stdatomic_h=yes
16396else
16397 have_stdatomic_h=no
16398fi
16399rm -f core conftest.err conftest.$ac_objext \
16400 conftest$ac_exeext conftest.$ac_ext
16401
16402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16403$as_echo "$have_stdatomic_h" >&6; }
16404
16405if test "$have_stdatomic_h" = yes; then
16406
16407$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16408
16409fi
16410
16411# Check for GCC >= 4.7 __atomic builtins
16412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16413$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16415/* end confdefs.h. */
16416
16417
16418 volatile int val = 1;
16419 int main() {
16420 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16421 return 0;
16422 }
16423
16424
16425_ACEOF
16426if ac_fn_c_try_link "$LINENO"; then :
16427 have_builtin_atomic=yes
16428else
16429 have_builtin_atomic=no
16430fi
16431rm -f core conftest.err conftest.$ac_objext \
16432 conftest$ac_exeext conftest.$ac_ext
16433
16434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16435$as_echo "$have_builtin_atomic" >&6; }
16436
16437if test "$have_builtin_atomic" = yes; then
16438
16439$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16440
16441fi
16442
Ned Deily322f5ba2013-11-21 23:01:59 -080016443# ensurepip option
16444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16445$as_echo_n "checking for ensurepip... " >&6; }
16446
16447# Check whether --with-ensurepip was given.
16448if test "${with_ensurepip+set}" = set; then :
16449 withval=$with_ensurepip;
16450else
16451 with_ensurepip=upgrade
16452fi
16453
16454case $with_ensurepip in #(
16455 yes|upgrade) :
16456 ENSUREPIP=upgrade ;; #(
16457 install) :
16458 ENSUREPIP=install ;; #(
16459 no) :
16460 ENSUREPIP=no ;; #(
16461 *) :
16462 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16463esac
16464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16465$as_echo "$ENSUREPIP" >&6; }
16466
16467
Victor Stinner35a97c02015-03-08 02:59:09 +010016468# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16470$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16472/* end confdefs.h. */
16473
16474
16475 #include <dirent.h>
16476
16477 int main() {
16478 struct dirent entry;
16479 return entry.d_type == DT_UNKNOWN;
16480 }
16481
16482
16483_ACEOF
16484if ac_fn_c_try_link "$LINENO"; then :
16485 have_dirent_d_type=yes
16486else
16487 have_dirent_d_type=no
16488fi
16489rm -f core conftest.err conftest.$ac_objext \
16490 conftest$ac_exeext conftest.$ac_ext
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16492$as_echo "$have_dirent_d_type" >&6; }
16493
16494if test "$have_dirent_d_type" = yes; then
16495
16496$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16497
16498fi
16499
Victor Stinner9eb57c52015-03-19 22:21:49 +010016500# check if the Linux getrandom() syscall is available
16501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16502$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16504/* end confdefs.h. */
16505
16506
Victor Stinner1b80b242016-04-12 22:34:58 +020016507 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016508 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016509 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016510
16511 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016512 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016513 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016514 const int flags = GRND_NONBLOCK;
16515 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016516 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016517 return 0;
16518 }
16519
16520
16521_ACEOF
16522if ac_fn_c_try_link "$LINENO"; then :
16523 have_getrandom_syscall=yes
16524else
16525 have_getrandom_syscall=no
16526fi
16527rm -f core conftest.err conftest.$ac_objext \
16528 conftest$ac_exeext conftest.$ac_ext
16529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16530$as_echo "$have_getrandom_syscall" >&6; }
16531
16532if test "$have_getrandom_syscall" = yes; then
16533
16534$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16535
16536fi
16537
Victor Stinner3abf44e2015-09-18 15:38:37 +020016538# check if the getrandom() function is available
16539# the test was written for the Solaris function of <sys/random.h>
16540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16541$as_echo_n "checking for the getrandom() function... " >&6; }
16542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16543/* end confdefs.h. */
16544
16545
16546 #include <sys/random.h>
16547
16548 int main() {
16549 char buffer[1];
16550 const size_t buflen = sizeof(buffer);
16551 const int flags = 0;
16552 /* ignore the result, Python checks for ENOSYS at runtime */
16553 (void)getrandom(buffer, buflen, flags);
16554 return 0;
16555 }
16556
16557
16558_ACEOF
16559if ac_fn_c_try_link "$LINENO"; then :
16560 have_getrandom=yes
16561else
16562 have_getrandom=no
16563fi
16564rm -f core conftest.err conftest.$ac_objext \
16565 conftest$ac_exeext conftest.$ac_ext
16566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16567$as_echo "$have_getrandom" >&6; }
16568
16569if test "$have_getrandom" = yes; then
16570
16571$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16572
16573fi
16574
Guido van Rossum627b2d71993-12-24 10:39:16 +000016575# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016576ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016577
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016578ac_config_files="$ac_config_files Modules/ld_so_aix"
16579
Martin v. Löwis11437992002-04-12 09:54:03 +000016580cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016581# This file is a shell script that caches the results of configure
16582# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016583# scripts and configure runs, see configure's option --config-cache.
16584# It is not useful on other systems. If it contains results you don't
16585# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016586#
Martin v. Löwis11437992002-04-12 09:54:03 +000016587# config.status only pays attention to the cache file if you give it
16588# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016589#
Skip Montanaro6dead952003-09-25 14:50:04 +000016590# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016591# loading this file, other *unset* `ac_cv_foo' will be assigned the
16592# following values.
16593
16594_ACEOF
16595
Guido van Rossumf78abae1997-01-21 22:02:36 +000016596# The following way of writing the cache mishandles newlines in values,
16597# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016599# Ultrix sh set writes to stderr and can't be redirected directly,
16600# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601(
16602 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16603 eval ac_val=\$$ac_var
16604 case $ac_val in #(
16605 *${as_nl}*)
16606 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016607 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16608$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609 esac
16610 case $ac_var in #(
16611 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016612 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16613 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614 esac ;;
16615 esac
16616 done
16617
Martin v. Löwis11437992002-04-12 09:54:03 +000016618 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016619 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16620 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016621 # `set' does not quote correctly, so add quotes: double-quote
16622 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016623 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016624 "s/'/'\\\\''/g;
16625 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016627 *)
16628 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016630 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631 esac |
16632 sort
16633) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016635 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016636 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016638 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16639 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16641 :end' >>confcache
16642if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16643 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016644 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016645 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16646$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016647 if test ! -f "$cache_file" || test -h "$cache_file"; then
16648 cat confcache >"$cache_file"
16649 else
16650 case $cache_file in #(
16651 */* | ?:*)
16652 mv -f confcache "$cache_file"$$ &&
16653 mv -f "$cache_file"$$ "$cache_file" ;; #(
16654 *)
16655 mv -f confcache "$cache_file" ;;
16656 esac
16657 fi
16658 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016659 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016660 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16661$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016662 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016663fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016664rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016665
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016666test "x$prefix" = xNONE && prefix=$ac_default_prefix
16667# Let make expand exec_prefix.
16668test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016669
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016670DEFS=-DHAVE_CONFIG_H
16671
Skip Montanaro6dead952003-09-25 14:50:04 +000016672ac_libobjs=
16673ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016674U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016675for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16676 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016678 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016679 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16680 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016681 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16682 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016683done
16684LIBOBJS=$ac_libobjs
16685
16686LTLIBOBJS=$ac_ltlibobjs
16687
16688
Martin v. Löwis11437992002-04-12 09:54:03 +000016689
Matthias Kloseb9621712010-04-24 17:59:49 +000016690
Victor Stinnere0be4232011-10-25 13:06:09 +020016691: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016692ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016693ac_clean_files_save=$ac_clean_files
16694ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016695{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16696$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16697as_write_fail=0
16698cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016699#! $SHELL
16700# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016701# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016702# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016703# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016704
Martin v. Löwis11437992002-04-12 09:54:03 +000016705debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016706ac_cs_recheck=false
16707ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016708
Matthias Kloseb9621712010-04-24 17:59:49 +000016709SHELL=\${CONFIG_SHELL-$SHELL}
16710export SHELL
16711_ASEOF
16712cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16713## -------------------- ##
16714## M4sh Initialization. ##
16715## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717# Be more Bourne compatible
16718DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016719if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 emulate sh
16721 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016722 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016723 # is contrary to our usage. Disable this feature.
16724 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016726else
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 case `(set -o) 2>/dev/null` in #(
16728 *posix*) :
16729 set -o posix ;; #(
16730 *) :
16731 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016733fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016734
16735
Matthias Kloseb9621712010-04-24 17:59:49 +000016736as_nl='
16737'
16738export as_nl
16739# Printing a long string crashes Solaris 7 /usr/bin/printf.
16740as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16741as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16742as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16743# Prefer a ksh shell builtin over an external printf program on Solaris,
16744# but without wasting forks for bash or zsh.
16745if test -z "$BASH_VERSION$ZSH_VERSION" \
16746 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16747 as_echo='print -r --'
16748 as_echo_n='print -rn --'
16749elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16750 as_echo='printf %s\n'
16751 as_echo_n='printf %s'
16752else
16753 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16754 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16755 as_echo_n='/usr/ucb/echo -n'
16756 else
16757 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16758 as_echo_n_body='eval
16759 arg=$1;
16760 case $arg in #(
16761 *"$as_nl"*)
16762 expr "X$arg" : "X\\(.*\\)$as_nl";
16763 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16764 esac;
16765 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16766 '
16767 export as_echo_n_body
16768 as_echo_n='sh -c $as_echo_n_body as_echo'
16769 fi
16770 export as_echo_body
16771 as_echo='sh -c $as_echo_body as_echo'
16772fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016773
16774# The user is always right.
16775if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016776 PATH_SEPARATOR=:
16777 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16778 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16779 PATH_SEPARATOR=';'
16780 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016781fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016783
16784# IFS
16785# We need space, tab and new line, in precisely that order. Quoting is
16786# there to prevent editors from complaining about space-tab.
16787# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16788# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789IFS=" "" $as_nl"
16790
16791# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016792as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016793case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016794 *[\\/]* ) as_myself=$0 ;;
16795 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016796for as_dir in $PATH
16797do
16798 IFS=$as_save_IFS
16799 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016800 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16801 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804 ;;
16805esac
16806# We did not find ourselves, most probably we were run as `sh COMMAND'
16807# in which case we are not to be found in the path.
16808if test "x$as_myself" = x; then
16809 as_myself=$0
16810fi
16811if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016812 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16813 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814fi
16815
Matthias Kloseb9621712010-04-24 17:59:49 +000016816# Unset variables that we do not need and which cause bugs (e.g. in
16817# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16818# suppresses any "Segmentation fault" message there. '((' could
16819# trigger a bug in pdksh 5.2.14.
16820for as_var in BASH_ENV ENV MAIL MAILPATH
16821do eval test x\${$as_var+set} = xset \
16822 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016823done
16824PS1='$ '
16825PS2='> '
16826PS4='+ '
16827
16828# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016829LC_ALL=C
16830export LC_ALL
16831LANGUAGE=C
16832export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016833
Matthias Kloseb9621712010-04-24 17:59:49 +000016834# CDPATH.
16835(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16836
16837
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016838# as_fn_error STATUS ERROR [LINENO LOG_FD]
16839# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016840# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16841# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016842# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016843as_fn_error ()
16844{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016845 as_status=$1; test $as_status -eq 0 && as_status=1
16846 if test "$4"; then
16847 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16848 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016849 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016850 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016851 as_fn_exit $as_status
16852} # as_fn_error
16853
16854
16855# as_fn_set_status STATUS
16856# -----------------------
16857# Set $? to STATUS, without forking.
16858as_fn_set_status ()
16859{
16860 return $1
16861} # as_fn_set_status
16862
16863# as_fn_exit STATUS
16864# -----------------
16865# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16866as_fn_exit ()
16867{
16868 set +e
16869 as_fn_set_status $1
16870 exit $1
16871} # as_fn_exit
16872
16873# as_fn_unset VAR
16874# ---------------
16875# Portably unset VAR.
16876as_fn_unset ()
16877{
16878 { eval $1=; unset $1;}
16879}
16880as_unset=as_fn_unset
16881# as_fn_append VAR VALUE
16882# ----------------------
16883# Append the text in VALUE to the end of the definition contained in VAR. Take
16884# advantage of any shell optimizations that allow amortized linear growth over
16885# repeated appends, instead of the typical quadratic growth present in naive
16886# implementations.
16887if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16888 eval 'as_fn_append ()
16889 {
16890 eval $1+=\$2
16891 }'
16892else
16893 as_fn_append ()
16894 {
16895 eval $1=\$$1\$2
16896 }
16897fi # as_fn_append
16898
16899# as_fn_arith ARG...
16900# ------------------
16901# Perform arithmetic evaluation on the ARGs, and store the result in the
16902# global $as_val. Take advantage of shells that can avoid forks. The arguments
16903# must be portable across $(()) and expr.
16904if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16905 eval 'as_fn_arith ()
16906 {
16907 as_val=$(( $* ))
16908 }'
16909else
16910 as_fn_arith ()
16911 {
16912 as_val=`expr "$@" || test $? -eq 1`
16913 }
16914fi # as_fn_arith
16915
16916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917if expr a : '\(a\)' >/dev/null 2>&1 &&
16918 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16919 as_expr=expr
16920else
16921 as_expr=false
16922fi
16923
16924if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16925 as_basename=basename
16926else
16927 as_basename=false
16928fi
16929
Matthias Kloseb9621712010-04-24 17:59:49 +000016930if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16931 as_dirname=dirname
16932else
16933 as_dirname=false
16934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016936as_me=`$as_basename -- "$0" ||
16937$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16938 X"$0" : 'X\(//\)$' \| \
16939 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016940$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016941 sed '/^.*\/\([^/][^/]*\)\/*$/{
16942 s//\1/
16943 q
16944 }
16945 /^X\/\(\/\/\)$/{
16946 s//\1/
16947 q
16948 }
16949 /^X\/\(\/\).*/{
16950 s//\1/
16951 q
16952 }
16953 s/.*/./; q'`
16954
Matthias Kloseb9621712010-04-24 17:59:49 +000016955# Avoid depending upon Character Ranges.
16956as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16957as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16958as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16959as_cr_digits='0123456789'
16960as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961
16962ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016963case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016964-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016965 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016967 xy) ECHO_C='\c';;
16968 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16969 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016970 esac;;
16971*)
16972 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016974
Martin v. Löwis11437992002-04-12 09:54:03 +000016975rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976if test -d conf$$.dir; then
16977 rm -f conf$$.dir/conf$$.file
16978else
16979 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016980 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016982if (echo >conf$$.file) 2>/dev/null; then
16983 if ln -s conf$$.file conf$$ 2>/dev/null; then
16984 as_ln_s='ln -s'
16985 # ... but there are two gotchas:
16986 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16987 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016988 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016989 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016990 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016991 elif ln conf$$.file conf$$ 2>/dev/null; then
16992 as_ln_s=ln
16993 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016994 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016995 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016996else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016997 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016999rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17000rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017001
Matthias Kloseb9621712010-04-24 17:59:49 +000017002
17003# as_fn_mkdir_p
17004# -------------
17005# Create "$as_dir" as a directory, including parents if necessary.
17006as_fn_mkdir_p ()
17007{
17008
17009 case $as_dir in #(
17010 -*) as_dir=./$as_dir;;
17011 esac
17012 test -d "$as_dir" || eval $as_mkdir_p || {
17013 as_dirs=
17014 while :; do
17015 case $as_dir in #(
17016 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17017 *) as_qdir=$as_dir;;
17018 esac
17019 as_dirs="'$as_qdir' $as_dirs"
17020 as_dir=`$as_dirname -- "$as_dir" ||
17021$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17022 X"$as_dir" : 'X\(//\)[^/]' \| \
17023 X"$as_dir" : 'X\(//\)$' \| \
17024 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17025$as_echo X"$as_dir" |
17026 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17027 s//\1/
17028 q
17029 }
17030 /^X\(\/\/\)[^/].*/{
17031 s//\1/
17032 q
17033 }
17034 /^X\(\/\/\)$/{
17035 s//\1/
17036 q
17037 }
17038 /^X\(\/\).*/{
17039 s//\1/
17040 q
17041 }
17042 s/.*/./; q'`
17043 test -d "$as_dir" && break
17044 done
17045 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017046 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017047
17048
17049} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017050if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017051 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017052else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017053 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017054 as_mkdir_p=false
17055fi
17056
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017057
17058# as_fn_executable_p FILE
17059# -----------------------
17060# Test if FILE is an executable regular file.
17061as_fn_executable_p ()
17062{
17063 test -f "$1" && test -x "$1"
17064} # as_fn_executable_p
17065as_test_x='test -x'
17066as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017067
17068# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017069as_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 +000017070
17071# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017072as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017073
17074
Martin v. Löwis11437992002-04-12 09:54:03 +000017075exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017076## ----------------------------------- ##
17077## Main body of $CONFIG_STATUS script. ##
17078## ----------------------------------- ##
17079_ASEOF
17080test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017081
Matthias Kloseb9621712010-04-24 17:59:49 +000017082cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17083# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017084# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085# values after options handling.
17086ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017087This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017088generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017089
17090 CONFIG_FILES = $CONFIG_FILES
17091 CONFIG_HEADERS = $CONFIG_HEADERS
17092 CONFIG_LINKS = $CONFIG_LINKS
17093 CONFIG_COMMANDS = $CONFIG_COMMANDS
17094 $ $0 $@
17095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017096on `(hostname || uname -n) 2>/dev/null | sed 1q`
17097"
17098
Martin v. Löwis11437992002-04-12 09:54:03 +000017099_ACEOF
17100
Matthias Kloseb9621712010-04-24 17:59:49 +000017101case $ac_config_files in *"
17102"*) set x $ac_config_files; shift; ac_config_files=$*;;
17103esac
17104
17105case $ac_config_headers in *"
17106"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17107esac
17108
17109
17110cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017111# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017112config_files="$ac_config_files"
17113config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017116
Matthias Kloseb9621712010-04-24 17:59:49 +000017117cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017118ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017119\`$as_me' instantiates files and other configuration actions
17120from templates according to the current configuration. Unless the files
17121and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017122
Matthias Kloseb9621712010-04-24 17:59:49 +000017123Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017124
17125 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017127 --config print configuration, then exit
17128 -q, --quiet, --silent
17129 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017130 -d, --debug don't remove temporary files
17131 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017132 --file=FILE[:TEMPLATE]
17133 instantiate the configuration file FILE
17134 --header=FILE[:TEMPLATE]
17135 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017136
17137Configuration files:
17138$config_files
17139
17140Configuration headers:
17141$config_headers
17142
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017143Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017146cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17147ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017148ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017149python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017150configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017151 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017152
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017153Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017154This config.status script is free software; the Free Software Foundation
17155gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017156
17157ac_pwd='$ac_pwd'
17158srcdir='$srcdir'
17159INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017160MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017161test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017162_ACEOF
17163
Matthias Kloseb9621712010-04-24 17:59:49 +000017164cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17165# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017166ac_need_defaults=:
17167while test $# != 0
17168do
17169 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017170 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17172 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017173 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017174 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017175 --*=)
17176 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17177 ac_optarg=
17178 ac_shift=:
17179 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017181 ac_option=$1
17182 ac_optarg=$2
17183 ac_shift=shift
17184 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 esac
17186
Skip Montanaro6dead952003-09-25 14:50:04 +000017187 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017188 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017189 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17190 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017192 $as_echo "$ac_cs_version"; exit ;;
17193 --config | --confi | --conf | --con | --co | --c )
17194 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017196 debug=: ;;
17197 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017198 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017199 case $ac_optarg in
17200 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017201 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017202 esac
17203 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017204 ac_need_defaults=false;;
17205 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017206 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017207 case $ac_optarg in
17208 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17209 esac
17210 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017212 --he | --h)
17213 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017214 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017215Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017217 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017218 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17219 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17220 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017221
17222 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017223 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017224Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017225
Matthias Kloseb9621712010-04-24 17:59:49 +000017226 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017227 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017228
17229 esac
17230 shift
17231done
17232
Skip Montanaro6dead952003-09-25 14:50:04 +000017233ac_configure_extra_args=
17234
17235if $ac_cs_silent; then
17236 exec 6>/dev/null
17237 ac_configure_extra_args="$ac_configure_extra_args --silent"
17238fi
17239
17240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017241cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017242if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017243 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017244 shift
17245 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17246 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017248 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017249fi
17250
Martin v. Löwis11437992002-04-12 09:54:03 +000017251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253exec 5>>config.log
17254{
17255 echo
17256 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17257## Running $as_me. ##
17258_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017259 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017263cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017265
Matthias Kloseb9621712010-04-24 17:59:49 +000017266cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267
17268# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017269for ac_config_target in $ac_config_targets
17270do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271 case $ac_config_target in
17272 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17273 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17274 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017275 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17276 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17278 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017279 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017280 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017281 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282
Victor Stinnere0be4232011-10-25 13:06:09 +020017283 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017284 esac
17285done
17286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017287
Martin v. Löwis11437992002-04-12 09:54:03 +000017288# If the user did not use the arguments to specify the items to instantiate,
17289# then the envvar interface is used. Set only those that are not.
17290# We use the long form for the default assignment because of an extremely
17291# bizarre bug on SunOS 4.1.3.
17292if $ac_need_defaults; then
17293 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17294 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17295fi
17296
Skip Montanaro6dead952003-09-25 14:50:04 +000017297# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017298# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017299# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017300# Hook for its removal unless debugging.
17301# Note that there is a small window in which the directory will not be cleaned:
17302# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017303$debug ||
17304{
Victor Stinnere0be4232011-10-25 13:06:09 +020017305 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017306 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017307 : "${ac_tmp:=$tmp}"
17308 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017310 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017311}
Martin v. Löwis11437992002-04-12 09:54:03 +000017312# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017313
Martin v. Löwis11437992002-04-12 09:54:03 +000017314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017315 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017316 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017317} ||
17318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319 tmp=./conf$$-$RANDOM
17320 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017321} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017322ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017323
Matthias Kloseb9621712010-04-24 17:59:49 +000017324# Set up the scripts for CONFIG_FILES section.
17325# No need to generate them if there are no CONFIG_FILES.
17326# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017328
Matthias Kloseb9621712010-04-24 17:59:49 +000017329
17330ac_cr=`echo X | tr X '\015'`
17331# On cygwin, bash can eat \r inside `` if the user requested igncr.
17332# But we know of no other shell where ac_cr would be empty at this
17333# point, so we can use a bashism as a fallback.
17334if test "x$ac_cr" = x; then
17335 eval ac_cr=\$\'\\r\'
17336fi
17337ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17338if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017339 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017340else
17341 ac_cs_awk_cr=$ac_cr
17342fi
17343
Victor Stinnere0be4232011-10-25 13:06:09 +020017344echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017345_ACEOF
17346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347
Matthias Kloseb9621712010-04-24 17:59:49 +000017348{
17349 echo "cat >conf$$subs.awk <<_ACEOF" &&
17350 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17351 echo "_ACEOF"
17352} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017353 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17354ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355ac_delim='%!_!# '
17356for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017357 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017358 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359
Matthias Kloseb9621712010-04-24 17:59:49 +000017360 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17361 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362 break
17363 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017364 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365 else
17366 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017367 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368done
Matthias Kloseb9621712010-04-24 17:59:49 +000017369rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370
Matthias Kloseb9621712010-04-24 17:59:49 +000017371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017372cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017374sed -n '
17375h
17376s/^/S["/; s/!.*/"]=/
17377p
17378g
17379s/^[^!]*!//
17380:repl
17381t repl
17382s/'"$ac_delim"'$//
17383t delim
17384:nl
17385h
17386s/\(.\{148\}\)..*/\1/
17387t more1
17388s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17389p
17390n
17391b repl
17392:more1
17393s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17394p
17395g
17396s/.\{148\}//
17397t nl
17398:delim
17399h
17400s/\(.\{148\}\)..*/\1/
17401t more2
17402s/["\\]/\\&/g; s/^/"/; s/$/"/
17403p
17404b
17405:more2
17406s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17407p
17408g
17409s/.\{148\}//
17410t delim
17411' <conf$$subs.awk | sed '
17412/^[^""]/{
17413 N
17414 s/\n//
17415}
17416' >>$CONFIG_STATUS || ac_write_fail=1
17417rm -f conf$$subs.awk
17418cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17419_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017420cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017421 for (key in S) S_is_set[key] = 1
17422 FS = ""
17423
17424}
17425{
17426 line = $ 0
17427 nfields = split(line, field, "@")
17428 substed = 0
17429 len = length(field[1])
17430 for (i = 2; i < nfields; i++) {
17431 key = field[i]
17432 keylen = length(key)
17433 if (S_is_set[key]) {
17434 value = S[key]
17435 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17436 len += length(value) + length(field[++i])
17437 substed = 1
17438 } else
17439 len += 1 + keylen
17440 }
17441
17442 print line
17443}
17444
17445_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017447cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17448if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17449 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17450else
17451 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017452fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017453 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017454_ACEOF
17455
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017456# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17457# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458# trailing colons and then remove the whole line if VPATH becomes empty
17459# (actually we leave an empty line to preserve line numbers).
17460if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017461 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17462h
17463s///
17464s/^/:/
17465s/[ ]*$/:/
17466s/:\$(srcdir):/:/g
17467s/:\${srcdir}:/:/g
17468s/:@srcdir@:/:/g
17469s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017471x
17472s/\(=[ ]*\).*/\1/
17473G
17474s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475s/^[^=]*=[ ]*$//
17476}'
17477fi
17478
Matthias Kloseb9621712010-04-24 17:59:49 +000017479cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017480fi # test -n "$CONFIG_FILES"
17481
Matthias Kloseb9621712010-04-24 17:59:49 +000017482# Set up the scripts for CONFIG_HEADERS section.
17483# No need to generate them if there are no CONFIG_HEADERS.
17484# This happens for instance with `./config.status Makefile'.
17485if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017486cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017487BEGIN {
17488_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017489
Matthias Kloseb9621712010-04-24 17:59:49 +000017490# Transform confdefs.h into an awk script `defines.awk', embedded as
17491# here-document in config.status, that substitutes the proper values into
17492# config.h.in to produce config.h.
17493
17494# Create a delimiter string that does not exist in confdefs.h, to ease
17495# handling of long lines.
17496ac_delim='%!_!# '
17497for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017498 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17499 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017500 break
17501 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017502 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017503 else
17504 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17505 fi
17506done
17507
17508# For the awk script, D is an array of macro values keyed by name,
17509# likewise P contains macro parameters if any. Preserve backslash
17510# newline sequences.
17511
17512ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17513sed -n '
17514s/.\{148\}/&'"$ac_delim"'/g
17515t rset
17516:rset
17517s/^[ ]*#[ ]*define[ ][ ]*/ /
17518t def
17519d
17520:def
17521s/\\$//
17522t bsnl
17523s/["\\]/\\&/g
17524s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17525D["\1"]=" \3"/p
17526s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17527d
17528:bsnl
17529s/["\\]/\\&/g
17530s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17531D["\1"]=" \3\\\\\\n"\\/p
17532t cont
17533s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17534t cont
17535d
17536:cont
17537n
17538s/.\{148\}/&'"$ac_delim"'/g
17539t clear
17540:clear
17541s/\\$//
17542t bsnlc
17543s/["\\]/\\&/g; s/^/"/; s/$/"/p
17544d
17545:bsnlc
17546s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17547b cont
17548' <confdefs.h | sed '
17549s/'"$ac_delim"'/"\\\
17550"/g' >>$CONFIG_STATUS || ac_write_fail=1
17551
17552cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17553 for (key in D) D_is_set[key] = 1
17554 FS = ""
17555}
17556/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17557 line = \$ 0
17558 split(line, arg, " ")
17559 if (arg[1] == "#") {
17560 defundef = arg[2]
17561 mac1 = arg[3]
17562 } else {
17563 defundef = substr(arg[1], 2)
17564 mac1 = arg[2]
17565 }
17566 split(mac1, mac2, "(") #)
17567 macro = mac2[1]
17568 prefix = substr(line, 1, index(line, defundef) - 1)
17569 if (D_is_set[macro]) {
17570 # Preserve the white space surrounding the "#".
17571 print prefix "define", macro P[macro] D[macro]
17572 next
17573 } else {
17574 # Replace #undef with comments. This is necessary, for example,
17575 # in the case of _POSIX_SOURCE, which is predefined and required
17576 # on some systems where configure will not decide to define it.
17577 if (defundef == "undef") {
17578 print "/*", prefix defundef, macro, "*/"
17579 next
17580 }
17581 }
17582}
17583{ print }
17584_ACAWK
17585_ACEOF
17586cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017587 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017588fi # test -n "$CONFIG_HEADERS"
17589
17590
17591eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17592shift
17593for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594do
17595 case $ac_tag in
17596 :[FHLC]) ac_mode=$ac_tag; continue;;
17597 esac
17598 case $ac_mode$ac_tag in
17599 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017600 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601 :[FH]-) ac_tag=-:-;;
17602 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17603 esac
17604 ac_save_IFS=$IFS
17605 IFS=:
17606 set x $ac_tag
17607 IFS=$ac_save_IFS
17608 shift
17609 ac_file=$1
17610 shift
17611
17612 case $ac_mode in
17613 :L) ac_source=$1;;
17614 :[FH])
17615 ac_file_inputs=
17616 for ac_f
17617 do
17618 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017619 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620 *) # Look for the file first in the build tree, then in the source tree
17621 # (if the path is not absolute). The absolute path cannot be DOS-style,
17622 # because $ac_f cannot contain `:'.
17623 test -f "$ac_f" ||
17624 case $ac_f in
17625 [\\/$]*) false;;
17626 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17627 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017628 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017630 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17631 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 done
17633
17634 # Let's still pretend it is `configure' which instantiates (i.e., don't
17635 # use $as_me), people would be surprised to read:
17636 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017637 configure_input='Generated from '`
17638 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17639 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640 if test x"$ac_file" != x-; then
17641 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017642 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17643$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017645 # Neutralize special characters interpreted by sed in replacement strings.
17646 case $configure_input in #(
17647 *\&* | *\|* | *\\* )
17648 ac_sed_conf_input=`$as_echo "$configure_input" |
17649 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17650 *) ac_sed_conf_input=$configure_input;;
17651 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652
17653 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017654 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17655 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656 esac
17657 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017658 esac
17659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017661$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017662 X"$ac_file" : 'X\(//\)[^/]' \| \
17663 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017665$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17667 s//\1/
17668 q
17669 }
17670 /^X\(\/\/\)[^/].*/{
17671 s//\1/
17672 q
17673 }
17674 /^X\(\/\/\)$/{
17675 s//\1/
17676 q
17677 }
17678 /^X\(\/\).*/{
17679 s//\1/
17680 q
17681 }
17682 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017683 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017684 ac_builddir=.
17685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686case "$ac_dir" in
17687.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17688*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017689 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017691 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692 case $ac_top_builddir_sub in
17693 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17694 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17695 esac ;;
17696esac
17697ac_abs_top_builddir=$ac_pwd
17698ac_abs_builddir=$ac_pwd$ac_dir_suffix
17699# for backward compatibility:
17700ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017701
17702case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017704 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017705 ac_top_srcdir=$ac_top_builddir_sub
17706 ac_abs_top_srcdir=$ac_pwd ;;
17707 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017708 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709 ac_top_srcdir=$srcdir
17710 ac_abs_top_srcdir=$srcdir ;;
17711 *) # Relative name.
17712 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17713 ac_top_srcdir=$ac_top_build_prefix$srcdir
17714 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017715esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017717
Martin v. Löwis11437992002-04-12 09:54:03 +000017718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719 case $ac_mode in
17720 :F)
17721 #
17722 # CONFIG_FILE
17723 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017724
17725 case $INSTALL in
17726 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017728 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017729 ac_MKDIR_P=$MKDIR_P
17730 case $MKDIR_P in
17731 [\\/$]* | ?:[\\/]* ) ;;
17732 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17733 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017734_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735
Matthias Kloseb9621712010-04-24 17:59:49 +000017736cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737# If the template does not know about datarootdir, expand it.
17738# FIXME: This hack should be removed a few years after 2.60.
17739ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017740ac_sed_dataroot='
17741/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742 p
17743 q
17744}
17745/@datadir@/p
17746/@docdir@/p
17747/@infodir@/p
17748/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017749/@mandir@/p'
17750case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751*datarootdir*) ac_datarootdir_seen=yes;;
17752*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17754$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017756cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757 ac_datarootdir_hack='
17758 s&@datadir@&$datadir&g
17759 s&@docdir@&$docdir&g
17760 s&@infodir@&$infodir&g
17761 s&@localedir@&$localedir&g
17762 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764esac
17765_ACEOF
17766
17767# Neutralize VPATH when `$srcdir' = `.'.
17768# Shell code in configure.ac might set extrasub.
17769# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017770cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17771ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017772$extrasub
17773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017774cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017775:t
17776/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017777s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017778s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017779s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780s&@srcdir@&$ac_srcdir&;t t
17781s&@abs_srcdir@&$ac_abs_srcdir&;t t
17782s&@top_srcdir@&$ac_top_srcdir&;t t
17783s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17784s&@builddir@&$ac_builddir&;t t
17785s&@abs_builddir@&$ac_abs_builddir&;t t
17786s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17787s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017788s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017789$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017790"
Victor Stinnere0be4232011-10-25 13:06:09 +020017791eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17792 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017795 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17796 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17797 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017799which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017800$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017801which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017802
Victor Stinnere0be4232011-10-25 13:06:09 +020017803 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017804 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017805 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17806 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017807 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017808 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809 ;;
17810 :H)
17811 #
17812 # CONFIG_HEADER
17813 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017814 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017815 {
17816 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017817 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17818 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017819 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017820 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017821 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17822$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017823 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017824 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017825 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017826 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017827 fi
17828 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017829 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017830 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017831 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017832 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017833 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835
17836 esac
17837
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017838
17839 case $ac_file$ac_mode in
17840 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17841
17842 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843done # for ac_tag
17844
Guido van Rossum627b2d71993-12-24 10:39:16 +000017845
Matthias Kloseb9621712010-04-24 17:59:49 +000017846as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017847_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017848ac_clean_files=$ac_clean_files_save
17849
Matthias Kloseb9621712010-04-24 17:59:49 +000017850test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017851 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017852
Martin v. Löwis11437992002-04-12 09:54:03 +000017853
17854# configure is writing to config.log, and then calls config.status.
17855# config.status does its own redirection, appending to config.log.
17856# Unfortunately, on DOS this fails, as config.log is still kept open
17857# by configure, so config.status won't be able to write to it; its
17858# output is simply discarded. So we exec the FD to /dev/null,
17859# effectively closing config.log, so it can be properly (re)opened and
17860# appended to by config.status. When coming back to configure, we
17861# need to make the FD available again.
17862if test "$no_create" != yes; then
17863 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017864 ac_config_status_args=
17865 test "$silent" = yes &&
17866 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017867 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017868 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 exec 5>>config.log
17870 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17871 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017872 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017873fi
17874if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17875 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17876$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017877fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017878
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017879
Christian Heimes75ed8902013-11-20 01:11:18 +010017880echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017881if test ! -f Modules/Setup
17882then
17883 cp $srcdir/Modules/Setup.dist Modules/Setup
17884fi
17885
Christian Heimes75ed8902013-11-20 01:11:18 +010017886echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017887if test ! -f Modules/Setup.local
17888then
17889 echo "# Edit this file for local setup changes" >Modules/Setup.local
17890fi
17891
Christian Heimes75ed8902013-11-20 01:11:18 +010017892echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017893$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17894 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017895 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017896mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017897
17898if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17899 echo "" >&6
17900 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017901 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 +000017902 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017903 echo "" >&6
17904 echo "" >&6
17905fi
17906