blob: ac16ce755be33437d29b9d2b9d0e71cb36972523 [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
671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700683LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
697RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000698USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
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
731SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000752GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200754PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500763HAS_GIT
764GITBRANCH
765GITTAG
766GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700787runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
814with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600815with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_threads
834with_thread
835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
838with_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'
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700898runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899includedir='${prefix}/include'
900oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 ac_prev=
919 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200923 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *=) ac_optarg= ;;
925 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Accept the important Cygnus configure options, so we can diagnose typos.
929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_dashdash$ac_option in
931 --)
932 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -bindir | --bindir | --bindi | --bind | --bin | --bi)
935 ac_prev=bindir ;;
936 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
939 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 -cache-file | --cache-file | --cache-fil | --cache-fi \
945 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946 ac_prev=cache_file ;;
947 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 cache_file=$ac_optarg ;;
950
951 --config-cache | -C)
952 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960 | --dataroo | --dataro | --datar)
961 ac_prev=datarootdir ;;
962 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964 datarootdir=$ac_optarg ;;
965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200970 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt_orig=$ac_useropt
972 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973 case $ac_user_opts in
974 *"
975"enable_$ac_useropt"
976"*) ;;
977 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978 ac_unrecognized_sep=', ';;
979 esac
980 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981
982 -docdir | --docdir | --docdi | --doc | --do)
983 ac_prev=docdir ;;
984 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985 docdir=$ac_optarg ;;
986
987 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988 ac_prev=dvidir ;;
989 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200996 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 ac_useropt_orig=$ac_useropt
998 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999 case $ac_user_opts in
1000 *"
1001"enable_$ac_useropt"
1002"*) ;;
1003 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004 ac_unrecognized_sep=', ';;
1005 esac
1006 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010 | --exec | --exe | --ex)
1011 ac_prev=exec_prefix ;;
1012 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --with-gas.
1019 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 -help | --help | --hel | --he | -h)
1022 ac_init_help=long ;;
1023 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024 ac_init_help=recursive ;;
1025 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034 ac_prev=htmldir ;;
1035 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036 | --ht=*)
1037 htmldir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -includedir | --includedir | --includedi | --included | --include \
1040 | --includ | --inclu | --incl | --inc)
1041 ac_prev=includedir ;;
1042 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -infodir | --infodir | --infodi | --infod | --info | --inf)
1047 ac_prev=infodir ;;
1048 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libdir | --libdir | --libdi | --libd)
1052 ac_prev=libdir ;;
1053 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057 | --libexe | --libex | --libe)
1058 ac_prev=libexecdir ;;
1059 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 -localedir | --localedir | --localedi | --localed | --locale)
1064 ac_prev=localedir ;;
1065 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066 localedir=$ac_optarg ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 ac_prev=localstatedir ;;
1071 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076 ac_prev=mandir ;;
1077 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 # Obsolete; use --without-fp.
1082 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 no_create=yes ;;
1087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094 | --oldin | --oldi | --old | --ol | --o)
1095 ac_prev=oldincludedir ;;
1096 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102 ac_prev=prefix ;;
1103 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107 | --program-pre | --program-pr | --program-p)
1108 ac_prev=program_prefix ;;
1109 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114 | --program-suf | --program-su | --program-s)
1115 ac_prev=program_suffix ;;
1116 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-transform-name | --program-transform-name \
1121 | --program-transform-nam | --program-transform-na \
1122 | --program-transform-n | --program-transform- \
1123 | --program-transform | --program-transfor \
1124 | --program-transfo | --program-transf \
1125 | --program-trans | --program-tran \
1126 | --progr-tra | --program-tr | --program-t)
1127 ac_prev=program_transform_name ;;
1128 -program-transform-name=* | --program-transform-name=* \
1129 | --program-transform-nam=* | --program-transform-na=* \
1130 | --program-transform-n=* | --program-transform-=* \
1131 | --program-transform=* | --program-transfor=* \
1132 | --program-transfo=* | --program-transf=* \
1133 | --program-trans=* | --program-tran=* \
1134 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138 ac_prev=pdfdir ;;
1139 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140 pdfdir=$ac_optarg ;;
1141
1142 -psdir | --psdir | --psdi | --psd | --ps)
1143 ac_prev=psdir ;;
1144 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145 psdir=$ac_optarg ;;
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148 | -silent | --silent | --silen | --sile | --sil)
1149 silent=yes ;;
1150
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001151 -runstatedir | --runstatedir | --runstatedi | --runstated \
1152 | --runstate | --runstat | --runsta | --runst | --runs \
1153 | --run | --ru | --r)
1154 ac_prev=runstatedir ;;
1155 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1156 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1157 | --run=* | --ru=* | --r=*)
1158 runstatedir=$ac_optarg ;;
1159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1161 ac_prev=sbindir ;;
1162 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1163 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
1166 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1167 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1168 | --sharedst | --shareds | --shared | --share | --shar \
1169 | --sha | --sh)
1170 ac_prev=sharedstatedir ;;
1171 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1172 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1173 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1174 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 -site | --site | --sit)
1178 ac_prev=site ;;
1179 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1183 ac_prev=srcdir ;;
1184 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1188 | --syscon | --sysco | --sysc | --sys | --sy)
1189 ac_prev=sysconfdir ;;
1190 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1191 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1200 verbose=yes ;;
1201
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 -version | --version | --versio | --versi | --vers | -V)
1203 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
1234 esac
1235 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 --x)
1238 # Obsolete; use --with-x.
1239 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1242 | --x-incl | --x-inc | --x-in | --x-i)
1243 ac_prev=x_includes ;;
1244 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1245 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
1248 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1249 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1250 ac_prev=x_libraries ;;
1251 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1252 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1256Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 ;;
1258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 *=*)
1260 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 case $ac_envvar in #(
1263 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 export $ac_envvar ;;
1268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001269 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001274 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ;;
1276
1277 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278done
1279
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283fi
1284
Matthias Kloseb9621712010-04-24 17:59:49 +00001285if test -n "$ac_unrecognized_opts"; then
1286 case $enable_option_checking in
1287 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1290 esac
1291fi
1292
1293# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1295 datadir sysconfdir sharedstatedir localstatedir includedir \
1296 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001297 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 # Remove trailing slashes.
1301 case $ac_val in
1302 */ )
1303 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1304 eval $ac_var=\$ac_val;;
1305 esac
1306 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 [\\/$]* | ?:[\\/]* ) continue;;
1309 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001312done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# There might be people who depend on the old broken behavior: `$host'
1315# used to hold the argument of --host etc.
1316# FIXME: To remove some day.
1317build=$build_alias
1318host=$host_alias
1319target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
Martin v. Löwis11437992002-04-12 09:54:03 +00001321# FIXME: To remove some day.
1322if test "x$host_alias" != x; then
1323 if test "x$build_alias" = x; then
1324 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 elif test "x$build_alias" != "x$host_alias"; then
1326 cross_compiling=yes
1327 fi
1328fi
1329
1330ac_tool_prefix=
1331test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333test "$silent" = yes && exec 6>/dev/null
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337ac_ls_di=`ls -di .` &&
1338ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342
1343
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344# Find the source files, if location was not specified.
1345if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 ac_confdir=`$as_dirname -- "$as_myself" ||
1349$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350 X"$as_myself" : 'X\(//\)[^/]' \| \
1351 X"$as_myself" : 'X\(//\)$' \| \
1352 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)[^/].*/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\).*/{
1367 s//\1/
1368 q
1369 }
1370 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373 srcdir=..
1374 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378if test ! -r "$srcdir/$ac_unique_file"; then
1379 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1383ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001384 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385 pwd)`
1386# When building in place, set srcdir=.
1387if test "$ac_abs_confdir" = "$ac_pwd"; then
1388 srcdir=.
1389fi
1390# Remove unnecessary trailing slashes from srcdir.
1391# Double slashes in file names in object file debugging info
1392# mess up M-x gdb in Emacs.
1393case $srcdir in
1394*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1395esac
1396for ac_var in $ac_precious_vars; do
1397 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_env_${ac_var}_value=\$${ac_var}
1399 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1401done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402
Martin v. Löwis11437992002-04-12 09:54:03 +00001403#
1404# Report the --help message.
1405#
1406if test "$ac_init_help" = "long"; then
1407 # Omit some internal or obsolete options to make the list less imposing.
1408 # This message is too long to be a string in the A/UX 3.1 sh.
1409 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001410\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412Usage: $0 [OPTION]... [VAR=VALUE]...
1413
1414To assign environment variables (e.g., CC, CFLAGS...), specify them as
1415VAR=VALUE. See below for descriptions of some of the useful variables.
1416
1417Defaults for the options are specified in brackets.
1418
1419Configuration:
1420 -h, --help display this help and exit
1421 --help=short display options specific to this package
1422 --help=recursive display the short help of all the included packages
1423 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001424 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --cache-file=FILE cache test results in FILE [disabled]
1426 -C, --config-cache alias for \`--cache-file=config.cache'
1427 -n, --no-create do not create output files
1428 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1429
Martin v. Löwis11437992002-04-12 09:54:03 +00001430Installation directories:
1431 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436By default, \`make install' will install all the files in
1437\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1438an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439for instance \`--prefix=\$HOME'.
1440
1441For better control, use the options below.
1442
1443Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --bindir=DIR user executables [EPREFIX/bin]
1445 --sbindir=DIR system admin executables [EPREFIX/sbin]
1446 --libexecdir=DIR program executables [EPREFIX/libexec]
1447 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1448 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1449 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001450 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --libdir=DIR object code libraries [EPREFIX/lib]
1452 --includedir=DIR C header files [PREFIX/include]
1453 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1454 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1455 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1456 --infodir=DIR info documentation [DATAROOTDIR/info]
1457 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1458 --mandir=DIR man documentation [DATAROOTDIR/man]
1459 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1460 --htmldir=DIR html documentation [DOCDIR]
1461 --dvidir=DIR dvi documentation [DOCDIR]
1462 --pdfdir=DIR pdf documentation [DOCDIR]
1463 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465
1466 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001467
1468System types:
1469 --build=BUILD configure for building on BUILD [guessed]
1470 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001471 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001477 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001491 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1492 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
1504 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001505 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001506 --with-framework-name=FRAMEWORK
1507 specify an alternate name of the framework built
1508 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001510 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001511 --with-cxx-main=<compiler>
1512 compile main() and link python executable with C++
1513 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with-suffix=.exe set executable suffix
1515 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001516 --with-lto Enable Link Time Optimization in PGO builds.
1517 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001518 --with-hash-algorithm=[fnv|siphash24]
1519 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001520 --with-address-sanitizer
1521 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001522 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001523 --with-system-expat build pyexpat module using an installed expat
1524 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001525 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001526 --with-system-libmpdec build _decimal module using an installed libmpdec
1527 library
Ned Deilyd819b932013-09-06 01:07:05 -07001528 --with-tcltk-includes='-I...'
1529 override search for Tcl and Tk include files
1530 --with-tcltk-libs='-L...'
1531 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001532 --with-dbmliborder=db1:db2:...
1533 order to check db backends for dbm. Valid value is a
1534 colon separated string with the backend names
1535 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001536 --with(out)-threads[=DIRECTORY]
1537 disable/enable thread support
1538 --with(out)-thread[=DIRECTORY]
1539 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with(out)-doc-strings disable/enable documentation strings
1541 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001542 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001543 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001544 --with-fpectl enable SIGFPE catching
1545 --with-libm=STRING math library
1546 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001547 --with(out)-computed-gotos
1548 Use computed gotos in evaluation loop (enabled by
1549 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001550 --with(out)-ensurepip=[=upgrade]
1551 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001554 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 CC C compiler command
1556 CFLAGS C compiler flags
1557 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1558 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001560 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001563 PKG_CONFIG path to pkg-config utility
1564 PKG_CONFIG_PATH
1565 directories to add to pkg-config's search path
1566 PKG_CONFIG_LIBDIR
1567 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
1569Use these variables to override the choices made by `configure' or to help
1570it to find libraries and programs with nonstandard names/locations.
1571
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001572Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001575fi
1576
1577if test "$ac_init_help" = "recursive"; then
1578 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 test -d "$ac_dir" ||
1581 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1582 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ac_builddir=.
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585case "$ac_dir" in
1586.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $ac_top_builddir_sub in
1592 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594 esac ;;
1595esac
1596ac_abs_top_builddir=$ac_pwd
1597ac_abs_builddir=$ac_pwd$ac_dir_suffix
1598# for backward compatibility:
1599ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
1601case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$ac_top_builddir_sub
1605 ac_abs_top_srcdir=$ac_pwd ;;
1606 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 ac_top_srcdir=$srcdir
1609 ac_abs_top_srcdir=$srcdir ;;
1610 *) # Relative name.
1611 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1612 ac_top_srcdir=$ac_top_build_prefix$srcdir
1613 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001614esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 cd "$ac_dir" || { ac_status=$?; continue; }
1618 # Check for guested configure.
1619 if test -f "$ac_srcdir/configure.gnu"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1622 elif test -f "$ac_srcdir/configure"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 fi || ac_status=$?
1628 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 done
1630fi
1631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if $ac_init_version; then
1634 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001635python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001637
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001638Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639This configure script is free software; the Free Software Foundation
1640gives unlimited permission to copy, distribute and modify it.
1641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001644
1645## ------------------------ ##
1646## Autoconf initialization. ##
1647## ------------------------ ##
1648
1649# ac_fn_c_try_compile LINENO
1650# --------------------------
1651# Try to compile conftest.$ac_ext, and return whether this succeeded.
1652ac_fn_c_try_compile ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 rm -f conftest.$ac_objext
1656 if { { ac_try="$ac_compile"
1657case "(($ac_try" in
1658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659 *) ac_try_echo=$ac_try;;
1660esac
1661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662$as_echo "$ac_try_echo"; } >&5
1663 (eval "$ac_compile") 2>conftest.err
1664 ac_status=$?
1665 if test -s conftest.err; then
1666 grep -v '^ *+' conftest.err >conftest.er1
1667 cat conftest.er1 >&5
1668 mv -f conftest.er1 conftest.err
1669 fi
1670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671 test $ac_status = 0; } && {
1672 test -z "$ac_c_werror_flag" ||
1673 test ! -s conftest.err
1674 } && test -s conftest.$ac_objext; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
1679
1680 ac_retval=1
1681fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001682 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001683 as_fn_set_status $ac_retval
1684
1685} # ac_fn_c_try_compile
1686
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001687# ac_fn_c_try_cpp LINENO
1688# ----------------------
1689# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_cpp ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_cpp conftest.$ac_ext"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1701 ac_status=$?
1702 if test -s conftest.err; then
1703 grep -v '^ *+' conftest.err >conftest.er1
1704 cat conftest.er1 >&5
1705 mv -f conftest.er1 conftest.err
1706 fi
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } > conftest.i && {
1709 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1710 test ! -s conftest.err
1711 }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
1716
1717 ac_retval=1
1718fi
1719 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720 as_fn_set_status $ac_retval
1721
1722} # ac_fn_c_try_cpp
1723
Matthias Kloseb9621712010-04-24 17:59:49 +00001724# ac_fn_c_try_link LINENO
1725# -----------------------
1726# Try to link conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_link ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext conftest$ac_exeext
1731 if { { ac_try="$ac_link"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_link") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest$ac_exeext && {
1750 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001751 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 }; then :
1753 ac_retval=0
1754else
1755 $as_echo "$as_me: failed program was:" >&5
1756sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759fi
1760 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1761 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1762 # interfere with the next link command; also delete a directory that is
1763 # left behind by Apple's compiler. We do this before executing the actions.
1764 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001766 as_fn_set_status $ac_retval
1767
1768} # ac_fn_c_try_link
1769
Matthias Kloseb9621712010-04-24 17:59:49 +00001770# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771# -------------------------------------------------------
1772# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773# the include files in INCLUDES and setting the cache variable VAR
1774# accordingly.
1775ac_fn_c_check_header_mongrel ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001778 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001781if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 $as_echo_n "(cached) " >&6
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787else
1788 # Is the header compilable?
1789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790$as_echo_n "checking $2 usability... " >&6; }
1791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792/* end confdefs.h. */
1793$4
1794#include <$2>
1795_ACEOF
1796if ac_fn_c_try_compile "$LINENO"; then :
1797 ac_header_compiler=yes
1798else
1799 ac_header_compiler=no
1800fi
1801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803$as_echo "$ac_header_compiler" >&6; }
1804
1805# Is the header present?
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807$as_echo_n "checking $2 presence... " >&6; }
1808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810#include <$2>
1811_ACEOF
1812if ac_fn_c_try_cpp "$LINENO"; then :
1813 ac_header_preproc=yes
1814else
1815 ac_header_preproc=no
1816fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001817rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819$as_echo "$ac_header_preproc" >&6; }
1820
1821# So? What about this header?
1822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1823 yes:no: )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828 ;;
1829 no:yes:* )
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1833$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1837$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001840( $as_echo "## --------------------------------------- ##
1841## Report this to https://bugs.python.org/ ##
1842## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 ) | sed "s/^/$as_me: WARNING: /" >&2
1844 ;;
1845esac
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001848if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001849 $as_echo_n "(cached) " >&6
1850else
1851 eval "$3=\$ac_header_compiler"
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858
1859} # ac_fn_c_check_header_mongrel
1860
1861# ac_fn_c_try_run LINENO
1862# ----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1864# that executables *can* be run.
1865ac_fn_c_try_run ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>&5
1876 ac_status=$?
1877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1879 { { case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_try") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; }; }; then :
1889 ac_retval=0
1890else
1891 $as_echo "$as_me: program exited with status $ac_status" >&5
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=$ac_status
1896fi
1897 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001899 as_fn_set_status $ac_retval
1900
1901} # ac_fn_c_try_run
1902
1903# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1904# -------------------------------------------------------
1905# Tests whether HEADER exists and can be compiled using the include files in
1906# INCLUDES, setting the cache variable VAR accordingly.
1907ac_fn_c_check_header_compile ()
1908{
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1911$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001912if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001913 $as_echo_n "(cached) " >&6
1914else
1915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916/* end confdefs.h. */
1917$4
1918#include <$2>
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 eval "$3=yes"
1922else
1923 eval "$3=no"
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932} # ac_fn_c_check_header_compile
1933
Matthias Kloseb9621712010-04-24 17:59:49 +00001934# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1935# -------------------------------------------
1936# Tests whether TYPE exists after having included INCLUDES, setting cache
1937# variable VAR accordingly.
1938ac_fn_c_check_type ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001943if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950int
1951main ()
1952{
1953if (sizeof ($2))
1954 return 0;
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$4
1963int
1964main ()
1965{
1966if (sizeof (($2)))
1967 return 0;
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973
1974else
1975 eval "$3=yes"
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986} # ac_fn_c_check_type
1987
Matthias Kloseb9621712010-04-24 17:59:49 +00001988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002005test_array [0] = 0;
2006return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013 ac_lo=0 ac_mid=0
2014 while :; do
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002022test_array [0] = 0;
2023return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_hi=-1 ac_mid=-1
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=$ac_mid; break
2075else
2076 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2077 if test $ac_mid -le $ac_hi; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 ac_lo= ac_hi=
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091# Binary search between lo and hi bounds.
2092while test "x$ac_lo" != "x$ac_hi"; do
2093 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002166 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002179if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235
2236} # ac_fn_c_check_func
2237
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002238# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2239# ---------------------------------------------
2240# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2241# accordingly.
2242ac_fn_c_check_decl ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 as_decl_name=`echo $2|sed 's/ *(.*//'`
2246 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2248$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2249if eval \${$3+:} false; then :
2250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255int
2256main ()
2257{
2258#ifndef $as_decl_name
2259#ifdef __cplusplus
2260 (void) $as_decl_use;
2261#else
2262 (void) $as_decl_name;
2263#endif
2264#endif
2265
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_compile "$LINENO"; then :
2271 eval "$3=yes"
2272else
2273 eval "$3=no"
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277eval ac_res=\$$3
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2279$as_echo "$ac_res" >&6; }
2280 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281
2282} # ac_fn_c_check_decl
2283
Matthias Kloseb9621712010-04-24 17:59:49 +00002284# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2285# ----------------------------------------------------
2286# Tries to find if the field MEMBER exists in type AGGR, after including
2287# INCLUDES, setting cache variable VAR accordingly.
2288ac_fn_c_check_member ()
2289{
2290 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2292$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002293if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 $as_echo_n "(cached) " >&6
2295else
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$5
2299int
2300main ()
2301{
2302static $2 ac_aggr;
2303if (ac_aggr.$3)
2304return 0;
2305 ;
2306 return 0;
2307}
2308_ACEOF
2309if ac_fn_c_try_compile "$LINENO"; then :
2310 eval "$4=yes"
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (sizeof ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 eval "$4=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$4
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Ned Deily4829bc62016-09-12 17:29:04 -04002344It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002345generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002381 $as_echo "PATH: $as_dir"
2382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Kloseb9621712010-04-24 17:59:49 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Kloseb9621712010-04-24 17:59:49 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Kloseb9621712010-04-24 17:59:49 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002603See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002694if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002695 # If we're building out-of-tree, we need to make sure the following
2696 # resources get picked up before their $srcdir counterparts.
2697 # Objects/ -> typeslots.inc
2698 # Include/ -> Python-ast.h, graminit.h
2699 # Python/ -> importlib.h
2700 # (A side effect of this is that these resources will automatically be
2701 # regenerated when building out-of-tree, regardless of whether or not
2702 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2703 # off.)
2704 BASECPPFLAGS="-IObjects -IInclude -IPython"
2705else
2706 BASECPPFLAGS=""
2707fi
2708
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709
2710
2711
2712
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713if test -e $srcdir/.git/HEAD
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715# Extract the first word of "git", so it can be a program name with args.
2716set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 $as_echo_n "(cached) " >&6
2721else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002722 if test -n "$HAS_GIT"; then
2723 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724else
2725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2726for as_dir in $PATH
2727do
2728 IFS=$as_save_IFS
2729 test -z "$as_dir" && as_dir=.
2730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2734 break 2
2735 fi
2736done
2737 done
2738IFS=$as_save_IFS
2739
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741fi
2742fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002743HAS_GIT=$ac_cv_prog_HAS_GIT
2744if test -n "$HAS_GIT"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2746$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749$as_echo "no" >&6; }
2750fi
2751
2752
2753else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757then
Ned Deily554626a2017-03-20 23:41:52 -04002758 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2759 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 GITVERSION=""
2763 GITTAG=""
2764 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765fi
2766
2767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
2770
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002771ac_aux_dir=
2772for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2773 if 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/install.sh"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/install.sh -c"
2780 break
2781 elif test -f "$ac_dir/shtool"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/shtool install -c"
2784 break
2785 fi
2786done
2787if test -z "$ac_aux_dir"; then
2788 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2789fi
2790
2791# These three variables are undocumented and unsupported,
2792# and are intended to be withdrawn in a future Autoconf release.
2793# They can cause serious problems if a builder's source tree is in a directory
2794# whose full name contains unusual characters.
2795ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2796ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2797ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2798
2799
2800# Make sure we can run config.sub.
2801$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2802 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2803
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2805$as_echo_n "checking build system type... " >&6; }
2806if ${ac_cv_build+:} false; then :
2807 $as_echo_n "(cached) " >&6
2808else
2809 ac_build_alias=$build_alias
2810test "x$ac_build_alias" = x &&
2811 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2812test "x$ac_build_alias" = x &&
2813 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2814ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2815 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2816
2817fi
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2819$as_echo "$ac_cv_build" >&6; }
2820case $ac_cv_build in
2821*-*-*) ;;
2822*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2823esac
2824build=$ac_cv_build
2825ac_save_IFS=$IFS; IFS='-'
2826set x $ac_cv_build
2827shift
2828build_cpu=$1
2829build_vendor=$2
2830shift; shift
2831# Remember, the first character of IFS is used to create $*,
2832# except with old shells:
2833build_os=$*
2834IFS=$ac_save_IFS
2835case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2836
2837
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2839$as_echo_n "checking host system type... " >&6; }
2840if ${ac_cv_host+:} false; then :
2841 $as_echo_n "(cached) " >&6
2842else
2843 if test "x$host_alias" = x; then
2844 ac_cv_host=$ac_cv_build
2845else
2846 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2847 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2848fi
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2852$as_echo "$ac_cv_host" >&6; }
2853case $ac_cv_host in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2856esac
2857host=$ac_cv_host
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_host
2860shift
2861host_cpu=$1
2862host_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866host_os=$*
2867IFS=$ac_save_IFS
2868case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2869
2870
2871
doko@python.orga10e4a92013-01-25 18:45:12 +01002872
2873
Ned Deilyfcbc2462014-08-22 13:32:49 -07002874# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2875rm -f pybuilddir.txt
2876
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002877for ac_prog in python$PACKAGE_VERSION python3 python
2878do
2879 # Extract the first word of "$ac_prog", so it can be a program name with args.
2880set dummy $ac_prog; ac_word=$2
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
2883if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2884 $as_echo_n "(cached) " >&6
2885else
2886 if test -n "$PYTHON_FOR_GEN"; then
2887 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2888else
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
2894 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2896 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2898 break 2
2899 fi
2900done
2901 done
2902IFS=$as_save_IFS
2903
2904fi
2905fi
2906PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2907if test -n "$PYTHON_FOR_GEN"; then
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2909$as_echo "$PYTHON_FOR_GEN" >&6; }
2910else
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
2913fi
2914
2915
2916 test -n "$PYTHON_FOR_GEN" && break
2917done
2918test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2919
2920if test "$PYTHON_FOR_GEN" = not-found; then
2921 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2922 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2923 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2924fi
2925
2926
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002927if test "$cross_compiling" = yes; then
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2929$as_echo_n "checking for python interpreter for cross build... " >&6; }
2930 if test -z "$PYTHON_FOR_BUILD"; then
2931 for interp in python$PACKAGE_VERSION python3 python; do
2932 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002933 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 +02002934 break
2935 fi
2936 interp=
2937 done
2938 if test x$interp = x; then
2939 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2940 fi
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2942$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002943 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 +02002944 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002945 # Used to comment out stuff for rebuilding generated files
2946 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002947elif test "$cross_compiling" = maybe; then
2948 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002949else
2950 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002951 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Martin Pantereac67be2016-07-28 01:28:27 +00002956
Benjamin Petersond23f8222009-04-05 19:13:16 +00002957if test "$prefix" != "/"; then
2958 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2959fi
2960
2961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002964# We don't use PACKAGE_ variables, and they cause conflicts
2965# with other autoconf-based packages that include Python.h
2966grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2967rm confdefs.h
2968mv confdefs.h.new confdefs.h
2969
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002970
Ned Deily4829bc62016-09-12 17:29:04 -04002971VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002972
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002973# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974
2975SOVERSION=1.0
2976
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977# The later defininition of _XOPEN_SOURCE disables certain features
2978# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
2982
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988
2989
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995
2996
Martin v. Löwisd6320502004-08-12 13:45:08 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003001
3002
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
3009
3010
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003011define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003013# Arguments passed to configure.
3014
3015CONFIG_ARGS="$ac_configure_args"
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3018$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003020if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 case $enableval in
3023 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 # Locate the best usable SDK, see Mac/README.txt for more
3025 # information
3026 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003027 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003029 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3030 if test ! -d "${enableval}"
3031 then
3032 enableval=/
3033 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
3037 case $enableval in
3038 no)
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041 ;;
3042 *)
3043 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 if test ! -d "${UNIVERSALSDK}"
3045 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003046 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003050
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052else
3053
3054 UNIVERSALSDK=
3055 enable_universalsdk=
3056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059if test -n "${UNIVERSALSDK}"
3060then
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3062$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063else
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003069
Ned Deily87adb6e2013-10-18 21:09:56 -07003070ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003071
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072# For backward compatibility reasons we prefer to select '32-bit' if available,
3073# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003075if test "`uname -s`" = "Darwin"
3076then
3077 if test -n "${UNIVERSALSDK}"
3078 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003079 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003080 then
3081 UNIVERSAL_ARCHS="intel"
3082 fi
3083 fi
3084fi
3085
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3088$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089
3090# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093 UNIVERSAL_ARCHS="$withval"
3094
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095fi
3096
Ned Deily87adb6e2013-10-18 21:09:56 -07003097if test -n "${UNIVERSALSDK}"
3098then
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3100$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3101else
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3103$as_echo "no" >&6; }
3104fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106
3107# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003109 withval=$with_framework_name;
3110 PYTHONFRAMEWORK=${withval}
3111 PYTHONFRAMEWORKDIR=${withval}.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3113
3114else
3115
3116 PYTHONFRAMEWORK=Python
3117 PYTHONFRAMEWORKDIR=Python.framework
3118 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3119
3120fi
3121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003125 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003126 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003127 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 esac
3129 case $enableval in
3130 no)
3131 PYTHONFRAMEWORK=
3132 PYTHONFRAMEWORKDIR=no-framework
3133 PYTHONFRAMEWORKPREFIX=
3134 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST=
3136 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 FRAMEWORKALTINSTALLFIRST=
3138 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003139 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE"; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003146 ;;
3147 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003149 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003151 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003152 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3153 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003154 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 if test "x${prefix}" = "xNONE" ; then
3158 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 else
3161 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3162 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163
3164 case "${enableval}" in
3165 /System*)
3166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3167 if test "${prefix}" = "NONE" ; then
3168 # See below
3169 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3170 fi
3171 ;;
3172
3173 /Library*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176
3177 */Library/Frameworks)
3178 MDIR="`dirname "${enableval}"`"
3179 MDIR="`dirname "${MDIR}"`"
3180 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3181
3182 if test "${prefix}" = "NONE"; then
3183 # User hasn't specified the
3184 # --prefix option, but wants to install
3185 # the framework in a non-default location,
3186 # ensure that the compatibility links get
3187 # installed relative to that prefix as well
3188 # instead of in /usr/local.
3189 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3190 fi
3191 ;;
3192
3193 *)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 ;;
3196 esac
3197
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003206 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3207
3208 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3209
Jack Jansene578a632001-08-15 01:27:14 +00003210 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Guido van Rossum563e7081996-09-10 18:20:48 +00003212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003215 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORKPREFIX=
3217 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST=
3219 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 FRAMEWORKALTINSTALLFIRST=
3221 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223 if test "x${prefix}" = "xNONE" ; then
3224 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3225 else
3226 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3227 fi
Jack Jansene578a632001-08-15 01:27:14 +00003228 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231fi
3232
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
3234
Michael W. Hudson54241132001-12-07 15:38:26 +00003235
3236
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240
3241
3242
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003243
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003244
Ned Deilyb8f944f2013-11-21 22:42:25 -08003245
Jack Jansene578a632001-08-15 01:27:14 +00003246##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003247## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003248## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003249##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250# Set name for machine-dependent library files
3251
Matthias Kloseb9621712010-04-24 17:59:49 +00003252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3253$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254if test -z "$MACHDEP"
3255then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 # avoid using uname for cross builds
3257 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003258 # ac_sys_system and ac_sys_release are used for setting
3259 # a lot of different things including 'define_xopen_source'
3260 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003262 *-*-linux-android*)
3263 ac_sys_system=Linux-android
3264 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 *-*-linux*)
3266 ac_sys_system=Linux
3267 ;;
3268 *-*-cygwin*)
3269 ac_sys_system=Cygwin
3270 ;;
3271 *)
3272 # for now, limit cross builds to known configurations
3273 MACHDEP="unknown"
3274 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3275 esac
3276 ac_sys_release=
3277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003279 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003280 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003281 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003283 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 fi
3286 ac_md_system=`echo $ac_sys_system |
3287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3288 ac_md_release=`echo $ac_sys_release |
3289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003291
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003293 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003295 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003296 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003297 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003299fi
Guido van Rossum91922671997-10-09 20:24:13 +00003300
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003301
3302if test "$cross_compiling" = yes; then
3303 case "$host" in
3304 *-*-linux*)
3305 case "$host_cpu" in
3306 arm*)
3307 _host_cpu=arm
3308 ;;
3309 *)
3310 _host_cpu=$host_cpu
3311 esac
3312 ;;
3313 *-*-cygwin*)
3314 _host_cpu=
3315 ;;
3316 *)
3317 # for now, limit cross builds to known configurations
3318 MACHDEP="unknown"
3319 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3320 esac
3321 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3322fi
3323
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003324# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3325# disable features if it is defined, without any means to access these
3326# features as extensions. For these systems, we skip the definition of
3327# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3328# some feature, make sure there is no alternative way to access this
3329# feature. Also, when using wildcards, make sure you have verified the
3330# need for not defining _XOPEN_SOURCE on all systems matching the
3331# wildcard, and that the wildcard does not include future systems
3332# (which may remove their limitations).
3333case $ac_sys_system/$ac_sys_release in
3334 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3335 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003336 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003337 # In addition, Stefan Krah confirms that issue #1244610 exists through
3338 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003340 define_xopen_source=no
3341 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3342 # also defined. This can be overridden by defining _BSD_SOURCE
3343 # As this has a different meaning on Linux, only define it on OpenBSD
3344
Matthias Kloseb9621712010-04-24 17:59:49 +00003345$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346
3347 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003348 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003349 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3350 # also defined. This can be overridden by defining _BSD_SOURCE
3351 # As this has a different meaning on Linux, only define it on OpenBSD
3352
Matthias Kloseb9621712010-04-24 17:59:49 +00003353$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003354
3355 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003356 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3357 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3358 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003359 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 +00003360 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003361 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3362 # request to enable features supported by the standard as a request
3363 # to disable features not supported by the standard. The best way
3364 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3365 # entirely and define __EXTENSIONS__ instead.
3366 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003367 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3369 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003370 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003371 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 define_xopen_source=no;;
3373 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003375 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003376 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003377 # On FreeBSD 4, the math functions C89 does not cover are never defined
3378 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3379 FreeBSD/4.*)
3380 define_xopen_source=no;;
3381 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3382 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3383 # identifies itself as Darwin/7.*
3384 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3385 # disables platform specific features beyond repair.
3386 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3387 # has no effect, don't bother defining them
3388 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003389 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003390 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3393 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3394 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003395 AIX/4)
3396 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003397 AIX/5)
3398 if test `uname -r` -eq 1; then
3399 define_xopen_source=no
3400 fi
3401 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003402 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3403 # defining NI_NUMERICHOST.
3404 QNX/6.3.2)
3405 define_xopen_source=no
3406 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003407
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408esac
3409
3410if test $define_xopen_source = yes
3411then
Victor Stinner14d098d2011-09-07 22:29:43 +02003412 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Victor Stinner14d098d2011-09-07 22:29:43 +02003414$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003415
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
3417 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3418 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3419 # several APIs are not declared. Since this is also needed in some
3420 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
Matthias Kloseb9621712010-04-24 17:59:49 +00003422$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003423
3424
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003425
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003426$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428fi
3429
Christian Heimes647cd872013-12-07 23:39:33 +01003430# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3431case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003432 hp*|HP*)
3433 define_stdc_a1=yes;;
3434 *)
3435 define_stdc_a1=no;;
3436esac
3437
3438if test $define_stdc_a1 = yes
3439then
Christian Heimes647cd872013-12-07 23:39:33 +01003440
3441$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3442
Christian Heimesb02bcae2013-12-08 15:21:08 +01003443fi
Christian Heimes647cd872013-12-07 23:39:33 +01003444
Guido van Rossum91922671997-10-09 20:24:13 +00003445#
3446# SGI compilers allow the specification of the both the ABI and the
3447# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003448# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003449#
3450# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3451# thus supply support for various ABI/ISA combinations. The MACHDEP
3452# variable is also adjusted.
3453#
3454
3455if test ! -z "$SGI_ABI"
3456then
3457 CC="cc $SGI_ABI"
3458 LDFLAGS="$SGI_ABI $LDFLAGS"
3459 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3462$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003463
Jack Jansen6b08a402004-06-03 12:41:45 +00003464# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3465# it may influence the way we can build extensions, so distutils
3466# needs to check it
3467
Thomas Wouters477c8d52006-05-27 19:21:47 +00003468
Jack Jansen6b08a402004-06-03 12:41:45 +00003469CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003470EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003471
Guido van Rossum627b2d71993-12-24 10:39:16 +00003472# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003473
3474# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3475# for debug/optimization stuff. BASECFLAGS is for flags that are required
3476# just to get things to compile and link. Users are free to override OPT
3477# when running configure or make. The build should not break if they do.
3478# BASECFLAGS should generally not be messed with, however.
3479
3480# XXX shouldn't some/most/all of this code be merged with the stuff later
3481# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3483$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003486if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003487 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003488 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003489 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003490 without_gcc=yes;;
3491 yes) CC=gcc
3492 without_gcc=no;;
3493 *) CC=$withval
3494 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003495 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003496else
Martin v. Löwis11437992002-04-12 09:54:03 +00003497
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003498 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003499 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003500 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003501 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003502 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503fi
3504
Matthias Kloseb9621712010-04-24 17:59:49 +00003505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3506$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003507
Zachary Ware5af85642015-12-21 12:09:17 -06003508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3509$as_echo_n "checking for --with-icc... " >&6; }
3510
3511# Check whether --with-icc was given.
3512if test "${with_icc+set}" = set; then :
3513 withval=$with_icc;
3514 case $withval in
3515 no) CC=${CC:-cc}
3516 with_icc=no;;
3517 yes) CC=icc
3518 CXX=icpc
3519 with_icc=yes;;
3520 *) CC=$withval
3521 with_icc=$withval;;
3522 esac
3523else
3524
3525 with_icc=no
3526fi
3527
3528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3529$as_echo "$with_icc" >&6; }
3530
Guido van Rossum8b131c51995-03-09 14:10:13 +00003531# If the user switches compilers, we can't believe the cache
3532if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3533then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003534 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003535(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003536fi
3537
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003538# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3539# when the compiler supports them, but we don't always want -O2, and
3540# we set -g later.
3541if test -z "$CFLAGS"; then
3542 CFLAGS=
3543fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003544
3545if test "$ac_sys_system" = "Darwin"
3546then
3547 # Compiler selection on MacOSX is more complicated than
3548 # AC_PROG_CC can handle, see Mac/README.txt for more
3549 # information
3550 if test -z "${CC}"
3551 then
3552 found_gcc=
3553 found_clang=
3554 as_save_IFS=$IFS; IFS=:
3555 for as_dir in $PATH
3556 do
3557 IFS=$as_save_IFS
3558 if test -x $as_dir/gcc; then
3559 if test -z "${found_gcc}"; then
3560 found_gcc=$as_dir/gcc
3561 fi
3562 fi
3563 if test -x $as_dir/clang; then
3564 if test -z "${found_clang}"; then
3565 found_clang=$as_dir/clang
3566 fi
3567 fi
3568 done
3569 IFS=$as_save_IFS
3570
3571 if test -n "$found_gcc" -a -n "$found_clang"
3572 then
3573 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3574 then
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3576$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3577 CC="$found_clang"
3578 CXX="$found_clang++"
3579 fi
3580
3581
3582 elif test -z "$found_gcc" -a -n "$found_clang"
3583 then
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3585$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3586 CC="$found_clang"
3587 CXX="$found_clang++"
3588
3589 elif test -z "$found_gcc" -a -z "$found_clang"
3590 then
3591 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3592 if test -n "${found_clang}"
3593 then
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3595$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3596 CC="${found_clang}"
3597 CXX="`/usr/bin/xcrun -find clang++`"
3598
3599 # else: use default behaviour
3600 fi
3601 fi
3602 fi
3603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003604ac_ext=c
3605ac_cpp='$CPP $CPPFLAGS'
3606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3608ac_compiler_gnu=$ac_cv_c_compiler_gnu
3609if test -n "$ac_tool_prefix"; then
3610 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3611set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003614if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003616else
3617 if test -n "$CC"; then
3618 ac_cv_prog_CC="$CC" # Let the user override the test.
3619else
Martin v. Löwis11437992002-04-12 09:54:03 +00003620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621for as_dir in $PATH
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $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 +00003629 break 2
3630 fi
3631done
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003634
Jack Jansendd19cf82001-12-06 22:36:17 +00003635fi
3636fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003637CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003638if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3640$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003641else
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003644fi
3645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648if test -z "$ac_cv_prog_CC"; then
3649 ac_ct_CC=$CC
3650 # Extract the first word of "gcc", so it can be a program name with args.
3651set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3653$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003654if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003656else
3657 if test -n "$ac_ct_CC"; then
3658 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3659else
3660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661for as_dir in $PATH
3662do
3663 IFS=$as_save_IFS
3664 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 $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 +00003669 break 2
3670 fi
3671done
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003674
3675fi
3676fi
3677ac_ct_CC=$ac_cv_prog_ac_ct_CC
3678if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3680$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003681else
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3683$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003684fi
3685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686 if test "x$ac_ct_CC" = x; then
3687 CC=""
3688 else
3689 case $cross_compiling:$ac_tool_warned in
3690yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693ac_tool_warned=yes ;;
3694esac
3695 CC=$ac_ct_CC
3696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003697else
3698 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003699fi
3700
Jack Jansendd19cf82001-12-06 22:36:17 +00003701if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 if test -n "$ac_tool_prefix"; then
3703 # 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 +00003704set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003707if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003709else
3710 if test -n "$CC"; then
3711 ac_cv_prog_CC="$CC" # Let the user override the test.
3712else
Martin v. Löwis11437992002-04-12 09:54:03 +00003713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3714for as_dir in $PATH
3715do
3716 IFS=$as_save_IFS
3717 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $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 +00003722 break 2
3723 fi
3724done
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003727
3728fi
3729fi
3730CC=$ac_cv_prog_CC
3731if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3733$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003734else
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3736$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
3738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003741fi
3742if test -z "$CC"; then
3743 # Extract the first word of "cc", so it can be a program name with args.
3744set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003747if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003749else
3750 if test -n "$CC"; then
3751 ac_cv_prog_CC="$CC" # Let the user override the test.
3752else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3755for as_dir in $PATH
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3762 ac_prog_rejected=yes
3763 continue
3764 fi
3765 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 $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 +00003767 break 2
3768 fi
3769done
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003772
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773if test $ac_prog_rejected = yes; then
3774 # We found a bogon in the path, so make sure we never use it.
3775 set dummy $ac_cv_prog_CC
3776 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003778 # We chose a different compiler from the bogus one.
3779 # However, it has the same basename, so the bogon will be chosen
3780 # first if we set CC to just the basename; use the full file name.
3781 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003782 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003783 fi
3784fi
3785fi
3786fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003787CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3790$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791else
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3793$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794fi
3795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
3798if test -z "$CC"; then
3799 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 do
3802 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3805$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003806if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003808else
3809 if test -n "$CC"; then
3810 ac_cv_prog_CC="$CC" # Let the user override the test.
3811else
Martin v. Löwis11437992002-04-12 09:54:03 +00003812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3813for as_dir in $PATH
3814do
3815 IFS=$as_save_IFS
3816 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003818 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003819 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $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 +00003821 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003822 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003823done
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003826
3827fi
3828fi
3829CC=$ac_cv_prog_CC
3830if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3832$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003833else
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3835$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003836fi
3837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 test -n "$CC" && break
3840 done
3841fi
3842if test -z "$CC"; then
3843 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003845do
3846 # Extract the first word of "$ac_prog", so it can be a program name with args.
3847set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3849$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003850if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003852else
3853 if test -n "$ac_ct_CC"; then
3854 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3855else
3856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3857for as_dir in $PATH
3858do
3859 IFS=$as_save_IFS
3860 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $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 +00003865 break 2
3866 fi
3867done
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
3872fi
3873ac_ct_CC=$ac_cv_prog_ac_ct_CC
3874if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3876$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003877else
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3879$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882
Martin v. Löwis11437992002-04-12 09:54:03 +00003883 test -n "$ac_ct_CC" && break
3884done
Michael W. Hudson54241132001-12-07 15:38:26 +00003885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886 if test "x$ac_ct_CC" = x; then
3887 CC=""
3888 else
3889 case $cross_compiling:$ac_tool_warned in
3890yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893ac_tool_warned=yes ;;
3894esac
3895 CC=$ac_ct_CC
3896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003897fi
3898
3899fi
3900
3901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003904as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003905See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003906
3907# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003908$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3909set X $ac_compile
3910ac_compiler=$2
3911for ac_option in --version -v -V -qversion; do
3912 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913case "(($ac_try" in
3914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3915 *) ac_try_echo=$ac_try;;
3916esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3918$as_echo "$ac_try_echo"; } >&5
3919 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 if test -s conftest.err; then
3922 sed '10a\
3923... rest of stderr output deleted ...
3924 10q' conftest.err >conftest.er1
3925 cat conftest.er1 >&5
3926 fi
3927 rm -f conftest.er1 conftest.err
3928 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3929 test $ac_status = 0; }
3930done
Martin v. Löwis11437992002-04-12 09:54:03 +00003931
Matthias Kloseb9621712010-04-24 17:59:49 +00003932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003933/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003934
Martin v. Löwis11437992002-04-12 09:54:03 +00003935int
3936main ()
3937{
3938
3939 ;
3940 return 0;
3941}
3942_ACEOF
3943ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003944ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003945# Try to create an executable without -o first, disregard a.out.
3946# It will help us diagnose broken compilers, and finding out an intuition
3947# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3949$as_echo_n "checking whether the C compiler works... " >&6; }
3950ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3951
3952# The possible output files:
3953ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955ac_rmfiles=
3956for ac_file in $ac_files
3957do
3958 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3961 esac
3962done
3963rm -f $ac_rmfiles
3964
Matthias Kloseb9621712010-04-24 17:59:49 +00003965if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966case "(($ac_try" in
3967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3968 *) ac_try_echo=$ac_try;;
3969esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3971$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3975 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3977# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3978# in a Makefile. We should not override ac_cv_exeext if it was cached,
3979# so that the user can short-circuit this test for compilers unknown to
3980# Autoconf.
3981for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003982do
3983 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003985 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986 ;;
3987 [ab].out )
3988 # We found the default executable, but exeext='' is most
3989 # certainly right.
3990 break;;
3991 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003992 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993 then :; else
3994 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3995 fi
3996 # We set ac_cv_exeext here because the later test for it is not
3997 # safe: cross compilers may not add the suffix if given an `-o'
3998 # argument, so we may need to know it at that point already.
3999 # Even if this section looks crufty: it has the advantage of
4000 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001 break;;
4002 * )
4003 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004004 esac
4005done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006test "$ac_cv_exeext" = no && ac_cv_exeext=
4007
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004008else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009 ac_file=''
4010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004011if test -z "$ac_file"; then :
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4013$as_echo "no" >&6; }
4014$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004015sed 's/^/| /' conftest.$ac_ext >&5
4016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004019as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004020See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004021else
4022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4023$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4026$as_echo_n "checking for C compiler default output file name... " >&6; }
4027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4028$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004030
Matthias Kloseb9621712010-04-24 17:59:49 +00004031rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4034$as_echo_n "checking for suffix of executables... " >&6; }
4035if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036case "(($ac_try" in
4037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4038 *) ac_try_echo=$ac_try;;
4039esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004040eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4041$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004043 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4045 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004046 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4047# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4048# work properly (i.e., refer to `conftest.exe'), while it won't with
4049# `rm'.
4050for ac_file in conftest.exe conftest conftest.*; do
4051 test -f "$ac_file" || continue
4052 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4055 break;;
4056 * ) break;;
4057 esac
4058done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059else
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004062as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004063See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004065rm -f conftest conftest$ac_cv_exeext
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4067$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004068
4069rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004070EXEEXT=$ac_cv_exeext
4071ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4073/* end confdefs.h. */
4074#include <stdio.h>
4075int
4076main ()
4077{
4078FILE *f = fopen ("conftest.out", "w");
4079 return ferror (f) || fclose (f) != 0;
4080
4081 ;
4082 return 0;
4083}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004085ac_clean_files="$ac_clean_files conftest.out"
4086# Check that the compiler produces executables we can run. If not, either
4087# the compiler is broken, or we cross compile.
4088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4089$as_echo_n "checking whether we are cross compiling... " >&6; }
4090if test "$cross_compiling" != yes; then
4091 { { ac_try="$ac_link"
4092case "(($ac_try" in
4093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4094 *) ac_try_echo=$ac_try;;
4095esac
4096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4097$as_echo "$ac_try_echo"; } >&5
4098 (eval "$ac_link") 2>&5
4099 ac_status=$?
4100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4101 test $ac_status = 0; }
4102 if { ac_try='./conftest$ac_cv_exeext'
4103 { { case "(($ac_try" in
4104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4105 *) ac_try_echo=$ac_try;;
4106esac
4107eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4108$as_echo "$ac_try_echo"; } >&5
4109 (eval "$ac_try") 2>&5
4110 ac_status=$?
4111 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4112 test $ac_status = 0; }; }; then
4113 cross_compiling=no
4114 else
4115 if test "$cross_compiling" = maybe; then
4116 cross_compiling=yes
4117 else
4118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004120as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004121If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004122See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 fi
4124 fi
4125fi
4126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4127$as_echo "$cross_compiling" >&6; }
4128
4129rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4130ac_clean_files=$ac_clean_files_save
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4132$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004133if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 $as_echo_n "(cached) " >&6
4135else
4136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004137/* end confdefs.h. */
4138
4139int
4140main ()
4141{
4142
4143 ;
4144 return 0;
4145}
4146_ACEOF
4147rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004148if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149case "(($ac_try" in
4150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4151 *) ac_try_echo=$ac_try;;
4152esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4154$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004156 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4158 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159 for ac_file in conftest.o conftest.obj conftest.*; do
4160 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004161 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4164 break;;
4165 esac
4166done
4167else
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004169sed 's/^/| /' conftest.$ac_ext >&5
4170
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004173as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004174See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004175fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004176rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4179$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004180OBJEXT=$ac_cv_objext
4181ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4183$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004184if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004186else
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004189
Martin v. Löwis11437992002-04-12 09:54:03 +00004190int
4191main ()
4192{
4193#ifndef __GNUC__
4194 choke me
4195#endif
4196
4197 ;
4198 return 0;
4199}
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 ac_compiler_gnu=yes
4203else
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004207ac_cv_c_compiler_gnu=$ac_compiler_gnu
4208
4209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4211$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4212if test $ac_compiler_gnu = yes; then
4213 GCC=yes
4214else
4215 GCC=
4216fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004217ac_test_CFLAGS=${CFLAGS+set}
4218ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4220$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004221if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004223else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 ac_save_c_werror_flag=$ac_c_werror_flag
4225 ac_c_werror_flag=yes
4226 ac_cv_prog_cc_g=no
4227 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004230
Martin v. Löwis11437992002-04-12 09:54:03 +00004231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004239if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004240 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241else
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 CFLAGS=""
4243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244/* end confdefs.h. */
4245
4246int
4247main ()
4248{
4249
4250 ;
4251 return 0;
4252}
4253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004254if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255
Matthias Kloseb9621712010-04-24 17:59:49 +00004256else
4257 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260/* end confdefs.h. */
4261
4262int
4263main ()
4264{
4265
4266 ;
4267 return 0;
4268}
4269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004270if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4278 ac_c_werror_flag=$ac_save_c_werror_flag
4279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4281$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004282if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004284elif test $ac_cv_prog_cc_g = yes; then
4285 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004286 CFLAGS="-g -O2"
4287 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004288 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004289 fi
4290else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004291 if test "$GCC" = yes; then
4292 CFLAGS="-O2"
4293 else
4294 CFLAGS=
4295 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4298$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004299if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004301else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004303ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004305/* end confdefs.h. */
4306#include <stdarg.h>
4307#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004308struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004309/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4310struct buf { int x; };
4311FILE * (*rcsopen) (struct buf *, struct stat *, int);
4312static char *e (p, i)
4313 char **p;
4314 int i;
4315{
4316 return p[i];
4317}
4318static char *f (char * (*g) (char **, int), char **p, ...)
4319{
4320 char *s;
4321 va_list v;
4322 va_start (v,p);
4323 s = g (p, va_arg (v,int));
4324 va_end (v);
4325 return s;
4326}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004327
4328/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4329 function prototypes and stuff, but not '\xHH' hex character constants.
4330 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004332 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4333 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004335int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4338 inside strings and character constants. */
4339#define FOO(x) 'x'
4340int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4341
Skip Montanaro6dead952003-09-25 14:50:04 +00004342int test (int i, double x);
4343struct s1 {int (*f) (int a);};
4344struct s2 {int (*f) (double a);};
4345int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4346int argc;
4347char **argv;
4348int
4349main ()
4350{
4351return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4352 ;
4353 return 0;
4354}
4355_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4357 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004358do
4359 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363rm -f core conftest.err conftest.$ac_objext
4364 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004365done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004367CC=$ac_save_CC
4368
4369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370# AC_CACHE_VAL
4371case "x$ac_cv_prog_cc_c89" in
4372 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4374$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4377$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004378 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4381$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004382esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004383if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004384
Matthias Kloseb9621712010-04-24 17:59:49 +00004385fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004386
Martin v. Löwis11437992002-04-12 09:54:03 +00004387ac_ext=c
4388ac_cpp='$CPP $CPPFLAGS'
4389ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4390ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4391ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004392
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
4398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4399$as_echo_n "checking how to run the C preprocessor... " >&6; }
4400# On Suns, sometimes $CPP names a directory.
4401if test -n "$CPP" && test -d "$CPP"; then
4402 CPP=
4403fi
4404if test -z "$CPP"; then
4405 if ${ac_cv_prog_CPP+:} false; then :
4406 $as_echo_n "(cached) " >&6
4407else
4408 # Double quotes because CPP needs to be expanded
4409 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4410 do
4411 ac_preproc_ok=false
4412for ac_c_preproc_warn_flag in '' yes
4413do
4414 # Use a header file that comes with gcc, so configuring glibc
4415 # with a fresh cross-compiler works.
4416 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4417 # <limits.h> exists even on freestanding compilers.
4418 # On the NeXT, cc -E runs the code through the compiler's parser,
4419 # not just through cpp. "Syntax error" is here to catch this case.
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421/* end confdefs.h. */
4422#ifdef __STDC__
4423# include <limits.h>
4424#else
4425# include <assert.h>
4426#endif
4427 Syntax error
4428_ACEOF
4429if ac_fn_c_try_cpp "$LINENO"; then :
4430
4431else
4432 # Broken: fails on valid input.
4433continue
4434fi
4435rm -f conftest.err conftest.i conftest.$ac_ext
4436
4437 # OK, works on sane cases. Now check whether nonexistent headers
4438 # can be detected and how.
4439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4440/* end confdefs.h. */
4441#include <ac_nonexistent.h>
4442_ACEOF
4443if ac_fn_c_try_cpp "$LINENO"; then :
4444 # Broken: success on invalid input.
4445continue
4446else
4447 # Passes both tests.
4448ac_preproc_ok=:
4449break
4450fi
4451rm -f conftest.err conftest.i conftest.$ac_ext
4452
4453done
4454# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4455rm -f conftest.i conftest.err conftest.$ac_ext
4456if $ac_preproc_ok; then :
4457 break
4458fi
4459
4460 done
4461 ac_cv_prog_CPP=$CPP
4462
4463fi
4464 CPP=$ac_cv_prog_CPP
4465else
4466 ac_cv_prog_CPP=$CPP
4467fi
4468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4469$as_echo "$CPP" >&6; }
4470ac_preproc_ok=false
4471for ac_c_preproc_warn_flag in '' yes
4472do
4473 # Use a header file that comes with gcc, so configuring glibc
4474 # with a fresh cross-compiler works.
4475 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4476 # <limits.h> exists even on freestanding compilers.
4477 # On the NeXT, cc -E runs the code through the compiler's parser,
4478 # not just through cpp. "Syntax error" is here to catch this case.
4479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4480/* end confdefs.h. */
4481#ifdef __STDC__
4482# include <limits.h>
4483#else
4484# include <assert.h>
4485#endif
4486 Syntax error
4487_ACEOF
4488if ac_fn_c_try_cpp "$LINENO"; then :
4489
4490else
4491 # Broken: fails on valid input.
4492continue
4493fi
4494rm -f conftest.err conftest.i conftest.$ac_ext
4495
4496 # OK, works on sane cases. Now check whether nonexistent headers
4497 # can be detected and how.
4498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4499/* end confdefs.h. */
4500#include <ac_nonexistent.h>
4501_ACEOF
4502if ac_fn_c_try_cpp "$LINENO"; then :
4503 # Broken: success on invalid input.
4504continue
4505else
4506 # Passes both tests.
4507ac_preproc_ok=:
4508break
4509fi
4510rm -f conftest.err conftest.i conftest.$ac_ext
4511
4512done
4513# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4514rm -f conftest.i conftest.err conftest.$ac_ext
4515if $ac_preproc_ok; then :
4516
4517else
4518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4520as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4521See \`config.log' for more details" "$LINENO" 5; }
4522fi
4523
4524ac_ext=c
4525ac_cpp='$CPP $CPPFLAGS'
4526ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4527ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4528ac_compiler_gnu=$ac_cv_c_compiler_gnu
4529
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4531$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4532if ${ac_cv_path_GREP+:} false; then :
4533 $as_echo_n "(cached) " >&6
4534else
4535 if test -z "$GREP"; then
4536 ac_path_GREP_found=false
4537 # Loop through the user's path and test for each of PROGNAME-LIST
4538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4539for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4540do
4541 IFS=$as_save_IFS
4542 test -z "$as_dir" && as_dir=.
4543 for ac_prog in grep ggrep; do
4544 for ac_exec_ext in '' $ac_executable_extensions; do
4545 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4546 as_fn_executable_p "$ac_path_GREP" || continue
4547# Check for GNU ac_path_GREP and select it if it is found.
4548 # Check for GNU $ac_path_GREP
4549case `"$ac_path_GREP" --version 2>&1` in
4550*GNU*)
4551 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4552*)
4553 ac_count=0
4554 $as_echo_n 0123456789 >"conftest.in"
4555 while :
4556 do
4557 cat "conftest.in" "conftest.in" >"conftest.tmp"
4558 mv "conftest.tmp" "conftest.in"
4559 cp "conftest.in" "conftest.nl"
4560 $as_echo 'GREP' >> "conftest.nl"
4561 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4562 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4563 as_fn_arith $ac_count + 1 && ac_count=$as_val
4564 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4565 # Best one so far, save it but keep looking for a better one
4566 ac_cv_path_GREP="$ac_path_GREP"
4567 ac_path_GREP_max=$ac_count
4568 fi
4569 # 10*(2^10) chars as input seems more than enough
4570 test $ac_count -gt 10 && break
4571 done
4572 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4573esac
4574
4575 $ac_path_GREP_found && break 3
4576 done
4577 done
4578 done
4579IFS=$as_save_IFS
4580 if test -z "$ac_cv_path_GREP"; then
4581 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4582 fi
4583else
4584 ac_cv_path_GREP=$GREP
4585fi
4586
4587fi
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4589$as_echo "$ac_cv_path_GREP" >&6; }
4590 GREP="$ac_cv_path_GREP"
4591
4592
Łukasz Langaa785c872016-09-09 17:37:37 -07004593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4594$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4595if ${ac_cv_path_SED+:} false; then :
4596 $as_echo_n "(cached) " >&6
4597else
4598 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4599 for ac_i in 1 2 3 4 5 6 7; do
4600 ac_script="$ac_script$as_nl$ac_script"
4601 done
4602 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4603 { ac_script=; unset ac_script;}
4604 if test -z "$SED"; then
4605 ac_path_SED_found=false
4606 # Loop through the user's path and test for each of PROGNAME-LIST
4607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4608for as_dir in $PATH
4609do
4610 IFS=$as_save_IFS
4611 test -z "$as_dir" && as_dir=.
4612 for ac_prog in sed gsed; do
4613 for ac_exec_ext in '' $ac_executable_extensions; do
4614 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4615 as_fn_executable_p "$ac_path_SED" || continue
4616# Check for GNU ac_path_SED and select it if it is found.
4617 # Check for GNU $ac_path_SED
4618case `"$ac_path_SED" --version 2>&1` in
4619*GNU*)
4620 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4621*)
4622 ac_count=0
4623 $as_echo_n 0123456789 >"conftest.in"
4624 while :
4625 do
4626 cat "conftest.in" "conftest.in" >"conftest.tmp"
4627 mv "conftest.tmp" "conftest.in"
4628 cp "conftest.in" "conftest.nl"
4629 $as_echo '' >> "conftest.nl"
4630 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4631 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4632 as_fn_arith $ac_count + 1 && ac_count=$as_val
4633 if test $ac_count -gt ${ac_path_SED_max-0}; then
4634 # Best one so far, save it but keep looking for a better one
4635 ac_cv_path_SED="$ac_path_SED"
4636 ac_path_SED_max=$ac_count
4637 fi
4638 # 10*(2^10) chars as input seems more than enough
4639 test $ac_count -gt 10 && break
4640 done
4641 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4642esac
4643
4644 $ac_path_SED_found && break 3
4645 done
4646 done
4647 done
4648IFS=$as_save_IFS
4649 if test -z "$ac_cv_path_SED"; then
4650 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4651 fi
4652else
4653 ac_cv_path_SED=$SED
4654fi
4655
4656fi
4657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4658$as_echo "$ac_cv_path_SED" >&6; }
4659 SED="$ac_cv_path_SED"
4660 rm -f conftest.sed
4661
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004662
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
4664
Matthias Kloseb9621712010-04-24 17:59:49 +00004665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4666$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004668# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004669if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004670 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004671
4672 case $withval in
4673 no) with_cxx_main=no
4674 MAINCC='$(CC)';;
4675 yes) with_cxx_main=yes
4676 MAINCC='$(CXX)';;
4677 *) with_cxx_main=yes
4678 MAINCC=$withval
4679 if test -z "$CXX"
4680 then
4681 CXX=$withval
4682 fi;;
4683 esac
4684else
4685
4686 with_cxx_main=no
4687 MAINCC='$(CC)'
4688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004689fi
4690
Matthias Kloseb9621712010-04-24 17:59:49 +00004691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4692$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004693
4694preset_cxx="$CXX"
4695if test -z "$CXX"
4696then
4697 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004698 gcc) if test -n "$ac_tool_prefix"; then
4699 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4700set dummy ${ac_tool_prefix}g++; ac_word=$2
4701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702$as_echo_n "checking for $ac_word... " >&6; }
4703if ${ac_cv_path_CXX+:} false; then :
4704 $as_echo_n "(cached) " >&6
4705else
4706 case $CXX in
4707 [\\/]* | ?:[\\/]*)
4708 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4709 ;;
4710 *)
4711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712for as_dir in notfound
4713do
4714 IFS=$as_save_IFS
4715 test -z "$as_dir" && as_dir=.
4716 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004718 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720 break 2
4721 fi
4722done
4723 done
4724IFS=$as_save_IFS
4725
4726 ;;
4727esac
4728fi
4729CXX=$ac_cv_path_CXX
4730if test -n "$CXX"; then
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4732$as_echo "$CXX" >&6; }
4733else
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
4736fi
4737
4738
4739fi
4740if test -z "$ac_cv_path_CXX"; then
4741 ac_pt_CXX=$CXX
4742 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4745$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004746if ${ac_cv_path_ac_pt_CXX+:} false; then :
4747 $as_echo_n "(cached) " >&6
4748else
4749 case $ac_pt_CXX in
4750 [\\/]* | ?:[\\/]*)
4751 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4752 ;;
4753 *)
4754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4755for as_dir in notfound
4756do
4757 IFS=$as_save_IFS
4758 test -z "$as_dir" && as_dir=.
4759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4763 break 2
4764 fi
4765done
4766 done
4767IFS=$as_save_IFS
4768
4769 ;;
4770esac
4771fi
4772ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4773if test -n "$ac_pt_CXX"; then
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4775$as_echo "$ac_pt_CXX" >&6; }
4776else
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778$as_echo "no" >&6; }
4779fi
4780
4781 if test "x$ac_pt_CXX" = x; then
4782 CXX="g++"
4783 else
4784 case $cross_compiling:$ac_tool_warned in
4785yes:)
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4788ac_tool_warned=yes ;;
4789esac
4790 CXX=$ac_pt_CXX
4791 fi
4792else
4793 CXX="$ac_cv_path_CXX"
4794fi
4795 ;;
4796 cc) if test -n "$ac_tool_prefix"; then
4797 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4798set dummy ${ac_tool_prefix}c++; ac_word=$2
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4800$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004801if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803else
4804 case $CXX in
4805 [\\/]* | ?:[\\/]*)
4806 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4807 ;;
4808 *)
4809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4810for as_dir in notfound
4811do
4812 IFS=$as_save_IFS
4813 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 break 2
4819 fi
4820done
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004822IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 ;;
4825esac
4826fi
4827CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004828if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4830$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004831else
Matthias Kloseb9621712010-04-24 17:59:49 +00004832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836
4837fi
4838if test -z "$ac_cv_path_CXX"; then
4839 ac_pt_CXX=$CXX
4840 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4843$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004847 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849 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 +00004850 ;;
4851 *)
4852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4853for as_dir in notfound
4854do
4855 IFS=$as_save_IFS
4856 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004861 break 2
4862 fi
4863done
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004865IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004866
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004867 ;;
4868esac
4869fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004870ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4871if test -n "$ac_pt_CXX"; then
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4873$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004874else
Matthias Kloseb9621712010-04-24 17:59:49 +00004875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4876$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004878
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879 if test "x$ac_pt_CXX" = x; then
4880 CXX="c++"
4881 else
4882 case $cross_compiling:$ac_tool_warned in
4883yes:)
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4885$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4886ac_tool_warned=yes ;;
4887esac
4888 CXX=$ac_pt_CXX
4889 fi
4890else
4891 CXX="$ac_cv_path_CXX"
4892fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004893 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004894 clang|*/clang) if test -n "$ac_tool_prefix"; then
4895 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4896set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4898$as_echo_n "checking for $ac_word... " >&6; }
4899if ${ac_cv_path_CXX+:} false; then :
4900 $as_echo_n "(cached) " >&6
4901else
4902 case $CXX in
4903 [\\/]* | ?:[\\/]*)
4904 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4905 ;;
4906 *)
4907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4908for as_dir in notfound
4909do
4910 IFS=$as_save_IFS
4911 test -z "$as_dir" && as_dir=.
4912 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004914 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4916 break 2
4917 fi
4918done
4919 done
4920IFS=$as_save_IFS
4921
Ned Deilycbfb9a52012-06-23 16:02:19 -07004922 ;;
4923esac
4924fi
4925CXX=$ac_cv_path_CXX
4926if test -n "$CXX"; then
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4928$as_echo "$CXX" >&6; }
4929else
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4931$as_echo "no" >&6; }
4932fi
4933
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004934
4935fi
4936if test -z "$ac_cv_path_CXX"; then
4937 ac_pt_CXX=$CXX
4938 # Extract the first word of "clang++", so it can be a program name with args.
4939set dummy clang++; ac_word=$2
4940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4941$as_echo_n "checking for $ac_word... " >&6; }
4942if ${ac_cv_path_ac_pt_CXX+:} false; then :
4943 $as_echo_n "(cached) " >&6
4944else
4945 case $ac_pt_CXX in
4946 [\\/]* | ?:[\\/]*)
4947 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4948 ;;
4949 *)
4950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951for as_dir in notfound
4952do
4953 IFS=$as_save_IFS
4954 test -z "$as_dir" && as_dir=.
4955 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004957 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4959 break 2
4960 fi
4961done
4962 done
4963IFS=$as_save_IFS
4964
4965 ;;
4966esac
4967fi
4968ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4969if test -n "$ac_pt_CXX"; then
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4971$as_echo "$ac_pt_CXX" >&6; }
4972else
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4974$as_echo "no" >&6; }
4975fi
4976
4977 if test "x$ac_pt_CXX" = x; then
4978 CXX="clang++"
4979 else
4980 case $cross_compiling:$ac_tool_warned in
4981yes:)
4982{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4983$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4984ac_tool_warned=yes ;;
4985esac
4986 CXX=$ac_pt_CXX
4987 fi
4988else
4989 CXX="$ac_cv_path_CXX"
4990fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004991 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004992 icc|*/icc) if test -n "$ac_tool_prefix"; then
4993 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4994set dummy ${ac_tool_prefix}icpc; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_path_CXX+:} false; then :
4998 $as_echo_n "(cached) " >&6
4999else
5000 case $CXX in
5001 [\\/]* | ?:[\\/]*)
5002 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5003 ;;
5004 *)
5005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5006for as_dir in notfound
5007do
5008 IFS=$as_save_IFS
5009 test -z "$as_dir" && as_dir=.
5010 for ac_exec_ext in '' $ac_executable_extensions; do
5011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5012 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5014 break 2
5015 fi
5016done
5017 done
5018IFS=$as_save_IFS
5019
5020 ;;
5021esac
5022fi
5023CXX=$ac_cv_path_CXX
5024if test -n "$CXX"; then
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5026$as_echo "$CXX" >&6; }
5027else
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
5030fi
5031
5032
5033fi
5034if test -z "$ac_cv_path_CXX"; then
5035 ac_pt_CXX=$CXX
5036 # Extract the first word of "icpc", so it can be a program name with args.
5037set dummy icpc; ac_word=$2
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
5040if ${ac_cv_path_ac_pt_CXX+:} false; then :
5041 $as_echo_n "(cached) " >&6
5042else
5043 case $ac_pt_CXX in
5044 [\\/]* | ?:[\\/]*)
5045 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5046 ;;
5047 *)
5048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in notfound
5050do
5051 IFS=$as_save_IFS
5052 test -z "$as_dir" && as_dir=.
5053 for ac_exec_ext in '' $ac_executable_extensions; do
5054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057 break 2
5058 fi
5059done
5060 done
5061IFS=$as_save_IFS
5062
5063 ;;
5064esac
5065fi
5066ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5067if test -n "$ac_pt_CXX"; then
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5069$as_echo "$ac_pt_CXX" >&6; }
5070else
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
5073fi
5074
5075 if test "x$ac_pt_CXX" = x; then
5076 CXX="icpc"
5077 else
5078 case $cross_compiling:$ac_tool_warned in
5079yes:)
5080{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5081$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5082ac_tool_warned=yes ;;
5083esac
5084 CXX=$ac_pt_CXX
5085 fi
5086else
5087 CXX="$ac_cv_path_CXX"
5088fi
5089 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090 esac
5091 if test "$CXX" = "notfound"
5092 then
5093 CXX=""
5094 fi
5095fi
5096if test -z "$CXX"
5097then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005098 if test -n "$ac_tool_prefix"; then
5099 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5100 do
5101 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5102set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005105if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107else
5108 if test -n "$CXX"; then
5109 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5110else
5111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5112for as_dir in $PATH
5113do
5114 IFS=$as_save_IFS
5115 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005118 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120 break 2
5121 fi
5122done
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005124IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125
5126fi
5127fi
5128CXX=$ac_cv_prog_CXX
5129if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5131$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132else
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135fi
5136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005137
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005138 test -n "$CXX" && break
5139 done
5140fi
5141if test -z "$CXX"; then
5142 ac_ct_CXX=$CXX
5143 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5144do
5145 # Extract the first word of "$ac_prog", so it can be a program name with args.
5146set dummy $ac_prog; ac_word=$2
5147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5148$as_echo_n "checking for $ac_word... " >&6; }
5149if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5150 $as_echo_n "(cached) " >&6
5151else
5152 if test -n "$ac_ct_CXX"; then
5153 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5154else
5155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156for as_dir in $PATH
5157do
5158 IFS=$as_save_IFS
5159 test -z "$as_dir" && as_dir=.
5160 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005162 ac_cv_prog_ac_ct_CXX="$ac_prog"
5163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164 break 2
5165 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005166done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005167 done
5168IFS=$as_save_IFS
5169
5170fi
5171fi
5172ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5173if test -n "$ac_ct_CXX"; then
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5175$as_echo "$ac_ct_CXX" >&6; }
5176else
5177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5178$as_echo "no" >&6; }
5179fi
5180
5181
5182 test -n "$ac_ct_CXX" && break
5183done
5184
5185 if test "x$ac_ct_CXX" = x; then
5186 CXX="notfound"
5187 else
5188 case $cross_compiling:$ac_tool_warned in
5189yes:)
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5191$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5192ac_tool_warned=yes ;;
5193esac
5194 CXX=$ac_ct_CXX
5195 fi
5196fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005197
5198 if test "$CXX" = "notfound"
5199 then
5200 CXX=""
5201 fi
5202fi
5203if test "$preset_cxx" != "$CXX"
5204then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005205 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005206
5207 By default, distutils will build C++ extension modules with \"$CXX\".
5208 If this is not intended, then set CXX on the configure command line.
5209 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005210$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005211
5212 By default, distutils will build C++ extension modules with \"$CXX\".
5213 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005214 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005215fi
5216
5217
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5219
5220
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5222$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5223cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005224#undef bfin
5225#undef cris
5226#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005227#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005228#undef hppa
5229#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005230#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005231#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005232#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005233#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005234#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005235#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005236 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005237#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005238# if defined(__x86_64__) && defined(__LP64__)
5239 x86_64-linux-gnu
5240# elif defined(__x86_64__) && defined(__ILP32__)
5241 x86_64-linux-gnux32
5242# elif defined(__i386__)
5243 i386-linux-gnu
5244# elif defined(__aarch64__) && defined(__AARCH64EL__)
5245# if defined(__ILP32__)
5246 aarch64_ilp32-linux-gnu
5247# else
5248 aarch64-linux-gnu
5249# endif
5250# elif defined(__aarch64__) && defined(__AARCH64EB__)
5251# if defined(__ILP32__)
5252 aarch64_be_ilp32-linux-gnu
5253# else
5254 aarch64_be-linux-gnu
5255# endif
5256# elif defined(__alpha__)
5257 alpha-linux-gnu
5258# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5259# if defined(__ARMEL__)
5260 arm-linux-gnueabihf
5261# else
5262 armeb-linux-gnueabihf
5263# endif
5264# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5265# if defined(__ARMEL__)
5266 arm-linux-gnueabi
5267# else
5268 armeb-linux-gnueabi
5269# endif
5270# elif defined(__hppa__)
5271 hppa-linux-gnu
5272# elif defined(__ia64__)
5273 ia64-linux-gnu
5274# elif defined(__m68k__) && !defined(__mcoldfire__)
5275 m68k-linux-gnu
5276# elif defined(__mips_hard_float) && defined(_MIPSEL)
5277# if _MIPS_SIM == _ABIO32
5278 mipsel-linux-gnu
5279# elif _MIPS_SIM == _ABIN32
5280 mips64el-linux-gnuabin32
5281# elif _MIPS_SIM == _ABI64
5282 mips64el-linux-gnuabi64
5283# else
5284# error unknown platform triplet
5285# endif
5286# elif defined(__mips_hard_float)
5287# if _MIPS_SIM == _ABIO32
5288 mips-linux-gnu
5289# elif _MIPS_SIM == _ABIN32
5290 mips64-linux-gnuabin32
5291# elif _MIPS_SIM == _ABI64
5292 mips64-linux-gnuabi64
5293# else
5294# error unknown platform triplet
5295# endif
5296# elif defined(__or1k__)
5297 or1k-linux-gnu
5298# elif defined(__powerpc__) && defined(__SPE__)
5299 powerpc-linux-gnuspe
5300# elif defined(__powerpc64__)
5301# if defined(__LITTLE_ENDIAN__)
5302 powerpc64le-linux-gnu
5303# else
5304 powerpc64-linux-gnu
5305# endif
5306# elif defined(__powerpc__)
5307 powerpc-linux-gnu
5308# elif defined(__s390x__)
5309 s390x-linux-gnu
5310# elif defined(__s390__)
5311 s390-linux-gnu
5312# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5313 sh4-linux-gnu
5314# elif defined(__sparc__) && defined(__arch64__)
5315 sparc64-linux-gnu
5316# elif defined(__sparc__)
5317 sparc-linux-gnu
5318# else
5319# error unknown platform triplet
5320# endif
5321#elif defined(__FreeBSD_kernel__)
5322# if defined(__LP64__)
5323 x86_64-kfreebsd-gnu
5324# elif defined(__i386__)
5325 i386-kfreebsd-gnu
5326# else
5327# error unknown platform triplet
5328# endif
5329#elif defined(__gnu_hurd__)
5330 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005331#elif defined(__APPLE__)
5332 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005333#else
5334# error unknown platform triplet
5335#endif
5336
5337EOF
5338
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005339if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005340 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5342$as_echo "$PLATFORM_TRIPLET" >&6; }
5343else
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5345$as_echo "none" >&6; }
5346fi
5347rm -f conftest.c conftest.out
5348
5349if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5350 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5351 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5352 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005353elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5354 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005355fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005356
doko@ubuntu.com55532312016-06-14 08:55:19 +02005357if test x$MULTIARCH != x; then
5358 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5359fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005360
5361
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5363$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5364save_LDFLAGS="$LDFLAGS"
5365LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005366
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5368/* end confdefs.h. */
5369
5370int
5371main ()
5372{
5373
5374 ;
5375 return 0;
5376}
5377_ACEOF
5378if ac_fn_c_try_link "$LINENO"; then :
5379 NO_AS_NEEDED="-Wl,--no-as-needed"
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5381$as_echo "yes" >&6; }
5382else
5383 NO_AS_NEEDED=""
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5385$as_echo "no" >&6; }
5386fi
5387rm -f core conftest.err conftest.$ac_objext \
5388 conftest$ac_exeext conftest.$ac_ext
5389LDFLAGS="$save_LDFLAGS"
5390
5391
5392
5393# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5396$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005397if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399else
5400 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5401 then ac_cv_path_EGREP="$GREP -E"
5402 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 # Loop through the user's path and test for each of PROGNAME-LIST
5406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5408do
5409 IFS=$as_save_IFS
5410 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 for ac_prog in egrep; do
5412 for ac_exec_ext in '' $ac_executable_extensions; do
5413 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005414 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005415# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 # Check for GNU $ac_path_EGREP
5417case `"$ac_path_EGREP" --version 2>&1` in
5418*GNU*)
5419 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5420*)
5421 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 while :
5424 do
5425 cat "conftest.in" "conftest.in" >"conftest.tmp"
5426 mv "conftest.tmp" "conftest.in"
5427 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5430 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5433 # Best one so far, save it but keep looking for a better one
5434 ac_cv_path_EGREP="$ac_path_EGREP"
5435 ac_path_EGREP_max=$ac_count
5436 fi
5437 # 10*(2^10) chars as input seems more than enough
5438 test $ac_count -gt 10 && break
5439 done
5440 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5441esac
5442
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $ac_path_EGREP_found && break 3
5444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005449 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 +00005450 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451else
5452 ac_cv_path_EGREP=$EGREP
5453fi
5454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 fi
5456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5458$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005460
5461
Matthias Kloseb9621712010-04-24 17:59:49 +00005462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5463$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005464if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 $as_echo_n "(cached) " >&6
5466else
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005468/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005469#include <stdlib.h>
5470#include <stdarg.h>
5471#include <string.h>
5472#include <float.h>
5473
5474int
5475main ()
5476{
5477
5478 ;
5479 return 0;
5480}
5481_ACEOF
5482if ac_fn_c_try_compile "$LINENO"; then :
5483 ac_cv_header_stdc=yes
5484else
5485 ac_cv_header_stdc=no
5486fi
5487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5488
5489if test $ac_cv_header_stdc = yes; then
5490 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492/* end confdefs.h. */
5493#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005495_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005499else
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005502rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
Matthias Kloseb9621712010-04-24 17:59:49 +00005504fi
5505
5506if test $ac_cv_header_stdc = yes; then
5507 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h. */
5510#include <stdlib.h>
5511
5512_ACEOF
5513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5514 $EGREP "free" >/dev/null 2>&1; then :
5515
5516else
5517 ac_cv_header_stdc=no
5518fi
5519rm -f conftest*
5520
5521fi
5522
5523if test $ac_cv_header_stdc = yes; then
5524 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5525 if test "$cross_compiling" = yes; then :
5526 :
5527else
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529/* end confdefs.h. */
5530#include <ctype.h>
5531#include <stdlib.h>
5532#if ((' ' & 0x0FF) == 0x020)
5533# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5534# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5535#else
5536# define ISLOWER(c) \
5537 (('a' <= (c) && (c) <= 'i') \
5538 || ('j' <= (c) && (c) <= 'r') \
5539 || ('s' <= (c) && (c) <= 'z'))
5540# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5541#endif
5542
5543#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5544int
5545main ()
5546{
5547 int i;
5548 for (i = 0; i < 256; i++)
5549 if (XOR (islower (i), ISLOWER (i))
5550 || toupper (i) != TOUPPER (i))
5551 return 2;
5552 return 0;
5553}
5554_ACEOF
5555if ac_fn_c_try_run "$LINENO"; then :
5556
5557else
5558 ac_cv_header_stdc=no
5559fi
5560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5561 conftest.$ac_objext conftest.beam conftest.$ac_ext
5562fi
5563
5564fi
5565fi
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5567$as_echo "$ac_cv_header_stdc" >&6; }
5568if test $ac_cv_header_stdc = yes; then
5569
5570$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5571
5572fi
5573
5574# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5575for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5576 inttypes.h stdint.h unistd.h
5577do :
5578 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5579ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5580"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005581if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 cat >>confdefs.h <<_ACEOF
5583#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5584_ACEOF
5585
5586fi
5587
5588done
5589
5590
5591
5592 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 +02005593if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 MINIX=yes
5595else
5596 MINIX=
5597fi
5598
5599
5600 if test "$MINIX" = yes; then
5601
5602$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5603
5604
5605$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5606
5607
5608$as_echo "#define _MINIX 1" >>confdefs.h
5609
5610 fi
5611
5612
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5614$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005615if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 $as_echo_n "(cached) " >&6
5617else
5618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5619/* end confdefs.h. */
5620
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005621# define __EXTENSIONS__ 1
5622 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005623int
5624main ()
5625{
5626
5627 ;
5628 return 0;
5629}
5630_ACEOF
5631if ac_fn_c_try_compile "$LINENO"; then :
5632 ac_cv_safe_to_define___extensions__=yes
5633else
5634 ac_cv_safe_to_define___extensions__=no
5635fi
5636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637fi
5638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5639$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5640 test $ac_cv_safe_to_define___extensions__ = yes &&
5641 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5642
5643 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5644
5645 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5646
5647 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5648
5649 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5650
5651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
Xavier de Gaye95750b12016-07-09 11:05:42 +02005653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5654$as_echo_n "checking for the Android API level... " >&6; }
5655cat >> conftest.c <<EOF
5656#ifdef __ANDROID__
5657#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005658android_api = __ANDROID_API__
5659arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005660#else
5661#error not Android
5662#endif
5663EOF
5664
5665if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005666 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5667 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5669$as_echo "$ANDROID_API_LEVEL" >&6; }
5670
5671cat >>confdefs.h <<_ACEOF
5672#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5673_ACEOF
5674
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005675
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5677$as_echo_n "checking for the Android arm ABI... " >&6; }
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5679$as_echo "$_arm_arch" >&6; }
5680 if test "$_arm_arch" = 7; then
5681 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5682 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5683 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005684else
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5686$as_echo "not Android" >&6; }
5687fi
5688rm -f conftest.c conftest.out
5689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690# Check for unsupported systems
5691case $ac_sys_system/$ac_sys_release in
5692atheos*|Linux*/1*)
5693 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5694 echo See README for details.
5695 exit 1;;
5696esac
5697
5698
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5700$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005703if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704 withval=$with_suffix;
5705 case $withval in
5706 no) EXEEXT=;;
5707 yes) EXEEXT=.exe;;
5708 *) EXEEXT=$withval;;
5709 esac
5710fi
5711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5713$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715# Test whether we're running on a non-case-sensitive system, in which
5716# case we give a warning if no ext is given
5717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5719$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720if test ! -d CaseSensitiveTestDir; then
5721mkdir CaseSensitiveTestDir
5722fi
5723
5724if test -d casesensitivetestdir
5725then
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5727$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 BUILDEXEEXT=.exe
5729else
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5731$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732 BUILDEXEEXT=$EXEEXT
5733fi
5734rmdir CaseSensitiveTestDir
5735
5736case $MACHDEP in
5737bsdos*)
5738 case $CC in
5739 gcc) CC="$CC -D_HAVE_BSDI";;
5740 esac;;
5741esac
5742
5743case $ac_sys_system in
5744hp*|HP*)
5745 case $CC in
5746 cc|*/cc) CC="$CC -Ae";;
5747 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748esac
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5752$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753if test -z "$LIBRARY"
5754then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005755 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5758$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# LDLIBRARY is the name of the library to link against (as opposed to the
5761# name of the library into which to insert object files). BLDLIBRARY is also
5762# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5763# is blank as the main program is not linked directly against LDLIBRARY.
5764# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5765# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5766# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5767# DLLLIBRARY is the shared (i.e., DLL) library.
5768#
5769# RUNSHARED is used to run shared python without installed libraries
5770#
5771# INSTSONAME is the name of the shared library that will be use to install
5772# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005773#
5774# LDVERSION is the shared library version number, normally the Python version
5775# with the ABI build flags appended.
5776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
5778
5779
5780
5781
5782
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784LDLIBRARY="$LIBRARY"
5785BLDLIBRARY='$(LDLIBRARY)'
5786INSTSONAME='$(LDLIBRARY)'
5787DLLLIBRARY=''
5788LDLIBRARYDIR=''
5789RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005790LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791
5792# LINKCC is the command that links the python executable -- default is $(CC).
5793# If CXX is set, and if it is needed to link a main function that was
5794# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5795# python might then depend on the C++ runtime
5796# This is altered for AIX in order to build the export list before
5797# linking.
5798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5800$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801if test -z "$LINKCC"
5802then
5803 LINKCC='$(PURIFY) $(MAINCC)'
5804 case $ac_sys_system in
5805 AIX*)
5806 exp_extra="\"\""
5807 if test $ac_sys_release -ge 5 -o \
5808 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5809 exp_extra="."
5810 fi
5811 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 QNX*)
5813 # qcc must be used because the other compilers do not
5814 # support -N.
5815 LINKCC=qcc;;
5816 esac
5817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5819$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820
5821# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5822# make sure we default having it set to "no": this is used by
5823# distutils.unixccompiler to know if it should add --enable-new-dtags
5824# to linker command lines, and failing to detect GNU ld simply results
5825# in the same bahaviour as before.
5826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5828$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829ac_prog=ld
5830if test "$GCC" = yes; then
5831 ac_prog=`$CC -print-prog-name=ld`
5832fi
5833case `"$ac_prog" -V 2>&1 < /dev/null` in
5834 *GNU*)
5835 GNULD=yes;;
5836 *)
5837 GNULD=no;;
5838esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5840$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5843$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005844if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005845 $as_echo_n "(cached) " >&6
5846else
5847 ac_cv_c_inline=no
5848for ac_kw in inline __inline__ __inline; do
5849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5850/* end confdefs.h. */
5851#ifndef __cplusplus
5852typedef int foo_t;
5853static $ac_kw foo_t static_foo () {return 0; }
5854$ac_kw foo_t foo () {return 0; }
5855#endif
5856
5857_ACEOF
5858if ac_fn_c_try_compile "$LINENO"; then :
5859 ac_cv_c_inline=$ac_kw
5860fi
5861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5862 test "$ac_cv_c_inline" != no && break
5863done
5864
5865fi
5866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5867$as_echo "$ac_cv_c_inline" >&6; }
5868
5869case $ac_cv_c_inline in
5870 inline | yes) ;;
5871 *)
5872 case $ac_cv_c_inline in
5873 no) ac_val=;;
5874 *) ac_val=$ac_cv_c_inline;;
5875 esac
5876 cat >>confdefs.h <<_ACEOF
5877#ifndef __cplusplus
5878#define inline $ac_val
5879#endif
5880_ACEOF
5881 ;;
5882esac
5883
5884if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005885
5886$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005887
5888
5889fi
5890
5891
Matthias Kloseb9621712010-04-24 17:59:49 +00005892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5893$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005895if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 enableval=$enable_shared;
5897fi
5898
5899
5900if test -z "$enable_shared"
5901then
5902 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005903 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 enable_shared="yes";;
5905 *)
5906 enable_shared="no";;
5907 esac
5908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5910$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911
Matthias Kloseb9621712010-04-24 17:59:49 +00005912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5913$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005915if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005916 enableval=$enable_profiling;
5917fi
5918
5919if test "x$enable_profiling" = xyes; then
5920 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005921 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923/* end confdefs.h. */
5924int main() { return 0; }
5925_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005926if ac_fn_c_try_link "$LINENO"; then :
5927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005929 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005931rm -f core conftest.err conftest.$ac_objext \
5932 conftest$ac_exeext conftest.$ac_ext
5933 CC="$ac_save_cc"
5934else
5935 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5938$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
doko@ubuntu.comba015832012-06-30 16:52:05 +02005940if test "x$enable_profiling" = xyes; then
5941 BASECFLAGS="-pg $BASECFLAGS"
5942 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943fi
5944
Matthias Kloseb9621712010-04-24 17:59:49 +00005945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5946$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947
5948# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5949# library that we build, but we do not want to link against it (we
5950# will find it with a -framework option). For this reason there is an
5951# extra variable BLDLIBRARY against which Python and the extension
5952# modules are linked, BLDLIBRARY. This is normally the same as
5953# LDLIBRARY, but empty for MacOSX framework builds.
5954if test "$enable_framework"
5955then
5956 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005957 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 BLDLIBRARY=''
5959else
5960 BLDLIBRARY='$(LDLIBRARY)'
5961fi
5962
5963# Other platforms follow
5964if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005965 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966
Matthias Kloseb9621712010-04-24 17:59:49 +00005967$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968
5969 case $ac_sys_system in
5970 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005971 LDLIBRARY='libpython$(LDVERSION).dll.a'
5972 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 ;;
5974 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005975 LDLIBRARY='libpython$(LDVERSION).so'
5976 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005977 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005979 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005980 then
5981 PY3LIBRARY=libpython3.so
5982 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005984 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005985 LDLIBRARY='libpython$(LDVERSION).so'
5986 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005987 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005989 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005990 then
5991 PY3LIBRARY=libpython3.so
5992 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ;;
5994 hp*|HP*)
5995 case `uname -m` in
5996 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005997 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 ;;
5999 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006000 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ;;
6002 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006003 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006004 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006007 LDLIBRARY='libpython$(LDVERSION).dylib'
6008 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006009 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006011 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006012 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006013 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006014 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015
6016 esac
6017else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006018 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019 case $ac_sys_system in
6020 CYGWIN*)
6021 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006022 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023 ;;
6024 esac
6025fi
6026
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006027if test "$cross_compiling" = yes; then
6028 RUNSHARED=
6029fi
6030
Matthias Kloseb9621712010-04-24 17:59:49 +00006031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6032$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033
6034if test -n "$ac_tool_prefix"; then
6035 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6036set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6038$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006039if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041else
6042 if test -n "$RANLIB"; then
6043 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6044else
6045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6046for as_dir in $PATH
6047do
6048 IFS=$as_save_IFS
6049 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054 break 2
6055 fi
6056done
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058IFS=$as_save_IFS
6059
6060fi
6061fi
6062RANLIB=$ac_cv_prog_RANLIB
6063if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6065$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066else
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6068$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069fi
6070
6071
6072fi
6073if test -z "$ac_cv_prog_RANLIB"; then
6074 ac_ct_RANLIB=$RANLIB
6075 # Extract the first word of "ranlib", so it can be a program name with args.
6076set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6078$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006079if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006080 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081else
6082 if test -n "$ac_ct_RANLIB"; then
6083 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6084else
6085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6086for as_dir in $PATH
6087do
6088 IFS=$as_save_IFS
6089 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094 break 2
6095 fi
6096done
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098IFS=$as_save_IFS
6099
6100fi
6101fi
6102ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6103if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6105$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106else
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6108$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109fi
6110
6111 if test "x$ac_ct_RANLIB" = x; then
6112 RANLIB=":"
6113 else
6114 case $cross_compiling:$ac_tool_warned in
6115yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118ac_tool_warned=yes ;;
6119esac
6120 RANLIB=$ac_ct_RANLIB
6121 fi
6122else
6123 RANLIB="$ac_cv_prog_RANLIB"
6124fi
6125
6126
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006127if test -n "$ac_tool_prefix"; then
6128 for ac_prog in ar aal
6129 do
6130 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6131set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6133$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006134if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136else
6137 if test -n "$AR"; then
6138 ac_cv_prog_AR="$AR" # Let the user override the test.
6139else
6140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141for as_dir in $PATH
6142do
6143 IFS=$as_save_IFS
6144 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006147 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149 break 2
6150 fi
6151done
Matthias Kloseb9621712010-04-24 17:59:49 +00006152 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153IFS=$as_save_IFS
6154
6155fi
6156fi
6157AR=$ac_cv_prog_AR
6158if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6160$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161else
Matthias Kloseb9621712010-04-24 17:59:49 +00006162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164fi
6165
6166
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006167 test -n "$AR" && break
6168 done
6169fi
6170if test -z "$AR"; then
6171 ac_ct_AR=$AR
6172 for ac_prog in ar aal
6173do
6174 # Extract the first word of "$ac_prog", so it can be a program name with args.
6175set dummy $ac_prog; ac_word=$2
6176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6177$as_echo_n "checking for $ac_word... " >&6; }
6178if ${ac_cv_prog_ac_ct_AR+:} false; then :
6179 $as_echo_n "(cached) " >&6
6180else
6181 if test -n "$ac_ct_AR"; then
6182 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6183else
6184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6185for as_dir in $PATH
6186do
6187 IFS=$as_save_IFS
6188 test -z "$as_dir" && as_dir=.
6189 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006190 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006191 ac_cv_prog_ac_ct_AR="$ac_prog"
6192 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6193 break 2
6194 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006196 done
6197IFS=$as_save_IFS
6198
6199fi
6200fi
6201ac_ct_AR=$ac_cv_prog_ac_ct_AR
6202if test -n "$ac_ct_AR"; then
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6204$as_echo "$ac_ct_AR" >&6; }
6205else
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6207$as_echo "no" >&6; }
6208fi
6209
6210
6211 test -n "$ac_ct_AR" && break
6212done
6213
6214 if test "x$ac_ct_AR" = x; then
6215 AR="ar"
6216 else
6217 case $cross_compiling:$ac_tool_warned in
6218yes:)
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6220$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6221ac_tool_warned=yes ;;
6222esac
6223 AR=$ac_ct_AR
6224 fi
6225fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226
6227
6228# tweak ARFLAGS only if the user didn't set it on the command line
6229
6230if test -z "$ARFLAGS"
6231then
6232 ARFLAGS="rc"
6233fi
6234
doko@ubuntu.com58844492012-06-30 18:25:32 +02006235if test -n "$ac_tool_prefix"; then
6236 for ac_prog in readelf
6237 do
6238 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6239set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6241$as_echo_n "checking for $ac_word... " >&6; }
6242if ${ac_cv_prog_READELF+:} false; then :
6243 $as_echo_n "(cached) " >&6
6244else
6245 if test -n "$READELF"; then
6246 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6247else
6248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6249for as_dir in $PATH
6250do
6251 IFS=$as_save_IFS
6252 test -z "$as_dir" && as_dir=.
6253 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006255 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6257 break 2
6258 fi
6259done
6260 done
6261IFS=$as_save_IFS
6262
6263fi
6264fi
6265READELF=$ac_cv_prog_READELF
6266if test -n "$READELF"; then
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6268$as_echo "$READELF" >&6; }
6269else
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271$as_echo "no" >&6; }
6272fi
6273
6274
6275 test -n "$READELF" && break
6276 done
6277fi
6278if test -z "$READELF"; then
6279 ac_ct_READELF=$READELF
6280 for ac_prog in readelf
6281do
6282 # Extract the first word of "$ac_prog", so it can be a program name with args.
6283set dummy $ac_prog; ac_word=$2
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6285$as_echo_n "checking for $ac_word... " >&6; }
6286if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6287 $as_echo_n "(cached) " >&6
6288else
6289 if test -n "$ac_ct_READELF"; then
6290 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6291else
6292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6293for as_dir in $PATH
6294do
6295 IFS=$as_save_IFS
6296 test -z "$as_dir" && as_dir=.
6297 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006298 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006299 ac_cv_prog_ac_ct_READELF="$ac_prog"
6300 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6301 break 2
6302 fi
6303done
6304 done
6305IFS=$as_save_IFS
6306
6307fi
6308fi
6309ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6310if test -n "$ac_ct_READELF"; then
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6312$as_echo "$ac_ct_READELF" >&6; }
6313else
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6315$as_echo "no" >&6; }
6316fi
6317
6318
6319 test -n "$ac_ct_READELF" && break
6320done
6321
6322 if test "x$ac_ct_READELF" = x; then
6323 READELF=":"
6324 else
6325 case $cross_compiling:$ac_tool_warned in
6326yes:)
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6328$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6329ac_tool_warned=yes ;;
6330esac
6331 READELF=$ac_ct_READELF
6332 fi
6333fi
6334
6335if test "$cross_compiling" = yes; then
6336 case "$READELF" in
6337 readelf|:)
6338 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6339 ;;
6340 esac
6341fi
6342
6343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345case $MACHDEP in
6346bsdos*|hp*|HP*)
6347 # install -d does not work on BSDI or HP-UX
6348 if test -z "$INSTALL"
6349 then
6350 INSTALL="${srcdir}/install-sh -c"
6351 fi
6352esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353# Find a good install program. We prefer a C program (faster),
6354# so one script is as good as another. But avoid the broken or
6355# incompatible versions:
6356# SysV /etc/install, /usr/sbin/install
6357# SunOS /usr/etc/install
6358# IRIX /sbin/install
6359# AIX /bin/install
6360# AmigaOS /C/install, which installs bootblocks on floppy discs
6361# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6362# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6363# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6364# OS/2's system install, which has a completely different semantic
6365# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006366# Reject install programs that cannot install multiple files.
6367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6368$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006370if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006371 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372else
6373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6374for as_dir in $PATH
6375do
6376 IFS=$as_save_IFS
6377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006378 # Account for people who put trailing slashes in PATH elements.
6379case $as_dir/ in #((
6380 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006382 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383 /usr/ucb/* ) ;;
6384 *)
6385 # OSF1 and SCO ODT 3.0 have their own names for install.
6386 # Don't use installbsd from OSF since it installs stuff as root
6387 # by default.
6388 for ac_prog in ginstall scoinst install; do
6389 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006390 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006391 if test $ac_prog = install &&
6392 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6393 # AIX install. It has an incompatible calling convention.
6394 :
6395 elif test $ac_prog = install &&
6396 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6397 # program-specific install script used by HP pwplus--don't use.
6398 :
6399 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006400 rm -rf conftest.one conftest.two conftest.dir
6401 echo one > conftest.one
6402 echo two > conftest.two
6403 mkdir conftest.dir
6404 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6405 test -s conftest.one && test -s conftest.two &&
6406 test -s conftest.dir/conftest.one &&
6407 test -s conftest.dir/conftest.two
6408 then
6409 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6410 break 3
6411 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412 fi
6413 fi
6414 done
6415 done
6416 ;;
6417esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006418
6419 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420IFS=$as_save_IFS
6421
Matthias Kloseb9621712010-04-24 17:59:49 +00006422rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423
6424fi
6425 if test "${ac_cv_path_install+set}" = set; then
6426 INSTALL=$ac_cv_path_install
6427 else
6428 # As a last resort, use the slow shell script. Don't cache a
6429 # value for INSTALL within a source directory, because that will
6430 # break other packages using the cache if that directory is
6431 # removed, or if the value is a relative name.
6432 INSTALL=$ac_install_sh
6433 fi
6434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6436$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437
6438# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6439# It thinks the first close brace ends the variable substitution.
6440test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6441
6442test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6443
6444test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6445
Matthias Klose93a0ef12012-03-15 18:08:34 +01006446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6447$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6448if test -z "$MKDIR_P"; then
6449 if ${ac_cv_path_mkdir+:} false; then :
6450 $as_echo_n "(cached) " >&6
6451else
6452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6453for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6454do
6455 IFS=$as_save_IFS
6456 test -z "$as_dir" && as_dir=.
6457 for ac_prog in mkdir gmkdir; do
6458 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006459 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006460 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6461 'mkdir (GNU coreutils) '* | \
6462 'mkdir (coreutils) '* | \
6463 'mkdir (fileutils) '4.1*)
6464 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6465 break 3;;
6466 esac
6467 done
6468 done
6469 done
6470IFS=$as_save_IFS
6471
6472fi
6473
6474 test -d ./--version && rmdir ./--version
6475 if test "${ac_cv_path_mkdir+set}" = set; then
6476 MKDIR_P="$ac_cv_path_mkdir -p"
6477 else
6478 # As a last resort, use the slow shell script. Don't cache a
6479 # value for MKDIR_P within a source directory, because that will
6480 # break other packages using the cache if that directory is
6481 # removed, or if the value is a relative name.
6482 MKDIR_P="$ac_install_sh -d"
6483 fi
6484fi
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6486$as_echo "$MKDIR_P" >&6; }
6487
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006488
6489# Not every filesystem supports hard links
6490
6491if test -z "$LN" ; then
6492 case $ac_sys_system in
6493 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494 *) LN=ln;;
6495 esac
6496fi
6497
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006498# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006499
6500ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006501
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006502# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6504$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505
6506# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006507if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508 withval=$with_pydebug;
6509if test "$withval" != no
6510then
6511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6515$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006517 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006518else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006520fi
6521else
Matthias Kloseb9621712010-04-24 17:59:49 +00006522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6523$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524fi
6525
6526
Brett Cannon63d98bc2016-09-06 17:12:40 -07006527# Enable optimization flags
6528
6529
6530Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6532$as_echo_n "checking for --enable-optimizations... " >&6; }
6533# Check whether --enable-optimizations was given.
6534if test "${enable_optimizations+set}" = set; then :
6535 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006536if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006537then
6538 Py_OPT='true'
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6540$as_echo "yes" >&6; };
6541else
6542 Py_OPT='false'
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6544$as_echo "no" >&6; };
6545fi
6546else
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548$as_echo "no" >&6; }
6549fi
6550
6551if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006552 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6553 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006554 # 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 +00006555 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006556 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006557 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006558 DEF_MAKE_RULE="build_all"
6559else
6560 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006561 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006562 DEF_MAKE_RULE="all"
6563fi
6564
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006565# Enable LTO flags
6566
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6568$as_echo_n "checking for --with-lto... " >&6; }
6569
6570# Check whether --with-lto was given.
6571if test "${with_lto+set}" = set; then :
6572 withval=$with_lto;
6573if test "$withval" != no
6574then
6575 Py_LTO='true'
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6577$as_echo "yes" >&6; };
6578else
6579 Py_LTO='false'
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6581$as_echo "no" >&6; };
6582fi
6583else
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; }
6586fi
6587
6588if test "$Py_LTO" = 'true' ; then
6589 case $CC in
6590 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006591 case $ac_sys_system in
6592 Darwin*)
6593 # Any changes made here should be reflected in the GCC+Darwin case below
6594 LTOFLAGS="-flto -Wl,-export_dynamic"
6595 ;;
6596 *)
6597 LTOFLAGS="-flto"
6598 ;;
6599 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006600 ;;
6601 *gcc*)
6602 case $ac_sys_system in
6603 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006604 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006605 ;;
6606 *)
6607 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6608 ;;
6609 esac
6610 ;;
6611 esac
6612fi
6613
Brett Cannon7188a3e2015-09-18 15:13:44 -07006614# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006615
6616
6617
6618
6619
Gregory P. Smith799520c2016-09-07 16:10:00 -07006620# Make this work on systems where llvm tools are not installed with their
6621# normal names in the default $PATH (ie: Ubuntu). They exist under the
6622# non-suffixed name in their versioned llvm directory.
6623llvm_bin_dir=''
6624llvm_path="${PATH}"
6625if test "${CC}" = "clang"
6626then
6627 clang_bin=`which clang`
6628 # Some systems install clang elsewhere as a symlink to the real path
6629 # which is where the related llvm tools are located.
6630 if test -L "${clang_bin}"
6631 then
6632 clang_dir=`dirname "${clang_bin}"`
6633 clang_bin=`readlink "${clang_bin}"`
6634 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6635 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6636 fi
6637fi
Zachary Ware5af85642015-12-21 12:09:17 -06006638
Gregory P. Smith799520c2016-09-07 16:10:00 -07006639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6640$as_echo_n "checking target system type... " >&6; }
6641if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006642 $as_echo_n "(cached) " >&6
6643else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006644 if test "x$target_alias" = x; then
6645 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006646else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006647 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6648 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6649fi
6650
6651fi
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6653$as_echo "$ac_cv_target" >&6; }
6654case $ac_cv_target in
6655*-*-*) ;;
6656*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6657esac
6658target=$ac_cv_target
6659ac_save_IFS=$IFS; IFS='-'
6660set x $ac_cv_target
6661shift
6662target_cpu=$1
6663target_vendor=$2
6664shift; shift
6665# Remember, the first character of IFS is used to create $*,
6666# except with old shells:
6667target_os=$*
6668IFS=$ac_save_IFS
6669case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6670
6671
6672# The aliases save the names the user supplied, while $host etc.
6673# will get canonicalized.
6674test -n "$target_alias" &&
6675 test "$program_prefix$program_suffix$program_transform_name" = \
6676 NONENONEs,x,x, &&
6677 program_prefix=${target_alias}-
6678# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6679set dummy $target_alias-llvm-profdata; ac_word=$2
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681$as_echo_n "checking for $ac_word... " >&6; }
6682if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6683 $as_echo_n "(cached) " >&6
6684else
6685 case $LLVM_PROFDATA in
6686 [\\/]* | ?:[\\/]*)
6687 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6688 ;;
6689 *)
6690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006692do
6693 IFS=$as_save_IFS
6694 test -z "$as_dir" && as_dir=.
6695 for ac_exec_ext in '' $ac_executable_extensions; do
6696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006697 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699 break 2
6700 fi
6701done
6702 done
6703IFS=$as_save_IFS
6704
Gregory P. Smith799520c2016-09-07 16:10:00 -07006705 ;;
6706esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006707fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006708LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6709if test -n "$LLVM_PROFDATA"; then
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6711$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006712else
6713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714$as_echo "no" >&6; }
6715fi
6716
6717
Gregory P. Smith799520c2016-09-07 16:10:00 -07006718if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6719 if test "$build" = "$target"; then
6720 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6721 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6722set dummy llvm-profdata; ac_word=$2
6723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6724$as_echo_n "checking for $ac_word... " >&6; }
6725if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6726 $as_echo_n "(cached) " >&6
6727else
6728 case $ac_pt_LLVM_PROFDATA in
6729 [\\/]* | ?:[\\/]*)
6730 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6731 ;;
6732 *)
6733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6734for as_dir in ${llvm_path}
6735do
6736 IFS=$as_save_IFS
6737 test -z "$as_dir" && as_dir=.
6738 for ac_exec_ext in '' $ac_executable_extensions; do
6739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6740 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6742 break 2
6743 fi
6744done
6745 done
6746IFS=$as_save_IFS
6747
6748 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6749 ;;
6750esac
6751fi
6752ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6753if test -n "$ac_pt_LLVM_PROFDATA"; then
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6755$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6756else
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6758$as_echo "no" >&6; }
6759fi
6760
6761 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6762 else
6763 LLVM_PROFDATA="''"
6764 fi
6765else
6766 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6767fi
6768
6769
6770if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6771then
6772 LLVM_PROF_FOUND="found"
6773else
6774 LLVM_PROF_FOUND="not-found"
6775fi
6776if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6777then
6778 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6779 if test -n "${found_llvm_profdata}"
6780 then
6781 # llvm-profdata isn't directly in $PATH in some cases.
6782 # https://apple.stackexchange.com/questions/197053/
6783 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6784 LLVM_PROF_FOUND=found
6785 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6786$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6787 fi
6788fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006789LLVM_PROF_ERR=no
6790case $CC in
6791 *clang*)
6792 # Any changes made here should be reflected in the GCC+Darwin case below
6793 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6794 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006795 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006796 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6797 if test $LLVM_PROF_FOUND = not-found
6798 then
6799 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800 if test "${REQUIRE_PGO}" = "yes"
6801 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006802 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 -07006803 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006804 fi
6805 ;;
6806 *gcc*)
6807 case $ac_sys_system in
6808 Darwin*)
6809 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6810 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006811 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006812 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006813 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006814 then
6815 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006816 if test "${REQUIRE_PGO}" = "yes"
6817 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006818 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 -07006819 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006820 fi
6821 ;;
6822 *)
6823 PGO_PROF_GEN_FLAG="-fprofile-generate"
6824 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6825 LLVM_PROF_MERGER="true"
6826 LLVM_PROF_FILE=""
6827 ;;
6828 esac
6829 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006830 *icc*)
6831 PGO_PROF_GEN_FLAG="-prof-gen"
6832 PGO_PROF_USE_FLAG="-prof-use"
6833 LLVM_PROF_MERGER="true"
6834 LLVM_PROF_FILE=""
6835 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006836esac
6837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6839# merged with this chunk of code?
6840
6841# Optimizer/debugger flags
6842# ------------------------
6843# (The following bit of code is complicated enough - please keep things
6844# indented properly. Just pretend you're editing Python code. ;-)
6845
6846# There are two parallel sets of case statements below, one that checks to
6847# see if OPT was set and one that does BASECFLAGS setting based upon
6848# compiler and platform. BASECFLAGS tweaks need to be made even if the
6849# user set OPT.
6850
6851# tweak OPT based on compiler and platform, only if the user didn't set
6852# it on the command line
6853
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006854if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855then
6856 case $GCC in
6857 yes)
6858 if test "$CC" != 'g++' ; then
6859 STRICT_PROTO="-Wstrict-prototypes"
6860 fi
6861 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6862 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6863 WRAP="-fwrapv"
6864 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006865
6866 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006867 case $CC in
6868 *clang*) WRAP="-fwrapv"
6869 ;;
6870 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872 case $ac_cv_prog_cc_g in
6873 yes)
6874 if test "$Py_DEBUG" = 'true' ; then
6875 # Optimization messes up debuggers, so turn it off for
6876 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006877 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6878 OPT="-g -Og -Wall $STRICT_PROTO"
6879 else
6880 OPT="-g -O0 -Wall $STRICT_PROTO"
6881 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882 else
6883 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6884 fi
6885 ;;
6886 *)
6887 OPT="-O3 -Wall $STRICT_PROTO"
6888 ;;
6889 esac
6890 case $ac_sys_system in
6891 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6892 ;;
6893 esac
6894 ;;
6895
6896 *)
6897 OPT="-O"
6898 ;;
6899 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900fi
6901
6902
6903
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006904
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905# The -arch flags for universal builds on OSX
6906UNIVERSAL_ARCH_FLAGS=
6907
6908
6909# tweak BASECFLAGS based on compiler and platform
6910case $GCC in
6911yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006912 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006913
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6915$as_echo_n "checking for -Wextra... " >&6; }
6916 ac_save_cc="$CC"
6917 CC="$CC -Wextra -Werror"
6918 if ${ac_cv_extra_warnings+:} false; then :
6919 $as_echo_n "(cached) " >&6
6920else
6921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6922/* end confdefs.h. */
6923
6924
6925int
6926main ()
6927{
6928
6929 ;
6930 return 0;
6931}
6932
6933_ACEOF
6934if ac_fn_c_try_compile "$LINENO"; then :
6935
6936 ac_cv_extra_warnings=yes
6937
6938else
6939
6940 ac_cv_extra_warnings=no
6941
6942fi
6943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6944fi
6945
6946 CC="$ac_save_cc"
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6948$as_echo "$ac_cv_extra_warnings" >&6; }
6949
6950 if test $ac_cv_extra_warnings = yes
6951 then
6952 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6953 fi
6954
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006955 # Python doesn't violate C99 aliasing rules, but older versions of
6956 # GCC produce warnings for legal Python code. Enable
6957 # -fno-strict-aliasing on versions of GCC that support but produce
6958 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6960$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006961 ac_save_cc="$CC"
6962 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006963 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006964 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006965 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006966else
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006969
Matthias Kloseb159a552010-04-25 21:00:44 +00006970
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006971int
6972main ()
6973{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006974
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006975 ;
6976 return 0;
6977}
Matthias Kloseb159a552010-04-25 21:00:44 +00006978
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006980if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006981
6982 CC="$ac_save_cc -fstrict-aliasing"
6983 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985/* end confdefs.h. */
6986
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006987 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988int
6989main ()
6990{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006991double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992 ;
6993 return 0;
6994}
Matthias Kloseb159a552010-04-25 21:00:44 +00006995
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006997if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006998
6999 ac_cv_no_strict_aliasing=no
7000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001else
Matthias Kloseb159a552010-04-25 21:00:44 +00007002
7003 ac_cv_no_strict_aliasing=yes
7004
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007005fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008else
Matthias Kloseb159a552010-04-25 21:00:44 +00007009
7010 ac_cv_no_strict_aliasing=no
7011
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007012fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007014fi
7015
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007016 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7019$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007020 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021 then
7022 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7023 fi
7024
Zachary Ware5af85642015-12-21 12:09:17 -06007025 # ICC doesn't recognize the option, but only emits a warning
7026 ## XXX does it emit an unused result warning and can it be disabled?
7027 case "$CC" in
7028 *icc*)
7029 ac_cv_disable_unused_result_warning=no
7030 ;;
7031 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7033$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7034 ac_save_cc="$CC"
7035 CC="$CC -Wunused-result -Werror"
7036 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007037 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007038 $as_echo_n "(cached) " >&6
7039else
7040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7041/* end confdefs.h. */
7042
7043
7044int
7045main ()
7046{
7047
7048 ;
7049 return 0;
7050}
7051
7052_ACEOF
7053if ac_fn_c_try_compile "$LINENO"; then :
7054
7055 ac_cv_disable_unused_result_warning=yes
7056
7057else
7058
7059 ac_cv_disable_unused_result_warning=no
7060
7061fi
7062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7063fi
7064
7065 CFLAGS="$save_CFLAGS"
7066 CC="$ac_save_cc"
7067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7068$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007069 ;;
7070 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007071
7072 if test $ac_cv_disable_unused_result_warning = yes
7073 then
7074 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007075 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7076 fi
7077
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7079$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7080 ac_save_cc="$CC"
7081 CC="$CC -Wunused-parameter -Werror"
7082 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7083 $as_echo_n "(cached) " >&6
7084else
7085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7086/* end confdefs.h. */
7087
7088
7089int
7090main ()
7091{
7092
7093 ;
7094 return 0;
7095}
7096
7097_ACEOF
7098if ac_fn_c_try_compile "$LINENO"; then :
7099
7100 ac_cv_disable_unused_parameter_warning=yes
7101
7102else
7103
7104 ac_cv_disable_unused_parameter_warning=no
7105
7106fi
7107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7108fi
7109
7110 CC="$ac_save_cc"
7111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7112$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7113
7114 if test $ac_cv_disable_unused_parameter_warning = yes
7115 then
7116 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7117 fi
7118
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7120$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7121 ac_save_cc="$CC"
7122 CC="$CC -Wmissing-field-initializers -Werror"
7123 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7124 $as_echo_n "(cached) " >&6
7125else
7126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7127/* end confdefs.h. */
7128
7129
7130int
7131main ()
7132{
7133
7134 ;
7135 return 0;
7136}
7137
7138_ACEOF
7139if ac_fn_c_try_compile "$LINENO"; then :
7140
7141 ac_cv_disable_missing_field_initializers=yes
7142
7143else
7144
7145 ac_cv_disable_missing_field_initializers=no
7146
7147fi
7148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7149fi
7150
7151 CC="$ac_save_cc"
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7153$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7154
7155 if test $ac_cv_disable_missing_field_initializers = yes
7156 then
7157 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007158 fi
7159
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7161$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7162 ac_save_cc="$CC"
7163 CC="$CC -Wsign-compare"
7164 save_CFLAGS="$CFLAGS"
7165 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7166 $as_echo_n "(cached) " >&6
7167else
7168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7169/* end confdefs.h. */
7170
7171
7172int
7173main ()
7174{
7175
7176 ;
7177 return 0;
7178}
7179
7180_ACEOF
7181if ac_fn_c_try_compile "$LINENO"; then :
7182
7183 ac_cv_enable_sign_compare_warning=yes
7184
7185else
7186
7187 ac_cv_enable_sign_compare_warning=no
7188
7189fi
7190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7191fi
7192
7193 CFLAGS="$save_CFLAGS"
7194 CC="$ac_save_cc"
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7196$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7197
7198 if test $ac_cv_enable_sign_compare_warning = yes
7199 then
7200 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7201 fi
7202
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7204$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7205 ac_save_cc="$CC"
7206 CC="$CC -Wunreachable-code"
7207 save_CFLAGS="$CFLAGS"
7208 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7209 $as_echo_n "(cached) " >&6
7210else
7211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7212/* end confdefs.h. */
7213
7214
7215int
7216main ()
7217{
7218
7219 ;
7220 return 0;
7221}
7222
7223_ACEOF
7224if ac_fn_c_try_compile "$LINENO"; then :
7225
7226 ac_cv_enable_unreachable_code_warning=yes
7227
7228else
7229
7230 ac_cv_enable_unreachable_code_warning=no
7231
7232fi
7233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7234fi
7235
7236 CFLAGS="$save_CFLAGS"
7237 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007238
7239 # Don't enable unreachable code warning in debug mode, since it usually
7240 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007241 # Issue #24324: Unfortunately, the unreachable code warning does not work
7242 # correctly on gcc and has been silently removed from the compiler.
7243 # It is supported on clang but on OS X systems gcc may be an alias
7244 # for clang. Try to determine if the compiler is not really gcc and,
7245 # if so, only then enable the warning.
7246 if test $ac_cv_enable_unreachable_code_warning = yes && \
7247 test "$Py_DEBUG" != "true" && \
7248 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007249 then
7250 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007251 else
7252 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007253 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7255$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007256
Victor Stinner193ee0a2017-02-06 14:24:00 +01007257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7258$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7259 ac_save_cc="$CC"
7260 CC="$CC -Werror=implicit-function-declaration"
7261 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7262 $as_echo_n "(cached) " >&6
7263else
7264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7265/* end confdefs.h. */
7266
7267
7268int
7269main ()
7270{
7271
7272 ;
7273 return 0;
7274}
7275
7276_ACEOF
7277if ac_fn_c_try_compile "$LINENO"; then :
7278
7279 ac_cv_enable_implicit_function_declaration_error=yes
7280
7281else
7282
7283 ac_cv_enable_implicit_function_declaration_error=no
7284
7285fi
7286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7287fi
7288
7289 CC="$ac_save_cc"
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7291$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7292
7293 if test $ac_cv_enable_implicit_function_declaration_error = yes
7294 then
7295 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7296 fi
7297
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7299 # support. Without this, treatment of subnormals doesn't follow
7300 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007301 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007302 alpha*)
7303 BASECFLAGS="$BASECFLAGS -mieee"
7304 ;;
7305 esac
7306
7307 case $ac_sys_system in
7308 SCO_SV*)
7309 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7310 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007311
7312 # is there any other compiler on Darwin besides gcc?
7313 Darwin*)
7314 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7315 # used to be here, but non-Apple gcc doesn't accept them.
7316 if test "${CC}" = gcc
7317 then
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007319$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007320 case "${UNIVERSALSDK}" in
7321 */MacOSX10.4u.sdk)
7322 # Build using 10.4 SDK, force usage of gcc when the
7323 # compiler is gcc, otherwise the user will get very
7324 # confusing error messages when building on OSX 10.6
7325 CC=gcc-4.0
7326 CPP=cpp-4.0
7327 ;;
7328 esac
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007330$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007331 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007332
Ned Deily87adb6e2013-10-18 21:09:56 -07007333 if test "${enable_universalsdk}"
7334 then
7335 case "$UNIVERSAL_ARCHS" in
7336 32-bit)
7337 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7338 LIPO_32BIT_FLAGS=""
7339 ARCH_RUN_32BIT=""
7340 ;;
7341 64-bit)
7342 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7343 LIPO_32BIT_FLAGS=""
7344 ARCH_RUN_32BIT="true"
7345 ;;
7346 all)
7347 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7348 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7349 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7350 ;;
7351 intel)
7352 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7353 LIPO_32BIT_FLAGS="-extract i386"
7354 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7355 ;;
7356 intel-32)
7357 UNIVERSAL_ARCH_FLAGS="-arch i386"
7358 LIPO_32BIT_FLAGS=""
7359 ARCH_RUN_32BIT=""
7360 ;;
7361 3-way)
7362 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7363 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7364 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7365 ;;
7366 *)
7367 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7368 ;;
7369 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370
Ned Deily87adb6e2013-10-18 21:09:56 -07007371 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7372 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7373 if test "${UNIVERSALSDK}" != "/"
7374 then
7375 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7376 fi
7377 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378
Ned Deily87adb6e2013-10-18 21:09:56 -07007379 # Calculate an appropriate deployment target for this build:
7380 # The deployment target value is used explicitly to enable certain
7381 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007382 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007383 # component of the string returned by distutils.get_platform().
7384 #
7385 # Use the value from:
7386 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7387 # 2. the operating system version of the build machine if >= 10.6
7388 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7389 # below to pick either 10.3, 10.4, or 10.5 as the target.
7390 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391
Ned Deily87adb6e2013-10-18 21:09:56 -07007392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7393$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007394 cur_target_major=`sw_vers -productVersion | \
7395 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7396 cur_target_minor=`sw_vers -productVersion | \
7397 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7398 cur_target="${cur_target_major}.${cur_target_minor}"
7399 if test ${cur_target_major} -eq 10 && \
7400 test ${cur_target_minor} -ge 3 && \
7401 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007402 then
Ned Deily36820b62014-06-25 13:44:22 -07007403 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007404 cur_target=10.3
7405 if test ${enable_universalsdk}
7406 then
7407 case "$UNIVERSAL_ARCHS" in
7408 all|3-way|intel|64-bit)
7409 # These configurations were first supported in 10.5
7410 cur_target='10.5'
7411 ;;
7412 esac
7413 else
7414 if test `/usr/bin/arch` = "i386"
7415 then
7416 # 10.4 was the first release to support Intel archs
7417 cur_target="10.4"
7418 fi
7419 fi
7420 fi
7421 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007422
Ned Deily87adb6e2013-10-18 21:09:56 -07007423 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7424 # environment with a value that is the same as what we'll use
7425 # in the Makefile to ensure that we'll get the same compiler
7426 # environment during configure and build time.
7427 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7428 export MACOSX_DEPLOYMENT_TARGET
7429 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7431$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007432
Ned Deily87adb6e2013-10-18 21:09:56 -07007433 # end of Darwin* tests
7434 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435 esac
7436 ;;
7437
7438*)
7439 case $ac_sys_system in
7440 OpenUNIX*|UnixWare*)
7441 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7442 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443 SCO_SV*)
7444 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7445 ;;
7446 esac
7447 ;;
7448esac
7449
Zachary Ware5af85642015-12-21 12:09:17 -06007450# ICC needs -fp-model strict or floats behave badly
7451case "$CC" in
7452*icc*)
7453 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7454 ;;
7455esac
7456
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457if test "$Py_DEBUG" = 'true'; then
7458 :
7459else
7460 OPT="-DNDEBUG $OPT"
7461fi
7462
7463if test "$ac_arch_flags"
7464then
7465 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7466fi
7467
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468# On some compilers, pthreads are available without further options
7469# (e.g. MacOS X). On some of these systems, the compiler will not
7470# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7471# So we have to see first whether pthreads are available without
7472# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7474$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007475if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477else
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479 ac_cv_pthread_is_default=no
7480else
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482/* end confdefs.h. */
7483
Stefan Krah7dba5942012-11-22 22:49:11 +01007484#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485#include <pthread.h>
7486
7487void* routine(void* p){return NULL;}
7488
7489int main(){
7490 pthread_t p;
7491 if(pthread_create(&p,NULL,routine,NULL)!=0)
7492 return 1;
7493 (void)pthread_detach(p);
7494 return 0;
7495}
7496
7497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007498if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499
7500 ac_cv_pthread_is_default=yes
7501 ac_cv_kthread=no
7502 ac_cv_pthread=no
7503
7504else
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7508 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509fi
7510
7511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512fi
7513
Matthias Kloseb9621712010-04-24 17:59:49 +00007514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7515$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516
7517
7518if test $ac_cv_pthread_is_default = yes
7519then
7520 ac_cv_kpthread=no
7521else
7522# -Kpthread, if available, provides the right #defines
7523# and linker options to make pthread_create available
7524# Some compilers won't report that they do not support -Kpthread,
7525# so we need to run a program to see whether it really made the
7526# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7528$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007529if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007530 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531else
7532 ac_save_cc="$CC"
7533CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007534if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535 ac_cv_kpthread=no
7536else
Matthias Kloseb9621712010-04-24 17:59:49 +00007537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538/* end confdefs.h. */
7539
Stefan Krah7dba5942012-11-22 22:49:11 +01007540#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541#include <pthread.h>
7542
7543void* routine(void* p){return NULL;}
7544
7545int main(){
7546 pthread_t p;
7547 if(pthread_create(&p,NULL,routine,NULL)!=0)
7548 return 1;
7549 (void)pthread_detach(p);
7550 return 0;
7551}
7552
7553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007554if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555 ac_cv_kpthread=yes
7556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7560 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561fi
7562
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563CC="$ac_save_cc"
7564fi
7565
Matthias Kloseb9621712010-04-24 17:59:49 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7567$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568fi
7569
7570if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7571then
7572# -Kthread, if available, provides the right #defines
7573# and linker options to make pthread_create available
7574# Some compilers won't report that they do not support -Kthread,
7575# so we need to run a program to see whether it really made the
7576# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7578$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007579if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581else
7582 ac_save_cc="$CC"
7583CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007584if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585 ac_cv_kthread=no
7586else
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588/* end confdefs.h. */
7589
Stefan Krah7dba5942012-11-22 22:49:11 +01007590#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591#include <pthread.h>
7592
7593void* routine(void* p){return NULL;}
7594
7595int main(){
7596 pthread_t p;
7597 if(pthread_create(&p,NULL,routine,NULL)!=0)
7598 return 1;
7599 (void)pthread_detach(p);
7600 return 0;
7601}
7602
7603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007604if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605 ac_cv_kthread=yes
7606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7610 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611fi
7612
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613CC="$ac_save_cc"
7614fi
7615
Matthias Kloseb9621712010-04-24 17:59:49 +00007616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7617$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618fi
7619
7620if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7621then
7622# -pthread, if available, provides the right #defines
7623# and linker options to make pthread_create available
7624# Some compilers won't report that they do not support -pthread,
7625# so we need to run a program to see whether it really made the
7626# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7628$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007629if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631else
7632 ac_save_cc="$CC"
7633CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007634if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635 ac_cv_pthread=no
7636else
Matthias Kloseb9621712010-04-24 17:59:49 +00007637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638/* end confdefs.h. */
7639
Stefan Krah7dba5942012-11-22 22:49:11 +01007640#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641#include <pthread.h>
7642
7643void* routine(void* p){return NULL;}
7644
7645int main(){
7646 pthread_t p;
7647 if(pthread_create(&p,NULL,routine,NULL)!=0)
7648 return 1;
7649 (void)pthread_detach(p);
7650 return 0;
7651}
7652
7653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007654if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655 ac_cv_pthread=yes
7656else
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7660 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661fi
7662
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663CC="$ac_save_cc"
7664fi
7665
Matthias Kloseb9621712010-04-24 17:59:49 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7667$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668fi
7669
7670# If we have set a CC compiler flag for thread support then
7671# check if it works for CXX, too.
7672ac_cv_cxx_thread=no
7673if test ! -z "$CXX"
7674then
Matthias Kloseb9621712010-04-24 17:59:49 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7676$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007677ac_save_cxx="$CXX"
7678
7679if test "$ac_cv_kpthread" = "yes"
7680then
7681 CXX="$CXX -Kpthread"
7682 ac_cv_cxx_thread=yes
7683elif test "$ac_cv_kthread" = "yes"
7684then
7685 CXX="$CXX -Kthread"
7686 ac_cv_cxx_thread=yes
7687elif test "$ac_cv_pthread" = "yes"
7688then
7689 CXX="$CXX -pthread"
7690 ac_cv_cxx_thread=yes
7691fi
7692
7693if test $ac_cv_cxx_thread = yes
7694then
7695 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7696 $CXX -c conftest.$ac_ext 2>&5
7697 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7698 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7699 then
7700 ac_cv_cxx_thread=yes
7701 else
7702 ac_cv_cxx_thread=no
7703 fi
7704 rm -fr conftest*
7705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7707$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708fi
7709CXX="$ac_save_cxx"
7710
7711
7712# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7714$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007715if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007716 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717else
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719/* end confdefs.h. */
7720#include <stdlib.h>
7721#include <stdarg.h>
7722#include <string.h>
7723#include <float.h>
7724
7725int
7726main ()
7727{
7728
7729 ;
7730 return 0;
7731}
7732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007733if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734 ac_cv_header_stdc=yes
7735else
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7739
7740if test $ac_cv_header_stdc = yes; then
7741 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743/* end confdefs.h. */
7744#include <string.h>
7745
7746_ACEOF
7747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 $EGREP "memchr" >/dev/null 2>&1; then :
7749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750else
7751 ac_cv_header_stdc=no
7752fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007753rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754
7755fi
7756
7757if test $ac_cv_header_stdc = yes; then
7758 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760/* end confdefs.h. */
7761#include <stdlib.h>
7762
7763_ACEOF
7764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 $EGREP "free" >/dev/null 2>&1; then :
7766
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767else
7768 ac_cv_header_stdc=no
7769fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007770rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771
7772fi
7773
7774if test $ac_cv_header_stdc = yes; then
7775 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777 :
7778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780/* end confdefs.h. */
7781#include <ctype.h>
7782#include <stdlib.h>
7783#if ((' ' & 0x0FF) == 0x020)
7784# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7785# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7786#else
7787# define ISLOWER(c) \
7788 (('a' <= (c) && (c) <= 'i') \
7789 || ('j' <= (c) && (c) <= 'r') \
7790 || ('s' <= (c) && (c) <= 'z'))
7791# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7792#endif
7793
7794#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7795int
7796main ()
7797{
7798 int i;
7799 for (i = 0; i < 256; i++)
7800 if (XOR (islower (i), ISLOWER (i))
7801 || toupper (i) != TOUPPER (i))
7802 return 2;
7803 return 0;
7804}
7805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007806if ac_fn_c_try_run "$LINENO"; then :
7807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808else
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813fi
7814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007815fi
7816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7818$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007819if test $ac_cv_header_stdc = yes; then
7820
Matthias Kloseb9621712010-04-24 17:59:49 +00007821$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007822
7823fi
7824
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007825for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007826fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007827ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007828sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007829unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007830poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007831sys/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 +01007832sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007833sys/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 +01007834sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007835sys/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 -07007836libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007837linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007838sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007839do :
7840 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7841ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007842if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007844#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007845_ACEOF
7846
7847fi
7848
Guido van Rossum627b2d71993-12-24 10:39:16 +00007849done
7850
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007851ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007852for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7855$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007856if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007857 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007858else
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007860/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861#include <sys/types.h>
7862#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007863
Martin v. Löwis11437992002-04-12 09:54:03 +00007864int
7865main ()
7866{
7867if ((DIR *) 0)
7868return 0;
7869 ;
7870 return 0;
7871}
7872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007873if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007875else
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880eval ac_res=\$$as_ac_Header
7881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7882$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007883if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007885#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007886_ACEOF
7887
7888ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007889fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007890
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891done
7892# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7893if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7895$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007896if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007898else
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903/* Override any GCC internal prototype to avoid an error.
7904 Use char because int might match the return type of a GCC
7905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007906#ifdef __cplusplus
7907extern "C"
7908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007909char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007910int
7911main ()
7912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 ;
7915 return 0;
7916}
7917_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007918for ac_lib in '' dir; do
7919 if test -z "$ac_lib"; then
7920 ac_res="none required"
7921 else
7922 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007923 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007925 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007926 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007928rm -f core conftest.err conftest.$ac_objext \
7929 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007930 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933done
Victor Stinnere0be4232011-10-25 13:06:09 +02007934if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936else
7937 ac_cv_search_opendir=no
7938fi
7939rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007940LIBS=$ac_func_search_save_LIBS
7941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7943$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007945if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007949
Michael W. Hudson54241132001-12-07 15:38:26 +00007950else
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7952$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007953if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007955else
7956 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960/* Override any GCC internal prototype to avoid an error.
7961 Use char because int might match the return type of a GCC
7962 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963#ifdef __cplusplus
7964extern "C"
7965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007966char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007967int
7968main ()
7969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007971 ;
7972 return 0;
7973}
7974_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975for ac_lib in '' x; do
7976 if test -z "$ac_lib"; then
7977 ac_res="none required"
7978 else
7979 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007980 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007985rm -f core conftest.err conftest.$ac_objext \
7986 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007987 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990done
Victor Stinnere0be4232011-10-25 13:06:09 +02007991if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993else
7994 ac_cv_search_opendir=no
7995fi
7996rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007997LIBS=$ac_func_search_save_LIBS
7998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8000$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008002if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008004
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008005fi
8006
8007fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008008
Matthias Kloseb9621712010-04-24 17:59:49 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8010$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008011if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008013else
Matthias Kloseb9621712010-04-24 17:59:49 +00008014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008015/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008016#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008017int
8018main ()
8019{
8020return makedev(0, 0);
8021 ;
8022 return 0;
8023}
8024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008025if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008026 ac_cv_header_sys_types_h_makedev=yes
8027else
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008030rm -f core conftest.err conftest.$ac_objext \
8031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008032
8033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8035$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008036
8037if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008038ac_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 +02008039if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008040
Matthias Kloseb9621712010-04-24 17:59:49 +00008041$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008042
8043fi
8044
8045
8046
8047 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 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 +02008049if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008050
Matthias Kloseb9621712010-04-24 17:59:49 +00008051$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008052
8053fi
8054
8055
8056 fi
8057fi
8058
Michael W. Hudson54241132001-12-07 15:38:26 +00008059
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008060# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8061# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8062SAVE_CFLAGS=$CFLAGS
8063CFLAGS="-std=c99 $CFLAGS"
8064for ac_header in bluetooth/bluetooth.h
8065do :
8066 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8067if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8068 cat >>confdefs.h <<_ACEOF
8069#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8070_ACEOF
8071
8072fi
8073
8074done
8075
8076CFLAGS=$SAVE_CFLAGS
8077
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008078# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8079for ac_header in net/if.h
8080do :
8081 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8082#ifdef STDC_HEADERS
8083# include <stdlib.h>
8084# include <stddef.h>
8085#else
8086# ifdef HAVE_STDLIB_H
8087# include <stdlib.h>
8088# endif
8089#endif
8090#ifdef HAVE_SYS_SOCKET_H
8091# include <sys/socket.h>
8092#endif
8093
8094"
Victor Stinnere0be4232011-10-25 13:06:09 +02008095if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008096 cat >>confdefs.h <<_ACEOF
8097#define HAVE_NET_IF_H 1
8098_ACEOF
8099
8100fi
8101
8102done
8103
8104
Martin v. Löwis11017b12006-01-14 18:12:57 +00008105# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008106for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008107do :
8108 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 +00008109#ifdef HAVE_ASM_TYPES_H
8110#include <asm/types.h>
8111#endif
8112#ifdef HAVE_SYS_SOCKET_H
8113#include <sys/socket.h>
8114#endif
8115
Matthias Kloseb9621712010-04-24 17:59:49 +00008116"
Victor Stinnere0be4232011-10-25 13:06:09 +02008117if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008118 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008119#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008120_ACEOF
8121
8122fi
8123
8124done
8125
8126
Charles-François Natali47413c12011-10-06 19:47:44 +02008127# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008128for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008129do :
8130 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8131ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8132#ifdef HAVE_SYS_SOCKET_H
8133#include <sys/socket.h>
8134#endif
8135
8136"
8137if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8138 cat >>confdefs.h <<_ACEOF
8139#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8140_ACEOF
8141
8142fi
8143
8144done
8145
8146
Guido van Rossum627b2d71993-12-24 10:39:16 +00008147# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008148was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8150$as_echo_n "checking for clock_t in time.h... " >&6; }
8151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008152/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008153#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008154
8155_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008158 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008159else
Martin v. Löwis11437992002-04-12 09:54:03 +00008160
8161
Matthias Kloseb9621712010-04-24 17:59:49 +00008162$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008163
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008164
Guido van Rossum627b2d71993-12-24 10:39:16 +00008165fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008166rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008167
Matthias Kloseb9621712010-04-24 17:59:49 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8169$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8172$as_echo_n "checking for makedev... " >&6; }
8173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008174/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008175
Jesus Cea740f53a2010-04-28 11:35:30 +00008176#if defined(MAJOR_IN_MKDEV)
8177#include <sys/mkdev.h>
8178#elif defined(MAJOR_IN_SYSMACROS)
8179#include <sys/sysmacros.h>
8180#else
8181#include <sys/types.h>
8182#endif
8183
Neal Norwitz11690112002-07-30 01:08:28 +00008184int
8185main ()
8186{
Jesus Cea740f53a2010-04-28 11:35:30 +00008187
8188 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008189 ;
8190 return 0;
8191}
Matthias Kloseb159a552010-04-25 21:00:44 +00008192
Neal Norwitz11690112002-07-30 01:08:28 +00008193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008194if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008195 ac_cv_has_makedev=yes
8196else
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008199rm -f core conftest.err conftest.$ac_objext \
8200 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8202$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008203if test "$ac_cv_has_makedev" = "yes"; then
8204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008206
8207fi
8208
Christian Heimes985ecdc2013-11-20 11:46:18 +01008209# byte swapping
8210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8211$as_echo_n "checking for le64toh... " >&6; }
8212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8213/* end confdefs.h. */
8214
8215#ifdef HAVE_ENDIAN_H
8216#include <endian.h>
8217#elif defined(HAVE_SYS_ENDIAN_H)
8218#include <sys/endian.h>
8219#endif
8220
8221int
8222main ()
8223{
8224
8225 le64toh(1)
8226 ;
8227 return 0;
8228}
8229
8230_ACEOF
8231if ac_fn_c_try_link "$LINENO"; then :
8232 ac_cv_has_le64toh=yes
8233else
8234 ac_cv_has_le64toh=no
8235fi
8236rm -f core conftest.err conftest.$ac_objext \
8237 conftest$ac_exeext conftest.$ac_ext
8238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8239$as_echo "$ac_cv_has_le64toh" >&6; }
8240if test "$ac_cv_has_le64toh" = "yes"; then
8241
8242$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8243
8244fi
8245
Martin v. Löwis399a6892002-10-04 10:22:02 +00008246# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8247# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8248# defined, but the compiler does not support pragma redefine_extname,
8249# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8250# structures (such as rlimit64) without declaring them. As a
8251# work-around, disable LFS on such configurations
8252
8253use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8255$as_echo_n "checking Solaris LFS bug... " >&6; }
8256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008257/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008258
8259#define _LARGEFILE_SOURCE 1
8260#define _FILE_OFFSET_BITS 64
8261#include <sys/resource.h>
8262
Martin v. Löwis399a6892002-10-04 10:22:02 +00008263int
8264main ()
8265{
8266struct rlimit foo;
8267 ;
8268 return 0;
8269}
8270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008272 sol_lfs_bug=no
8273else
Matthias Kloseb9621712010-04-24 17:59:49 +00008274 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8278$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008279if test "$sol_lfs_bug" = "yes"; then
8280 use_lfs=no
8281fi
8282
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008283# Don't use largefile support for GNU/Hurd
8284case $ac_sys_system in GNU*)
8285 use_lfs=no
8286esac
8287
Martin v. Löwis399a6892002-10-04 10:22:02 +00008288if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008289# Two defines needed to enable largefile support on various platforms
8290# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008291case $ac_sys_system/$ac_sys_release in
8292AIX*)
8293
8294$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8295
8296 ;;
8297esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008298
Matthias Kloseb9621712010-04-24 17:59:49 +00008299$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008300
8301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008303
Martin v. Löwis399a6892002-10-04 10:22:02 +00008304fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008305
Guido van Rossum84e7b241996-08-19 21:59:00 +00008306# Add some code to confdefs.h so that the test for off_t works on SCO
8307cat >> confdefs.h <<\EOF
8308#if defined(SCO_DS)
8309#undef _OFF_T
8310#endif
8311EOF
8312
Guido van Rossumef2255b2000-03-10 22:30:29 +00008313# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008314ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008315if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008316
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008317else
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
8319cat >>confdefs.h <<_ACEOF
8320#define mode_t int
8321_ACEOF
8322
8323fi
8324
Matthias Kloseb9621712010-04-24 17:59:49 +00008325ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008326if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008328else
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
8330cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008332_ACEOF
8333
8334fi
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008337if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008338
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008339else
Martin v. Löwis11437992002-04-12 09:54:03 +00008340
8341cat >>confdefs.h <<_ACEOF
8342#define pid_t int
8343_ACEOF
8344
8345fi
8346
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008347
Martin v. Löwis11437992002-04-12 09:54:03 +00008348cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008349#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008350_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008353if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008354
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008355else
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
8357cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008359_ACEOF
8360
8361fi
8362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8364$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008365if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008367else
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008369/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008370#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008371
8372_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008375 ac_cv_type_uid_t=yes
8376else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008377 ac_cv_type_uid_t=no
8378fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008379rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008380
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8383$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008384if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
8388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008390
8391fi
8392
Mark Dickinson983bc162012-12-02 12:11:38 +00008393
Matthias Kloseb9621712010-04-24 17:59:49 +00008394ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008395if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008398
8399fi
8400
Stefan Krah1919b7e2012-03-21 18:25:23 +01008401ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8402if test "x$ac_cv_type___uint128_t" = xyes; then :
8403
8404$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8405
8406fi
8407
Jack Jansendd19cf82001-12-06 22:36:17 +00008408
Michael W. Hudson54241132001-12-07 15:38:26 +00008409# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008410# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411# The cast to long int works around a bug in the HP C Compiler
8412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8414# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8416$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008417if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008419else
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 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 +00008421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422else
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 if test "$ac_cv_type_int" = yes; then
8424 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8425$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008426as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008427See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 else
8429 ac_cv_sizeof_int=0
8430 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8435$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436
8437
8438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008440#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008441_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008442
8443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444# The cast to long int works around a bug in the HP C Compiler
8445# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8446# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8447# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8449$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008450if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008452else
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 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 +00008454
Martin v. Löwis11437992002-04-12 09:54:03 +00008455else
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 if test "$ac_cv_type_long" = yes; then
8457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008459as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008460See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 else
8462 ac_cv_sizeof_long=0
8463 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008465
Martin v. Löwis11437992002-04-12 09:54:03 +00008466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8468$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469
8470
8471
Martin v. Löwis11437992002-04-12 09:54:03 +00008472cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008473#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008474_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008475
8476
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477# The cast to long int works around a bug in the HP C Compiler
8478# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8479# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8480# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8482$as_echo_n "checking size of long long... " >&6; }
8483if ${ac_cv_sizeof_long_long+:} false; then :
8484 $as_echo_n "(cached) " >&6
8485else
8486 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8487
8488else
8489 if test "$ac_cv_type_long_long" = yes; then
8490 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8492as_fn_error 77 "cannot compute sizeof (long long)
8493See \`config.log' for more details" "$LINENO" 5; }
8494 else
8495 ac_cv_sizeof_long_long=0
8496 fi
8497fi
8498
8499fi
8500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8501$as_echo "$ac_cv_sizeof_long_long" >&6; }
8502
8503
8504
8505cat >>confdefs.h <<_ACEOF
8506#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8507_ACEOF
8508
8509
8510# The cast to long int works around a bug in the HP C Compiler
8511# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8512# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8513# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8515$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008516if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008518else
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 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 +00008520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521else
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 if test "$ac_cv_type_void_p" = yes; then
8523 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8524$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008525as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008526See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008527 else
8528 ac_cv_sizeof_void_p=0
8529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008531
Martin v. Löwis11437992002-04-12 09:54:03 +00008532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8534$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535
8536
8537
Martin v. Löwis11437992002-04-12 09:54:03 +00008538cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008539#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008540_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008541
8542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543# The cast to long int works around a bug in the HP C Compiler
8544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8546# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8548$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008549if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008551else
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 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 +00008553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 if test "$ac_cv_type_short" = yes; then
8556 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8557$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008558as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008559See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 else
8561 ac_cv_sizeof_short=0
8562 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8567$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568
8569
8570
Martin v. Löwis11437992002-04-12 09:54:03 +00008571cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008572#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008573_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008574
8575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576# The cast to long int works around a bug in the HP C Compiler
8577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8579# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8581$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008582if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008584else
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 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 +00008586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 if test "$ac_cv_type_float" = yes; then
8589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008591as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008592See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593 else
8594 ac_cv_sizeof_float=0
8595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8600$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601
8602
8603
Martin v. Löwis11437992002-04-12 09:54:03 +00008604cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008605#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008606_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008607
8608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609# The cast to long int works around a bug in the HP C Compiler
8610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8612# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8614$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008615if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008617else
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 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 +00008619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 if test "$ac_cv_type_double" = yes; then
8622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008624as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008625See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626 else
8627 ac_cv_sizeof_double=0
8628 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630
Martin v. Löwis11437992002-04-12 09:54:03 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8633$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634
8635
8636
Martin v. Löwis11437992002-04-12 09:54:03 +00008637cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008638#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008639_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008640
8641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642# The cast to long int works around a bug in the HP C Compiler
8643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8645# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8647$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008648if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008650else
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 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 +00008652
Martin v. Löwis11437992002-04-12 09:54:03 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 if test "$ac_cv_type_fpos_t" = yes; then
8655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008657as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008658See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659 else
8660 ac_cv_sizeof_fpos_t=0
8661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8666$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667
8668
8669
Martin v. Löwis11437992002-04-12 09:54:03 +00008670cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008671#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008672_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008673
Michael W. Hudson54241132001-12-07 15:38:26 +00008674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675# The cast to long int works around a bug in the HP C Compiler
8676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8680$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008681if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008683else
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 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 +00008685
Martin v. Löwis18e16552006-02-15 17:27:45 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 if test "$ac_cv_type_size_t" = yes; then
8688 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008690as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008691See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692 else
8693 ac_cv_sizeof_size_t=0
8694 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696
Martin v. Löwis18e16552006-02-15 17:27:45 +00008697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8699$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700
8701
8702
Martin v. Löwis18e16552006-02-15 17:27:45 +00008703cat >>confdefs.h <<_ACEOF
8704#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8705_ACEOF
8706
8707
Christian Heimes400adb02008-02-01 08:12:03 +00008708# The cast to long int works around a bug in the HP C Compiler
8709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8711# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8713$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008714if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008716else
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 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 +00008718
Christian Heimes400adb02008-02-01 08:12:03 +00008719else
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 if test "$ac_cv_type_pid_t" = yes; then
8721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008723as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008724See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008725 else
8726 ac_cv_sizeof_pid_t=0
8727 fi
8728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729
Christian Heimes400adb02008-02-01 08:12:03 +00008730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8732$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008733
8734
8735
8736cat >>confdefs.h <<_ACEOF
8737#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8738_ACEOF
8739
8740
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008741# The cast to long int works around a bug in the HP C Compiler
8742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8744# This bug is HP SR number 8606223364.
8745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8746$as_echo_n "checking size of uintptr_t... " >&6; }
8747if ${ac_cv_sizeof_uintptr_t+:} false; then :
8748 $as_echo_n "(cached) " >&6
8749else
8750 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8751
8752else
8753 if test "$ac_cv_type_uintptr_t" = yes; then
8754 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8756as_fn_error 77 "cannot compute sizeof (uintptr_t)
8757See \`config.log' for more details" "$LINENO" 5; }
8758 else
8759 ac_cv_sizeof_uintptr_t=0
8760 fi
8761fi
8762
8763fi
8764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8765$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8766
8767
8768
8769cat >>confdefs.h <<_ACEOF
8770#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8771_ACEOF
8772
8773
Michael W. Hudson54241132001-12-07 15:38:26 +00008774
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8776$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008777have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008779/* end confdefs.h. */
8780
8781int
8782main ()
8783{
8784long double x; x = (long double)0;
8785 ;
8786 return 0;
8787}
8788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008789if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008790
8791
Matthias Kloseb9621712010-04-24 17:59:49 +00008792$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008793
8794 have_long_double=yes
8795
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008796fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8799$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008800if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008801# The cast to long int works around a bug in the HP C Compiler
8802# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8803# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8804# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8806$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008807if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 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 +00008811
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008812else
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 if test "$ac_cv_type_long_double" = yes; then
8814 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008816as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008817See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008818 else
8819 ac_cv_sizeof_long_double=0
8820 fi
8821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8825$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008826
8827
8828
8829cat >>confdefs.h <<_ACEOF
8830#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8831_ACEOF
8832
8833
8834fi
8835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836# The cast to long int works around a bug in the HP C Compiler
8837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8839# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8841$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008842if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008844else
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 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 +00008846
Thomas Woutersb2137042007-02-01 18:02:27 +00008847else
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 if test "$ac_cv_type__Bool" = yes; then
8849 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008851as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008852See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853 else
8854 ac_cv_sizeof__Bool=0
8855 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008857
Thomas Woutersb2137042007-02-01 18:02:27 +00008858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8860$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008861
8862
8863
Thomas Woutersb2137042007-02-01 18:02:27 +00008864cat >>confdefs.h <<_ACEOF
8865#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8866_ACEOF
8867
8868
Thomas Woutersb2137042007-02-01 18:02:27 +00008869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870# The cast to long int works around a bug in the HP C Compiler
8871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8873# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8875$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008876if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880#ifdef HAVE_SYS_TYPES_H
8881#include <sys/types.h>
8882#endif
8883
Matthias Kloseb9621712010-04-24 17:59:49 +00008884"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008885
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008886else
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 if test "$ac_cv_type_off_t" = yes; then
8888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008890as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008891See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892 else
8893 ac_cv_sizeof_off_t=0
8894 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008896
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8899$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901
8902
Martin v. Löwis11437992002-04-12 09:54:03 +00008903cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008904#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008905_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008906
Michael W. Hudson54241132001-12-07 15:38:26 +00008907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908
Matthias Kloseb9621712010-04-24 17:59:49 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8910$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008911if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008912 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008913
Matthias Kloseb9621712010-04-24 17:59:49 +00008914$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8917$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008918else
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8920$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008921fi
8922
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008923# The cast to long int works around a bug in the HP C Compiler
8924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8926# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8928$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008929if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008930 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931else
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008933#ifdef HAVE_SYS_TYPES_H
8934#include <sys/types.h>
8935#endif
8936#ifdef HAVE_TIME_H
8937#include <time.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_time_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 (time_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_time_t=0
8950 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008952
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8955$as_echo "$ac_cv_sizeof_time_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
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008960#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008961_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008962
Michael W. Hudson54241132001-12-07 15:38:26 +00008963
8964
Trent Mick635f6fb2000-08-23 21:33:05 +00008965# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008966ac_save_cc="$CC"
8967if test "$ac_cv_kpthread" = "yes"
8968then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008969elif test "$ac_cv_kthread" = "yes"
8970then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008971elif test "$ac_cv_pthread" = "yes"
8972then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008973fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974
Matthias Kloseb9621712010-04-24 17:59:49 +00008975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8976$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008977have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008979/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008980
8981 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008982int
8983main ()
8984{
Guido van Rossum12580492000-09-24 16:47:19 +00008985pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 ;
8987 return 0;
8988}
Matthias Kloseb159a552010-04-25 21:00:44 +00008989
Martin v. Löwis11437992002-04-12 09:54:03 +00008990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008991if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008992 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8996$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008997if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008999# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9000# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9001# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9003$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009004if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009006else
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009008#ifdef HAVE_PTHREAD_H
9009#include <pthread.h>
9010#endif
9011
Matthias Kloseb9621712010-04-24 17:59:49 +00009012"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009013
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009014else
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 if test "$ac_cv_type_pthread_t" = yes; then
9016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009018as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009019See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009020 else
9021 ac_cv_sizeof_pthread_t=0
9022 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009024
Trent Mick635f6fb2000-08-23 21:33:05 +00009025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9027$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009029
9030
Martin v. Löwis11437992002-04-12 09:54:03 +00009031cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009032#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009033_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009034
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009035
Trent Mick635f6fb2000-08-23 21:33:05 +00009036fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009037CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009038
Michael W. Hudson54241132001-12-07 15:38:26 +00009039
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009040case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009041 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009042 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9043 ;;
9044 Darwin/*)
9045 OTHER_LIBTOOL_OPT=""
9046 ;;
9047esac
9048
9049
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009050
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009051case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009052 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009053 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9054 if test "${enable_universalsdk}"; then
9055 :
9056 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009057 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009058 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009059 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009060 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009061 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009062 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009063 if test ${gcc_version} '<' 4.0
9064 then
9065 LIBTOOL_CRUFT="-lcc_dynamic"
9066 else
9067 LIBTOOL_CRUFT=""
9068 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009070 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009071else
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009073/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009074
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009075 #include <unistd.h>
9076 int main(int argc, char*argv[])
9077 {
9078 if (sizeof(long) == 4) {
9079 return 0;
9080 } else {
9081 return 1;
9082 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009083 }
9084
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009086if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009087 ac_osx_32bit=yes
9088else
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009093fi
9094
9095
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009096 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009097 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009098 i386)
9099 MACOSX_DEFAULT_ARCH="i386"
9100 ;;
9101 ppc)
9102 MACOSX_DEFAULT_ARCH="ppc"
9103 ;;
9104 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009105 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009106 ;;
9107 esac
9108 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009109 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009110 i386)
9111 MACOSX_DEFAULT_ARCH="x86_64"
9112 ;;
9113 ppc)
9114 MACOSX_DEFAULT_ARCH="ppc64"
9115 ;;
9116 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009117 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009118 ;;
9119 esac
9120
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009121 fi
9122
9123 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009124 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009125 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009126esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9128$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009129if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009130then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009131 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009133 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009136
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9138$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009139 if test $enable_shared = "yes"
9140 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009141 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 +00009142 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009143else
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9145$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009146fi
9147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9149$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009150case $ac_sys_system/$ac_sys_release in
9151 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009152
Matthias Kloseb9621712010-04-24 17:59:49 +00009153$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009154
Matthias Kloseb9621712010-04-24 17:59:49 +00009155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9156$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009157 ;;
9158 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9160$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009161 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009162esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009163
Guido van Rossum0a516c91994-09-12 10:58:40 +00009164# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009165
Michael W. Hudson54241132001-12-07 15:38:26 +00009166
9167
9168
9169
Benjamin Peterson99f03762010-04-11 22:15:28 +00009170
Thomas Wouters477c8d52006-05-27 19:21:47 +00009171
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009172# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9173# -- usually .so, .sl on HP-UX, .dll on Cygwin
9174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9175$as_echo_n "checking the extension of shared libraries... " >&6; }
9176if test -z "$SHLIB_SUFFIX"; then
9177 case $ac_sys_system in
9178 hp*|HP*)
9179 case `uname -m` in
9180 ia64) SHLIB_SUFFIX=.so;;
9181 *) SHLIB_SUFFIX=.sl;;
9182 esac
9183 ;;
9184 CYGWIN*) SHLIB_SUFFIX=.dll;;
9185 *) SHLIB_SUFFIX=.so;;
9186 esac
9187fi
9188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9189$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009190
Guido van Rossum0a516c91994-09-12 10:58:40 +00009191# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009192# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009193# (Shared libraries in this instance are shared modules to be loaded into
9194# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9196$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009197if test -z "$LDSHARED"
9198then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009199 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009200 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009201 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009202 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009203 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009204 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009205 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009207 if test "$GCC" = "yes" ; then
9208 LDSHARED='$(CC) -shared'
9209 LDCXXSHARED='$(CXX) -shared'
9210 else
9211 LDSHARED='$(CC) -G'
9212 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009213 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009214 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009215 if test "$GCC" = "yes" ; then
9216 LDSHARED='$(CC) -shared'
9217 LDCXXSHARED='$(CXX) -shared'
9218 else
9219 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009220 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009221 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009222 LDSHARED='$(CC) -bundle'
9223 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009224 if test "$enable_framework" ; then
9225 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009226 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9227 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009228 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009229 else
9230 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009231 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009232 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009233 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009234 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009235 LDSHARED='$(CC) -bundle'
9236 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009237 if test "$enable_framework" ; then
9238 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009239 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9240 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009241 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009242 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009243 # No framework, use the Python app as bundle-loader
9244 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009245 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009246 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009247 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009248 Darwin/*)
9249 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9250 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009251
Ned Deily36820b62014-06-25 13:44:22 -07009252 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9253 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9254 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9255 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9256 if test ${dep_target_major} -eq 10 && \
9257 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009258 then
Ned Deily36820b62014-06-25 13:44:22 -07009259 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009260 LDSHARED='$(CC) -bundle'
9261 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009262 if test "$enable_framework" ; then
9263 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009264 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9265 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009266 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009267 else
9268 # No framework, use the Python app as bundle-loader
9269 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9270 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009271 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009272 fi
Ned Deily36820b62014-06-25 13:44:22 -07009273 else
9274 # building for OS X 10.3 and later
9275 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9276 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9277 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009278 fi
9279 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009280 Linux*|GNU*|QNX*)
9281 LDSHARED='$(CC) -shared'
9282 LDCXXSHARED='$(CXX) -shared';;
9283 BSD/OS*/4*)
9284 LDSHARED="gcc -shared"
9285 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009286 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009287 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009288 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009289 LDSHARED='$(CC) -shared'
9290 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009291 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009292 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009293 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009294 OpenBSD*)
9295 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9296 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009297 LDSHARED='$(CC) -shared $(CCSHARED)'
9298 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009299 else
9300 case `uname -r` in
9301 [01].* | 2.[0-7] | 2.[0-7].*)
9302 LDSHARED="ld -Bshareable ${LDFLAGS}"
9303 ;;
9304 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009305 LDSHARED='$(CC) -shared $(CCSHARED)'
9306 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009307 ;;
9308 esac
9309 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009310 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009311 LDSHARED='$(CC) -shared'
9312 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009313 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009314 if test "$GCC" = "yes" ; then
9315 LDSHARED='$(CC) -shared'
9316 LDCXXSHARED='$(CXX) -shared'
9317 else
9318 LDSHARED='$(CC) -G'
9319 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009320 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009321 SCO_SV*)
9322 LDSHARED='$(CC) -Wl,-G,-Bexport'
9323 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9324 CYGWIN*)
9325 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9326 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327 *) LDSHARED="ld";;
9328 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9331$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009332LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009333BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009335# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9337$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009338if test -z "$CCSHARED"
9339then
Guido van Rossum07397971997-04-29 21:49:50 +00009340 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009341 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009342 then CCSHARED="-fPIC";
9343 elif test `uname -p` = sparc;
9344 then CCSHARED="-xcode=pic32";
9345 else CCSHARED="-Kpic";
9346 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009347 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009348 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009349 else CCSHARED="+z";
9350 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009351 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009352 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009353 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009354 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009355 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009356 if test "$GCC" = "yes"
9357 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009358 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009359 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009360 SCO_SV*)
9361 if test "$GCC" = "yes"
9362 then CCSHARED="-fPIC"
9363 else CCSHARED="-Kpic -belf"
9364 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009365 IRIX*/6*) case $CC in
9366 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009367 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009368 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009369 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9372$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009374# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9376$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009377if test -z "$LINKFORSHARED"
9378then
Guido van Rossum07397971997-04-29 21:49:50 +00009379 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009380 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009381 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009382 LINKFORSHARED="-Wl,-E -Wl,+s";;
9383# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009384 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009385 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009386 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009387 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009389 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009390
9391 # Issue #18075: the default maximum stack size (8MBytes) is too
9392 # small for the default recursion limit. Increase the stack size
9393 # to ensure that tests don't crash
9394 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9395
Jack Jansene578a632001-08-15 01:27:14 +00009396 if test "$enable_framework"
9397 then
Jack Jansenda49e192005-01-07 13:08:22 +00009398 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009399 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009400 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009401 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009402 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009403 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009404 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009405 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9406 then
9407 LINKFORSHARED="-Wl,--export-dynamic"
9408 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009409 SunOS/5*) case $CC in
9410 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009411 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009412 then
9413 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009414 fi;;
9415 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009416 CYGWIN*)
9417 if test $enable_shared = "no"
9418 then
9419 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9420 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009421 QNX*)
9422 # -Wl,-E causes the symbols to be added to the dynamic
9423 # symbol table so that they can be found when a module
9424 # is loaded. -N 2048K causes the stack size to be set
9425 # to 2048 kilobytes so that the stack doesn't overflow
9426 # when running test_compile.py.
9427 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009428 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9431$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009432
Michael W. Hudson54241132001-12-07 15:38:26 +00009433
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009434
Matthias Kloseb9621712010-04-24 17:59:49 +00009435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9436$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009437if test ! "$LIBRARY" = "$LDLIBRARY"
9438then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009439 case $ac_sys_system in
9440 CYGWIN*)
9441 # Cygwin needs CCSHARED when building extension DLLs
9442 # but not when building the interpreter DLL.
9443 CFLAGSFORSHARED='';;
9444 *)
9445 CFLAGSFORSHARED='$(CCSHARED)'
9446 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9449$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009450
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009451# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9452# library (with --enable-shared).
9453# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009454# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9455# if it is not required, since it creates a dependency of the shared library
9456# to LIBS. This, in turn, means that applications linking the shared libpython
9457# don't need to link LIBS explicitly. The default should be only changed
9458# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009459
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9461$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009462case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009463 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009464 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009465esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9467$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009468
9469
Guido van Rossum627b2d71993-12-24 10:39:16 +00009470# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9472$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009473if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009474 $as_echo_n "(cached) " >&6
9475else
9476 ac_check_lib_save_LIBS=$LIBS
9477LIBS="-lsendfile $LIBS"
9478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9479/* end confdefs.h. */
9480
9481/* Override any GCC internal prototype to avoid an error.
9482 Use char because int might match the return type of a GCC
9483 builtin and then its argument prototype would still apply. */
9484#ifdef __cplusplus
9485extern "C"
9486#endif
9487char sendfile ();
9488int
9489main ()
9490{
9491return sendfile ();
9492 ;
9493 return 0;
9494}
9495_ACEOF
9496if ac_fn_c_try_link "$LINENO"; then :
9497 ac_cv_lib_sendfile_sendfile=yes
9498else
9499 ac_cv_lib_sendfile_sendfile=no
9500fi
9501rm -f core conftest.err conftest.$ac_objext \
9502 conftest$ac_exeext conftest.$ac_ext
9503LIBS=$ac_check_lib_save_LIBS
9504fi
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9506$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009507if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009508 cat >>confdefs.h <<_ACEOF
9509#define HAVE_LIBSENDFILE 1
9510_ACEOF
9511
9512 LIBS="-lsendfile $LIBS"
9513
9514fi
9515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9517$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009518if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009522LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526/* Override any GCC internal prototype to avoid an error.
9527 Use char because int might match the return type of a GCC
9528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529#ifdef __cplusplus
9530extern "C"
9531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009532char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009533int
9534main ()
9535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ;
9538 return 0;
9539}
9540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9551$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009552if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 cat >>confdefs.h <<_ACEOF
9554#define HAVE_LIBDL 1
9555_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009556
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009557 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009558
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009559fi
9560 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9562$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009563if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009564 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009565else
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009567LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571/* Override any GCC internal prototype to avoid an error.
9572 Use char because int might match the return type of a GCC
9573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009574#ifdef __cplusplus
9575extern "C"
9576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009577char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009578int
9579main ()
9580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 ;
9583 return 0;
9584}
9585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009586if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009588else
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009591rm -f core conftest.err conftest.$ac_objext \
9592 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009593LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9596$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009597if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 cat >>confdefs.h <<_ACEOF
9599#define HAVE_LIBDLD 1
9600_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009601
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009602 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009603
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009604fi
9605 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009606
Georg Brandlb1441c72009-01-03 22:33:39 +00009607# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009608if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9610$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009611if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009613else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009614 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618/* Override any GCC internal prototype to avoid an error.
9619 Use char because int might match the return type of a GCC
9620 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009621#ifdef __cplusplus
9622extern "C"
9623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009624char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009625int
9626main ()
9627{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 ;
9630 return 0;
9631}
9632_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633for ac_lib in '' pthread rt posix4; do
9634 if test -z "$ac_lib"; then
9635 ac_res="none required"
9636 else
9637 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009638 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009640 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009643rm -f core conftest.err conftest.$ac_objext \
9644 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009645 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648done
Victor Stinnere0be4232011-10-25 13:06:09 +02009649if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651else
9652 ac_cv_search_sem_init=no
9653fi
9654rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009655LIBS=$ac_func_search_save_LIBS
9656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9658$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009660if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009662
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009663fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009664 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009665 # posix4 on Solaris 2.6
9666 # pthread (first!) on Linux
9667fi
9668
Martin v. Löwis19d17342003-06-14 21:03:05 +00009669# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9671$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009672if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009674else
9675 ac_check_lib_save_LIBS=$LIBS
9676LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009678/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680/* Override any GCC internal prototype to avoid an error.
9681 Use char because int might match the return type of a GCC
9682 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009683#ifdef __cplusplus
9684extern "C"
9685#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009686char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009687int
9688main ()
9689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009691 ;
9692 return 0;
9693}
9694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009696 ac_cv_lib_intl_textdomain=yes
9697else
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009700rm -f core conftest.err conftest.$ac_objext \
9701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009702LIBS=$ac_check_lib_save_LIBS
9703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9705$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009706if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009707
Matthias Kloseb9621712010-04-24 17:59:49 +00009708$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009709
Brett Cannonc6d936e2009-06-07 20:09:53 +00009710 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009711fi
9712
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009713
9714# checks for system dependent C++ extensions support
9715case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9717$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009719/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009720
Georg Brandl59e87bd2011-02-15 19:48:59 +00009721 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009722int
9723main ()
9724{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009725loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ;
9727 return 0;
9728}
Matthias Kloseb159a552010-04-25 21:00:44 +00009729
Martin v. Löwis11437992002-04-12 09:54:03 +00009730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009731if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009732
Matthias Kloseb159a552010-04-25 21:00:44 +00009733
Matthias Kloseb9621712010-04-24 17:59:49 +00009734$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009735
Matthias Kloseb159a552010-04-25 21:00:44 +00009736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009737$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009738
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009739else
Matthias Kloseb159a552010-04-25 21:00:44 +00009740
9741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009742$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009743
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009745rm -f core conftest.err conftest.$ac_objext \
9746 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009747 *) ;;
9748esac
9749
Christian Heimes985ecdc2013-11-20 11:46:18 +01009750# check for systems that require aligned memory access
9751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9752$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009753if ${ac_cv_aligned_required+:} false; then :
9754 $as_echo_n "(cached) " >&6
9755else
9756 if test "$cross_compiling" = yes; then :
9757 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009758else
9759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9760/* end confdefs.h. */
9761
9762int main()
9763{
9764 char s[16];
9765 int i, *p1, *p2;
9766 for (i=0; i < 16; i++)
9767 s[i] = i;
9768 p1 = (int*)(s+1);
9769 p2 = (int*)(s+2);
9770 if (*p1 == *p2)
9771 return 1;
9772 return 0;
9773}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009774_ACEOF
9775if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009776 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009777else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009778 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009779fi
9780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9781 conftest.$ac_objext conftest.beam conftest.$ac_ext
9782fi
9783
9784
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009785fi
9786
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9788$as_echo "$ac_cv_aligned_required" >&6; }
9789if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009790
9791$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9792
9793fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009794
9795# str, bytes and memoryview hash algorithm
9796
9797
9798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9799$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9800
9801# Check whether --with-hash_algorithm was given.
9802if test "${with_hash_algorithm+set}" = set; then :
9803 withval=$with_hash_algorithm;
9804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9805$as_echo "$withval" >&6; }
9806case "$withval" in
9807 siphash24)
9808 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9809
9810 ;;
9811 fnv)
9812 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9813
9814 ;;
9815 *)
9816 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9817 ;;
9818esac
9819
9820else
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9822$as_echo "default" >&6; }
9823fi
9824
9825
Charles-François Natalid30b0222014-05-08 23:08:51 +01009826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9827$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9828
9829# Check whether --with-address_sanitizer was given.
9830if test "${with_address_sanitizer+set}" = set; then :
9831 withval=$with_address_sanitizer;
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9833$as_echo "$withval" >&6; }
9834BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9835LDFLAGS="-fsanitize=address $LDFLAGS"
9836
9837else
9838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9839$as_echo "no" >&6; }
9840fi
9841
9842
Guido van Rossum70c7f481998-03-26 18:44:10 +00009843# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9845$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009846if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009848else
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009850LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854/* Override any GCC internal prototype to avoid an error.
9855 Use char because int might match the return type of a GCC
9856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009857#ifdef __cplusplus
9858extern "C"
9859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009860char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009861int
9862main ()
9863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 ;
9866 return 0;
9867}
9868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009869if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009871else
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009874rm -f core conftest.err conftest.$ac_objext \
9875 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009876LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9879$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009880if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009881 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009882fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009883 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9885$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009886if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009888else
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009890LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894/* Override any GCC internal prototype to avoid an error.
9895 Use char because int might match the return type of a GCC
9896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009897#ifdef __cplusplus
9898extern "C"
9899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009900char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009901int
9902main ()
9903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009905 ;
9906 return 0;
9907}
9908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009910 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009911else
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009914rm -f core conftest.err conftest.$ac_objext \
9915 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009916LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9919$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009920if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009921 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009922fi
9923 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009924
Matthias Kloseb9621712010-04-24 17:59:49 +00009925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9926$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009929if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9932$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009933LIBS="$withval $LIBS"
9934
9935else
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938fi
9939
Guido van Rossum7f43da71994-08-01 12:15:30 +00009940
Victor Stinner8291b5e2015-03-20 16:03:14 +01009941
9942
9943
9944
9945
9946
9947
9948if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9949 if test -n "$ac_tool_prefix"; then
9950 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9951set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9953$as_echo_n "checking for $ac_word... " >&6; }
9954if ${ac_cv_path_PKG_CONFIG+:} false; then :
9955 $as_echo_n "(cached) " >&6
9956else
9957 case $PKG_CONFIG in
9958 [\\/]* | ?:[\\/]*)
9959 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9960 ;;
9961 *)
9962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9963for as_dir in $PATH
9964do
9965 IFS=$as_save_IFS
9966 test -z "$as_dir" && as_dir=.
9967 for ac_exec_ext in '' $ac_executable_extensions; do
9968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9969 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9971 break 2
9972 fi
9973done
9974 done
9975IFS=$as_save_IFS
9976
9977 ;;
9978esac
9979fi
9980PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9981if test -n "$PKG_CONFIG"; then
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9983$as_echo "$PKG_CONFIG" >&6; }
9984else
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9986$as_echo "no" >&6; }
9987fi
9988
9989
9990fi
9991if test -z "$ac_cv_path_PKG_CONFIG"; then
9992 ac_pt_PKG_CONFIG=$PKG_CONFIG
9993 # Extract the first word of "pkg-config", so it can be a program name with args.
9994set dummy pkg-config; ac_word=$2
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9996$as_echo_n "checking for $ac_word... " >&6; }
9997if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9998 $as_echo_n "(cached) " >&6
9999else
10000 case $ac_pt_PKG_CONFIG in
10001 [\\/]* | ?:[\\/]*)
10002 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10003 ;;
10004 *)
10005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10006for as_dir in $PATH
10007do
10008 IFS=$as_save_IFS
10009 test -z "$as_dir" && as_dir=.
10010 for ac_exec_ext in '' $ac_executable_extensions; do
10011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10012 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10014 break 2
10015 fi
10016done
10017 done
10018IFS=$as_save_IFS
10019
10020 ;;
10021esac
10022fi
10023ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10024if test -n "$ac_pt_PKG_CONFIG"; then
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10026$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10027else
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029$as_echo "no" >&6; }
10030fi
10031
10032 if test "x$ac_pt_PKG_CONFIG" = x; then
10033 PKG_CONFIG=""
10034 else
10035 case $cross_compiling:$ac_tool_warned in
10036yes:)
10037{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10038$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10039ac_tool_warned=yes ;;
10040esac
10041 PKG_CONFIG=$ac_pt_PKG_CONFIG
10042 fi
10043else
10044 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10045fi
10046
10047fi
10048if test -n "$PKG_CONFIG"; then
10049 _pkg_min_version=0.9.0
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10051$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10052 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10054$as_echo "yes" >&6; }
10055 else
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
10058 PKG_CONFIG=""
10059 fi
10060fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010061
10062# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10064$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010065
10066# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010068 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010069else
10070 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010071fi
10072
10073
Matthias Kloseb9621712010-04-24 17:59:49 +000010074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10075$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010076
10077# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10079$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010080
10081# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010082if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010083 withval=$with_system_ffi;
10084fi
10085
10086
Zachary Waref40d4dd2016-09-17 01:25:24 -050010087if test "$ac_sys_system" = "Darwin"
10088then
10089 case "$with_system_ffi" in
10090 "")
10091 with_system_ffi="no"
10092 ;;
10093 yes|no)
10094 ;;
10095 *)
10096 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10097 ;;
10098 esac
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10100$as_echo "$with_system_ffi" >&6; }
10101else
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10103$as_echo "yes" >&6; }
10104 if test "$with_system_ffi" != ""
10105 then
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10107$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10108 fi
10109 with_system_ffi="yes"
10110fi
Zachary Ware935043d2016-09-09 17:01:21 -070010111
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010112if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010113 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10114else
10115 LIBFFI_INCLUDEDIR=""
10116fi
10117
10118
Stefan Krah60187b52012-03-23 19:06:27 +010010119# Check for use of the system libmpdec library
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10121$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10122
10123# Check whether --with-system_libmpdec was given.
10124if test "${with_system_libmpdec+set}" = set; then :
10125 withval=$with_system_libmpdec;
10126else
10127 with_system_libmpdec="no"
10128fi
10129
10130
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10132$as_echo "$with_system_libmpdec" >&6; }
10133
Benjamin Peterson076ed002010-10-31 17:11:02 +000010134# Check for support for loadable sqlite extensions
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10136$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10137# Check whether --enable-loadable-sqlite-extensions was given.
10138if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10139 enableval=$enable_loadable_sqlite_extensions;
10140else
10141 enable_loadable_sqlite_extensions="no"
10142fi
10143
10144
10145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10146$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10147
Ned Deilyd819b932013-09-06 01:07:05 -070010148# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10149
10150
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10152$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10153
10154# Check whether --with-tcltk-includes was given.
10155if test "${with_tcltk_includes+set}" = set; then :
10156 withval=$with_tcltk_includes;
10157else
10158 with_tcltk_includes="default"
10159fi
10160
10161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10162$as_echo "$with_tcltk_includes" >&6; }
10163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10164$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10165
10166# Check whether --with-tcltk-libs was given.
10167if test "${with_tcltk_libs+set}" = set; then :
10168 withval=$with_tcltk_libs;
10169else
10170 with_tcltk_libs="default"
10171fi
10172
10173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10174$as_echo "$with_tcltk_libs" >&6; }
10175if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10176then
10177 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10178 then
10179 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10180 fi
10181 TCLTK_INCLUDES=""
10182 TCLTK_LIBS=""
10183else
10184 TCLTK_INCLUDES="$with_tcltk_includes"
10185 TCLTK_LIBS="$with_tcltk_libs"
10186fi
10187
Matthias Klose55708cc2009-04-30 08:06:49 +000010188# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10190$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010191
10192# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010193if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010194 withval=$with_dbmliborder;
10195if test x$with_dbmliborder = xyes
10196then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010197as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010198else
10199 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10200 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10201 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010202 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010203 fi
10204 done
10205fi
10206fi
10207
Matthias Kloseb9621712010-04-24 17:59:49 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10209$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010210
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010211# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010212
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010213USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215
Martin v. Löwis11437992002-04-12 09:54:03 +000010216
10217# Templates for things AC_DEFINEd more than once.
10218# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010219
10220
Martin v. Löwis11437992002-04-12 09:54:03 +000010221
Matthias Kloseb9621712010-04-24 17:59:49 +000010222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10223$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010226if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 withval=$with_threads;
10228fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010229
10230
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010231# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010233# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010234if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010235 withval=$with_thread; with_threads=$with_thread
10236fi
10237
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010238
10239if test -z "$with_threads"
10240then with_threads="yes"
10241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10243$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010244
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010245
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010246if test "$with_threads" = "no"
10247then
10248 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010249elif test "$ac_cv_pthread_is_default" = yes
10250then
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010252
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010253 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010255
10256 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010258elif test "$ac_cv_kpthread" = "yes"
10259then
10260 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010261 if test "$ac_cv_cxx_thread" = "yes"; then
10262 CXX="$CXX -Kpthread"
10263 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010265
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010266 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010267 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010268elif test "$ac_cv_kthread" = "yes"
10269then
10270 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010271 if test "$ac_cv_cxx_thread" = "yes"; then
10272 CXX="$CXX -Kthread"
10273 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010275
10276 posix_threads=yes
10277 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010278elif test "$ac_cv_pthread" = "yes"
10279then
10280 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010281 if test "$ac_cv_cxx_thread" = "yes"; then
10282 CXX="$CXX -pthread"
10283 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010285
10286 posix_threads=yes
10287 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010288else
10289 if test ! -z "$with_threads" -a -d "$with_threads"
10290 then LDFLAGS="$LDFLAGS -L$with_threads"
10291 fi
10292 if test ! -z "$withval" -a -d "$withval"
10293 then LDFLAGS="$LDFLAGS -L$withval"
10294 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010295
10296 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010297 # define _POSIX_THREADS in unistd.h. Some apparently don't
10298 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10300$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010302/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010303
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010304#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010305#ifdef _POSIX_THREADS
10306yes
10307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010308
10309_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010312 unistd_defines_pthreads=yes
10313else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010314 unistd_defines_pthreads=no
10315fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010316rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010317
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10319$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010320
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010322
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010323 # Just looking for pthread_create in libpthread is not enough:
10324 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10325 # So we really have to include pthread.h, and then link.
10326 _libs=$LIBS
10327 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10329$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010331/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010332
10333#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010334#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010335
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010336void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010337int
10338main ()
10339{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010340
10341pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 ;
10343 return 0;
10344}
10345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10349$as_echo "yes" >&6; }
10350 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010351
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010352 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010353 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010354else
Martin v. Löwis11437992002-04-12 09:54:03 +000010355
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010356 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010357 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010358if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010359 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010360
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010361 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010362 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010363else
Guido van Rossumad678af1998-10-02 14:42:15 +000010364
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10366$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010367if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010369else
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010371LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375/* Override any GCC internal prototype to avoid an error.
10376 Use char because int might match the return type of a GCC
10377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010378#ifdef __cplusplus
10379extern "C"
10380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010381char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010382int
10383main ()
10384{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ;
10387 return 0;
10388}
10389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010390if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010392else
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010395rm -f core conftest.err conftest.$ac_objext \
10396 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010397LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10400$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010401if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010403
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010404 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010405 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010406 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010407else
Greg Steinadf63d62000-07-05 10:38:09 +000010408
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10410$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010411if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010413else
Martin v. Löwis11437992002-04-12 09:54:03 +000010414 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010415LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010419/* Override any GCC internal prototype to avoid an error.
10420 Use char because int might match the return type of a GCC
10421 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010422#ifdef __cplusplus
10423extern "C"
10424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010425char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010426int
10427main ()
10428{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 ;
10431 return 0;
10432}
10433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010434if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010436else
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010439rm -f core conftest.err conftest.$ac_objext \
10440 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010441LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10444$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010445if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010447
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010448 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010449 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010450 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010451else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010452
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10454$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010455if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010457else
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010459LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010463/* Override any GCC internal prototype to avoid an error.
10464 Use char because int might match the return type of a GCC
10465 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010466#ifdef __cplusplus
10467extern "C"
10468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010469char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010470int
10471main ()
10472{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010474 ;
10475 return 0;
10476}
10477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010478if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010479 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010480else
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010483rm -f core conftest.err conftest.$ac_objext \
10484 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010485LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10488$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010489if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010490 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010491
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010492 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010493 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010494 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010495else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010496
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10498$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010499if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010501else
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010503LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010507/* Override any GCC internal prototype to avoid an error.
10508 Use char because int might match the return type of a GCC
10509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010510#ifdef __cplusplus
10511extern "C"
10512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010513char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010514int
10515main ()
10516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010518 ;
10519 return 0;
10520}
10521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010522if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010524else
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010527rm -f core conftest.err conftest.$ac_objext \
10528 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010529LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10532$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010533if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010535
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010536 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010537 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010538 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010539else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010540
Martin v. Löwis130fb172001-07-19 11:00:41 +000010541 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010542fi
10543
Guido van Rossum627b2d71993-12-24 10:39:16 +000010544
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010545fi
10546
Guido van Rossum0be3e491997-05-22 20:33:33 +000010547fi
10548
Guido van Rossum49545951997-12-02 19:28:29 +000010549fi
10550
Guido van Rossumb93a8621998-05-07 13:27:32 +000010551fi
10552
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010554rm -f core conftest.err conftest.$ac_objext \
10555 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010556
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10558$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010559if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010561else
Martin v. Löwis11437992002-04-12 09:54:03 +000010562 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010563LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010567/* Override any GCC internal prototype to avoid an error.
10568 Use char because int might match the return type of a GCC
10569 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010570#ifdef __cplusplus
10571extern "C"
10572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010573char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010574int
10575main ()
10576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 ;
10579 return 0;
10580}
10581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010582if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010583 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010584else
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010587rm -f core conftest.err conftest.$ac_objext \
10588 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010589LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10592$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010593if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010595
Martin v. Löwis130fb172001-07-19 11:00:41 +000010596 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010597 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010598 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010599fi
10600
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010601
Neal Norwitza978ab02002-11-02 16:58:05 +000010602 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10604$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010605if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010607else
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010609LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010613/* Override any GCC internal prototype to avoid an error.
10614 Use char because int might match the return type of a GCC
10615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010616#ifdef __cplusplus
10617extern "C"
10618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010619char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010620int
10621main ()
10622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 ;
10625 return 0;
10626}
10627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010628if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010629 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630else
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010633rm -f core conftest.err conftest.$ac_objext \
10634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010635LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10638$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010639if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010641
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010642 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010643 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010644 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010645fi
10646
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010647 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010649
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010650if test "$posix_threads" = "yes"; then
10651 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010652
Matthias Kloseb9621712010-04-24 17:59:49 +000010653$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010654
10655 fi
10656
10657 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10658 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010659 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010660$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010661
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662 ;;
10663 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010664$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010665
10666 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010667 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010668$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010669
10670 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010671 esac
10672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10674$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010675 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010677else
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010679 ac_cv_pthread_system_supported=no
10680else
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010682/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010683
10684 #include <stdio.h>
10685 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010686 void *foo(void *parm) {
10687 return NULL;
10688 }
10689 main() {
10690 pthread_attr_t attr;
10691 pthread_t id;
10692 if (pthread_attr_init(&attr)) exit(-1);
10693 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10694 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10695 exit(0);
10696 }
10697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010698if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010699 ac_cv_pthread_system_supported=yes
10700else
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10704 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010705fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707
Guido van Rossum627b2d71993-12-24 10:39:16 +000010708fi
10709
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10711$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010712 if test "$ac_cv_pthread_system_supported" = "yes"; then
10713
Matthias Kloseb9621712010-04-24 17:59:49 +000010714$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010715
10716 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 for ac_func in pthread_sigmask
10718do :
10719 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010720if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010721 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010722#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010723_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010724 case $ac_sys_system in
10725 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010728
10729 ;;
10730 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010731fi
10732done
10733
Christian Heimesf77b4b22013-08-21 13:26:05 +020010734 for ac_func in pthread_atfork
10735do :
10736 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10737if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10738 cat >>confdefs.h <<_ACEOF
10739#define HAVE_PTHREAD_ATFORK 1
10740_ACEOF
10741
10742fi
10743done
10744
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010745fi
10746
10747
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10751$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010753if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010754 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 ipv6=no
10759 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10761$as_echo "yes" >&6; }
10762 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763
10764 ipv6=yes
10765 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767else
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010770/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771 /* AF_INET6 available check */
10772#include <sys/types.h>
10773#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010774int
10775main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010777int domain = AF_INET6;
10778 ;
10779 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780}
Martin v. Löwis11437992002-04-12 09:54:03 +000010781_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010782if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10785$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010787
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788else
Matthias Kloseb159a552010-04-25 21:00:44 +000010789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10791$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010793
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010796
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010797if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10799$as_echo_n "checking if RFC2553 API is available... " >&6; }
10800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010801/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010802
10803 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010804#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010805int
10806main ()
10807{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010808struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010809 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 ;
10811 return 0;
10812}
Matthias Kloseb159a552010-04-25 21:00:44 +000010813
Martin v. Löwis11437992002-04-12 09:54:03 +000010814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010815if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010816
10817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010818$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010819 ipv6=yes
10820
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010821else
Matthias Kloseb159a552010-04-25 21:00:44 +000010822
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010824$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010825 ipv6=no
10826
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010829fi
10830
10831if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010833
10834fi
10835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836fi
10837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838
10839ipv6type=unknown
10840ipv6lib=none
10841ipv6trylibc=no
10842
10843if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10845$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010846 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10847 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848 case $i in
10849 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010851/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010852
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853#include <netinet/in.h>
10854#ifdef IPV6_INRIA_VERSION
10855yes
10856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010857_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010860 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010862rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863
10864 ;;
10865 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010867/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010868
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010869#include <netinet/in.h>
10870#ifdef __KAME__
10871yes
10872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010873_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010876 ipv6type=$i;
10877 ipv6lib=inet6
10878 ipv6libdir=/usr/local/v6/lib
10879 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010881rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882
10883 ;;
10884 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010886/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010887
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888#include <features.h>
10889#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10890yes
10891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010892_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895 ipv6type=$i;
10896 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010898rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899
10900 ;;
10901 linux-inet6)
10902 if test -d /usr/inet6; then
10903 ipv6type=$i
10904 ipv6lib=inet6
10905 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010906 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907 fi
10908 ;;
10909 solaris)
10910 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010911 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912 ipv6type=$i
10913 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914 fi
10915 fi
10916 ;;
10917 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010919/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010920
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010921#include <sys/param.h>
10922#ifdef _TOSHIBA_INET6
10923yes
10924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010925_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928 ipv6type=$i;
10929 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010930 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010932rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933
10934 ;;
10935 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010937/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010938
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939#include </usr/local/v6/include/sys/v6config.h>
10940#ifdef __V6D__
10941yes
10942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010943_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946 ipv6type=$i;
10947 ipv6lib=v6;
10948 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010949 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010951rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952
10953 ;;
10954 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010956/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010957
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958#include <sys/param.h>
10959#ifdef _ZETA_MINAMI_INET6
10960yes
10961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010962_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965 ipv6type=$i;
10966 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010967 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010969rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010970
10971 ;;
10972 esac
10973 if test "$ipv6type" != "unknown"; then
10974 break
10975 fi
10976 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10978$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979fi
10980
10981if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10982 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10983 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10984 echo "using lib$ipv6lib"
10985 else
10986 if test $ipv6trylibc = "yes"; then
10987 echo "using libc"
10988 else
10989 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10990 echo "You need to fetch lib$ipv6lib.a from appropriate"
10991 echo 'ipv6 kit and compile beforehand.'
10992 exit 1
10993 fi
10994 fi
10995fi
10996
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10998$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11000/* end confdefs.h. */
11001 /* CAN_RAW_FD_FRAMES available check */
11002#include <linux/can/raw.h>
11003int
11004main ()
11005{
11006int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11007 ;
11008 return 0;
11009}
11010_ACEOF
11011if ac_fn_c_try_compile "$LINENO"; then :
11012
11013
11014$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11015
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11017$as_echo "yes" >&6; }
11018
11019else
11020
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022$as_echo "no" >&6; }
11023
11024fi
11025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11026
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011027# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11029$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011032if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033 withval=$with_doc_strings;
11034fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011035
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011036
11037if test -z "$with_doc_strings"
11038then with_doc_strings="yes"
11039fi
11040if test "$with_doc_strings" != "no"
11041then
11042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011044
11045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11047$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011048
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011049# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11051$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011053# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011054if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011055 withval=$with_pymalloc;
11056fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011057
Neil Schemenauera35c6882001-02-27 04:45:05 +000011058
Neil Schemenauer16c22972002-03-22 15:34:49 +000011059if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011060then
11061 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011062fi
11063if test "$with_pymalloc" != "no"
11064then
Martin v. Löwis11437992002-04-12 09:54:03 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011067
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011068 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11071$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011072
Benjamin Peterson05159c42009-12-03 03:01:27 +000011073# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11075$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011076
11077# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011078if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011079 withval=$with_valgrind;
11080else
11081 with_valgrind=no
11082fi
11083
Matthias Kloseb9621712010-04-24 17:59:49 +000011084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11085$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011086if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 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 +020011088if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011091
11092else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011093 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011094
11095fi
11096
11097
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011098 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011099fi
11100
Łukasz Langaa785c872016-09-09 17:37:37 -070011101# Check for DTrace support
11102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11103$as_echo_n "checking for --with-dtrace... " >&6; }
11104
11105# Check whether --with-dtrace was given.
11106if test "${with_dtrace+set}" = set; then :
11107 withval=$with_dtrace;
11108else
11109 with_dtrace=no
11110fi
11111
11112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11113$as_echo "$with_dtrace" >&6; }
11114
11115
11116
11117
11118
11119DTRACE=
11120DFLAGS=
11121DTRACE_HEADERS=
11122DTRACE_OBJS=
11123
11124if test "$with_dtrace" = "yes"
11125then
11126 # Extract the first word of "dtrace", so it can be a program name with args.
11127set dummy dtrace; ac_word=$2
11128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11129$as_echo_n "checking for $ac_word... " >&6; }
11130if ${ac_cv_path_DTRACE+:} false; then :
11131 $as_echo_n "(cached) " >&6
11132else
11133 case $DTRACE in
11134 [\\/]* | ?:[\\/]*)
11135 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11136 ;;
11137 *)
11138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11139for as_dir in $PATH
11140do
11141 IFS=$as_save_IFS
11142 test -z "$as_dir" && as_dir=.
11143 for ac_exec_ext in '' $ac_executable_extensions; do
11144 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11145 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11147 break 2
11148 fi
11149done
11150 done
11151IFS=$as_save_IFS
11152
11153 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11154 ;;
11155esac
11156fi
11157DTRACE=$ac_cv_path_DTRACE
11158if test -n "$DTRACE"; then
11159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11160$as_echo "$DTRACE" >&6; }
11161else
11162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163$as_echo "no" >&6; }
11164fi
11165
11166
11167 if test "$DTRACE" = "not found"; then
11168 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11169 fi
11170
11171$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11172
11173 DTRACE_HEADERS="Include/pydtrace_probes.h"
11174
11175 # On OS X, DTrace providers do not need to be explicitly compiled and
11176 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11177 # generation flag '-G'. We check for presence of this flag, rather than
11178 # hardcoding support by OS, in the interest of robustness.
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11180$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11181if ${ac_cv_dtrace_link+:} false; then :
11182 $as_echo_n "(cached) " >&6
11183else
11184 ac_cv_dtrace_link=no
11185 echo 'BEGIN' > conftest.d
11186 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11187 ac_cv_dtrace_link=yes
11188
11189fi
11190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11191$as_echo "$ac_cv_dtrace_link" >&6; }
11192 if test "$ac_cv_dtrace_link" = "yes"; then
11193 DTRACE_OBJS="Python/pydtrace.o"
11194 fi
11195fi
11196
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011197# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011198
Guido van Rossum98935bf2001-09-05 19:13:16 +000011199DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011200
Guido van Rossume97ee181999-12-20 21:27:22 +000011201# the dlopen() function means we might want to use dynload_shlib.o. some
11202# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011203for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011204do :
11205 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011206if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011208#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011209_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011210
Guido van Rossume97ee181999-12-20 21:27:22 +000011211fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011212done
Guido van Rossume97ee181999-12-20 21:27:22 +000011213
Michael W. Hudson54241132001-12-07 15:38:26 +000011214
Guido van Rossume97ee181999-12-20 21:27:22 +000011215# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11216# loading of modules.
11217
Matthias Kloseb9621712010-04-24 17:59:49 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11219$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011220if test -z "$DYNLOADFILE"
11221then
11222 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011223 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11224 if test "$ac_cv_func_dlopen" = yes
11225 then DYNLOADFILE="dynload_shlib.o"
11226 else DYNLOADFILE="dynload_aix.o"
11227 fi
11228 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011229 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011230 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11231 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011232 *)
11233 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11234 # out any dynamic loading
11235 if test "$ac_cv_func_dlopen" = yes
11236 then DYNLOADFILE="dynload_shlib.o"
11237 else DYNLOADFILE="dynload_stub.o"
11238 fi
11239 ;;
11240 esac
11241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11243$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011244if test "$DYNLOADFILE" != "dynload_stub.o"
11245then
Martin v. Löwis11437992002-04-12 09:54:03 +000011246
Matthias Kloseb9621712010-04-24 17:59:49 +000011247$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011248
11249fi
11250
Neil Schemenauer4e425612001-06-19 15:44:15 +000011251# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11252
Michael W. Hudson54241132001-12-07 15:38:26 +000011253
Matthias Kloseb9621712010-04-24 17:59:49 +000011254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11255$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011256if test -z "$MACHDEP_OBJS"
11257then
Jack Jansene578a632001-08-15 01:27:14 +000011258 MACHDEP_OBJS=$extra_machdep_objs
11259else
11260 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011261fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011262if test -z "$MACHDEP_OBJS"; then
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11264$as_echo "none" >&6; }
11265else
11266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11267$as_echo "$MACHDEP_OBJS" >&6; }
11268fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011269
Guido van Rossum627b2d71993-12-24 10:39:16 +000011270# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011271for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011272 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011273 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011274 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011275 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011276 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011277 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011278 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011279 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011280 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011281 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011282 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011283 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011284 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011285 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11286 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011287 sigaction sigaltstack siginterrupt sigpending sigrelse \
11288 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011289 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011290 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011291 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011292do :
11293 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11294ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011295if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011296 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011298_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011299
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011300fi
11301done
11302
Michael W. Hudson54241132001-12-07 15:38:26 +000011303
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011304ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11305 #include <dirent.h>
11306"
11307if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11308
11309$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11310
11311fi
11312
11313
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011314# For some functions, having a definition is not sufficient, since
11315# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11317$as_echo_n "checking for chroot... " >&6; }
11318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011319/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011320#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011321int
11322main ()
11323{
11324void *x=chroot
11325 ;
11326 return 0;
11327}
11328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011332
Matthias Kloseb159a552010-04-25 21:00:44 +000011333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011334$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011335else
Matthias Kloseb9621712010-04-24 17:59:49 +000011336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11337$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011338
11339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11342$as_echo_n "checking for link... " >&6; }
11343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011344/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011345#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011346int
11347main ()
11348{
11349void *x=link
11350 ;
11351 return 0;
11352}
11353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355
Matthias Kloseb9621712010-04-24 17:59:49 +000011356$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011357
Matthias Kloseb159a552010-04-25 21:00:44 +000011358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011359$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011360else
Matthias Kloseb9621712010-04-24 17:59:49 +000011361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11362$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011363
11364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11367$as_echo_n "checking for symlink... " >&6; }
11368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011369/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011370#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011371int
11372main ()
11373{
11374void *x=symlink
11375 ;
11376 return 0;
11377}
11378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011382
Matthias Kloseb159a552010-04-25 21:00:44 +000011383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011385else
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11387$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011388
11389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11392$as_echo_n "checking for fchdir... " >&6; }
11393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011394/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011395#include <unistd.h>
11396int
11397main ()
11398{
11399void *x=fchdir
11400 ;
11401 return 0;
11402}
11403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405
Matthias Kloseb9621712010-04-24 17:59:49 +000011406$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011407
Matthias Kloseb159a552010-04-25 21:00:44 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011409$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011410else
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11412$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011413
11414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11417$as_echo_n "checking for fsync... " >&6; }
11418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011419/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011420#include <unistd.h>
11421int
11422main ()
11423{
11424void *x=fsync
11425 ;
11426 return 0;
11427}
11428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430
Matthias Kloseb9621712010-04-24 17:59:49 +000011431$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011432
Matthias Kloseb159a552010-04-25 21:00:44 +000011433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011434$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011435else
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11437$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011438
11439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11442$as_echo_n "checking for fdatasync... " >&6; }
11443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011444/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011445#include <unistd.h>
11446int
11447main ()
11448{
11449void *x=fdatasync
11450 ;
11451 return 0;
11452}
11453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011455
Matthias Kloseb9621712010-04-24 17:59:49 +000011456$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011457
Matthias Kloseb159a552010-04-25 21:00:44 +000011458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011459$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011460else
Matthias Kloseb9621712010-04-24 17:59:49 +000011461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11462$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011463
11464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11467$as_echo_n "checking for epoll... " >&6; }
11468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011469/* end confdefs.h. */
11470#include <sys/epoll.h>
11471int
11472main ()
11473{
11474void *x=epoll_create
11475 ;
11476 return 0;
11477}
11478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011480
Matthias Kloseb9621712010-04-24 17:59:49 +000011481$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011482
Matthias Kloseb159a552010-04-25 21:00:44 +000011483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011484$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011485else
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11487$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011488
11489fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11492$as_echo_n "checking for epoll_create1... " >&6; }
11493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11494/* end confdefs.h. */
11495#include <sys/epoll.h>
11496int
11497main ()
11498{
11499void *x=epoll_create1
11500 ;
11501 return 0;
11502}
11503_ACEOF
11504if ac_fn_c_try_compile "$LINENO"; then :
11505
11506$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11507
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11509$as_echo "yes" >&6; }
11510else
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11512$as_echo "no" >&6; }
11513
11514fi
11515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11517$as_echo_n "checking for kqueue... " >&6; }
11518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011519/* end confdefs.h. */
11520
11521#include <sys/types.h>
11522#include <sys/event.h>
11523
11524int
11525main ()
11526{
11527int x=kqueue()
11528 ;
11529 return 0;
11530}
11531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011532if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011533
Matthias Kloseb9621712010-04-24 17:59:49 +000011534$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011535
Matthias Kloseb159a552010-04-25 21:00:44 +000011536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011537$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011538else
Matthias Kloseb9621712010-04-24 17:59:49 +000011539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11540$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011541
11542fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11545$as_echo_n "checking for prlimit... " >&6; }
11546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11547/* end confdefs.h. */
11548
11549#include <sys/time.h>
11550#include <sys/resource.h>
11551
11552int
11553main ()
11554{
11555void *x=prlimit
11556 ;
11557 return 0;
11558}
11559_ACEOF
11560if ac_fn_c_try_compile "$LINENO"; then :
11561
11562$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11563
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11565$as_echo "yes" >&6; }
11566else
11567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11568$as_echo "no" >&6; }
11569
11570fi
11571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11572
Martin v. Löwisd5843682002-11-21 20:41:28 +000011573# On some systems (eg. FreeBSD 5), we would find a definition of the
11574# functions ctermid_r, setgroups in the library, but no prototype
11575# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11576# address to avoid compiler warnings and potential miscompilations
11577# because of the missing prototypes.
11578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11580$as_echo_n "checking for ctermid_r... " >&6; }
11581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011582/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011583
Martin v. Löwisd5843682002-11-21 20:41:28 +000011584#include <stdio.h>
11585
Martin v. Löwisd5843682002-11-21 20:41:28 +000011586int
11587main ()
11588{
11589void* p = ctermid_r
11590 ;
11591 return 0;
11592}
11593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011595
Matthias Kloseb9621712010-04-24 17:59:49 +000011596$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011597
Matthias Kloseb159a552010-04-25 21:00:44 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011599$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011600else
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11602$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011603
11604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11606
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11608$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011609if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011610 $as_echo_n "(cached) " >&6
11611else
11612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011613/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011614#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011615int
11616main ()
11617{
11618void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011619
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011620 ;
11621 return 0;
11622}
11623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011625 ac_cv_flock_decl=yes
11626else
11627 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011628
11629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011631
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011632fi
11633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11634$as_echo "$ac_cv_flock_decl" >&6; }
11635if test "x${ac_cv_flock_decl}" = xyes; then
11636 for ac_func in flock
11637do :
11638 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011639if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011640 cat >>confdefs.h <<_ACEOF
11641#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011642_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011643
Antoine Pitroua3000072010-09-07 14:52:42 +000011644else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011646$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011647if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011648 $as_echo_n "(cached) " >&6
11649else
11650 ac_check_lib_save_LIBS=$LIBS
11651LIBS="-lbsd $LIBS"
11652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11653/* end confdefs.h. */
11654
11655/* Override any GCC internal prototype to avoid an error.
11656 Use char because int might match the return type of a GCC
11657 builtin and then its argument prototype would still apply. */
11658#ifdef __cplusplus
11659extern "C"
11660#endif
11661char flock ();
11662int
11663main ()
11664{
11665return flock ();
11666 ;
11667 return 0;
11668}
11669_ACEOF
11670if ac_fn_c_try_link "$LINENO"; then :
11671 ac_cv_lib_bsd_flock=yes
11672else
11673 ac_cv_lib_bsd_flock=no
11674fi
11675rm -f core conftest.err conftest.$ac_objext \
11676 conftest$ac_exeext conftest.$ac_ext
11677LIBS=$ac_check_lib_save_LIBS
11678fi
11679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11680$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011681if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011682 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011683
11684
11685$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11686
11687
11688fi
11689
11690
11691fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011692done
11693
Antoine Pitroua3000072010-09-07 14:52:42 +000011694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11697$as_echo_n "checking for getpagesize... " >&6; }
11698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011699/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011700
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011701#include <unistd.h>
11702
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011703int
11704main ()
11705{
11706void* p = getpagesize
11707 ;
11708 return 0;
11709}
11710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011714
Matthias Kloseb159a552010-04-25 21:00:44 +000011715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011716$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011717else
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11719$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011720
11721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011723
Victor Stinner984890f2011-11-24 13:53:38 +010011724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11725$as_echo_n "checking for broken unsetenv... " >&6; }
11726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11727/* end confdefs.h. */
11728
11729#include <stdlib.h>
11730
11731int
11732main ()
11733{
11734int res = unsetenv("DUMMY")
11735 ;
11736 return 0;
11737}
11738_ACEOF
11739if ac_fn_c_try_compile "$LINENO"; then :
11740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11741$as_echo "no" >&6; }
11742else
11743
11744$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11745
11746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11747$as_echo "yes" >&6; }
11748
11749fi
11750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11751
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011752for ac_prog in true
11753do
11754 # Extract the first word of "$ac_prog", so it can be a program name with args.
11755set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011758if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011760else
11761 if test -n "$TRUE"; then
11762 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11763else
11764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11765for as_dir in $PATH
11766do
11767 IFS=$as_save_IFS
11768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011771 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 $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 +000011773 break 2
11774 fi
11775done
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011777IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011778
11779fi
11780fi
11781TRUE=$ac_cv_prog_TRUE
11782if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11784$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011785else
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11787$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011788fi
11789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011790
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011791 test -n "$TRUE" && break
11792done
11793test -n "$TRUE" || TRUE="/bin/true"
11794
11795
Matthias Kloseb9621712010-04-24 17:59:49 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11797$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011798if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800else
11801 ac_check_lib_save_LIBS=$LIBS
11802LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011804/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011806/* Override any GCC internal prototype to avoid an error.
11807 Use char because int might match the return type of a GCC
11808 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011809#ifdef __cplusplus
11810extern "C"
11811#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011812char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011813int
11814main ()
11815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011816return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011817 ;
11818 return 0;
11819}
11820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011822 ac_cv_lib_c_inet_aton=yes
11823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011826rm -f core conftest.err conftest.$ac_objext \
11827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828LIBS=$ac_check_lib_save_LIBS
11829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11831$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011832if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011833 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011834else
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11836$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011837if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011839else
11840 ac_check_lib_save_LIBS=$LIBS
11841LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011843/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011845/* Override any GCC internal prototype to avoid an error.
11846 Use char because int might match the return type of a GCC
11847 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011848#ifdef __cplusplus
11849extern "C"
11850#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011851char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011852int
11853main ()
11854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011855return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011856 ;
11857 return 0;
11858}
11859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011860if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011861 ac_cv_lib_resolv_inet_aton=yes
11862else
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011865rm -f core conftest.err conftest.$ac_objext \
11866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011867LIBS=$ac_check_lib_save_LIBS
11868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11870$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011871if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011872 cat >>confdefs.h <<_ACEOF
11873#define HAVE_LIBRESOLV 1
11874_ACEOF
11875
11876 LIBS="-lresolv $LIBS"
11877
11878fi
11879
11880
11881fi
11882
11883
Christian Heimesd0764e22007-12-04 15:00:33 +000011884# On Tru64, chflags seems to be present, but calling it will
11885# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11887$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011888if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011892 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011895/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011896
Christian Heimesd0764e22007-12-04 15:00:33 +000011897#include <sys/stat.h>
11898#include <unistd.h>
11899int main(int argc, char*argv[])
11900{
11901 if(chflags(argv[0], 0) != 0)
11902 return 1;
11903 return 0;
11904}
Ned Deily3eb67d52011-06-28 00:00:28 -070011905
Christian Heimesd0764e22007-12-04 15:00:33 +000011906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011907if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011908 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011909else
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011914fi
11915
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011916
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11919$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011920if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011921 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011922if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011923 ac_cv_have_chflags="yes"
11924else
11925 ac_cv_have_chflags="no"
11926fi
11927
11928fi
11929if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011932
11933fi
11934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11936$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011937if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011939else
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011941 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011942else
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011944/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011945
Christian Heimesd0764e22007-12-04 15:00:33 +000011946#include <sys/stat.h>
11947#include <unistd.h>
11948int main(int argc, char*argv[])
11949{
11950 if(lchflags(argv[0], 0) != 0)
11951 return 1;
11952 return 0;
11953}
Ned Deily3eb67d52011-06-28 00:00:28 -070011954
Christian Heimesd0764e22007-12-04 15:00:33 +000011955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011957 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011958else
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011963fi
11964
11965
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11968$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011969if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011971if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011972 ac_cv_have_lchflags="yes"
11973else
11974 ac_cv_have_lchflags="no"
11975fi
11976
11977fi
11978if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011981
11982fi
11983
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011984case $ac_sys_system/$ac_sys_release in
11985Darwin/*)
11986 _CUR_CFLAGS="${CFLAGS}"
11987 _CUR_LDFLAGS="${LDFLAGS}"
11988 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11989 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11990 ;;
11991esac
11992
Matthias Kloseb9621712010-04-24 17:59:49 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11994$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011995if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011997else
11998 ac_check_lib_save_LIBS=$LIBS
11999LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012001/* end confdefs.h. */
12002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012003/* Override any GCC internal prototype to avoid an error.
12004 Use char because int might match the return type of a GCC
12005 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012006#ifdef __cplusplus
12007extern "C"
12008#endif
12009char inflateCopy ();
12010int
12011main ()
12012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012013return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012014 ;
12015 return 0;
12016}
12017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012018if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012019 ac_cv_lib_z_inflateCopy=yes
12020else
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012023rm -f core conftest.err conftest.$ac_objext \
12024 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012025LIBS=$ac_check_lib_save_LIBS
12026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12028$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012029if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012030
Matthias Kloseb9621712010-04-24 17:59:49 +000012031$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012032
12033fi
12034
12035
12036case $ac_sys_system/$ac_sys_release in
12037Darwin/*)
12038 CFLAGS="${_CUR_CFLAGS}"
12039 LDFLAGS="${_CUR_LDFLAGS}"
12040 ;;
12041esac
12042
Matthias Kloseb9621712010-04-24 17:59:49 +000012043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12044$as_echo_n "checking for hstrerror... " >&6; }
12045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012046/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012047
Martin v. Löwise9416172003-05-03 10:12:45 +000012048#include <netdb.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 = hstrerror; hstrerror(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_HSTRERROR 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_aton" >&5
12073$as_echo_n "checking for inet_aton... " >&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öwis86d66262006-02-17 08:40: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{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012085void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012086 ;
12087 return 0;
12088}
12089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090if ac_fn_c_try_link "$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_ATON 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
Matthias Kloseb9621712010-04-24 17:59:49 +000012101rm -f core conftest.err conftest.$ac_objext \
12102 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012103
Matthias Kloseb9621712010-04-24 17:59:49 +000012104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12105$as_echo_n "checking for inet_pton... " >&6; }
12106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012107/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012108
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012109#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012110#include <sys/socket.h>
12111#include <netinet/in.h>
12112#include <arpa/inet.h>
12113
Martin v. Löwise9416172003-05-03 10:12:45 +000012114int
12115main ()
12116{
12117void* p = inet_pton
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öwise9416172003-05-03 10:12:45 +000012123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012125
Matthias Kloseb159a552010-04-25 21:00:44 +000012126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012127$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12130$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012131
12132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012134
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012135# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12137$as_echo_n "checking for setgroups... " >&6; }
12138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012139/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012140
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012141#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012142#ifdef HAVE_GRP_H
12143#include <grp.h>
12144#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012145
Martin v. Löwisd5843682002-11-21 20:41:28 +000012146int
12147main ()
12148{
12149void* p = setgroups
12150 ;
12151 return 0;
12152}
12153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012154if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012155
Matthias Kloseb9621712010-04-24 17:59:49 +000012156$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012157
Matthias Kloseb159a552010-04-25 21:00:44 +000012158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012159$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012160else
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12162$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012163
12164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012166
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012167# check for openpty and forkpty
12168
12169for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012170do :
12171 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012172if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012174#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012175_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012176
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12179$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012180if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182else
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012184LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188/* Override any GCC internal prototype to avoid an error.
12189 Use char because int might match the return type of a GCC
12190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012191#ifdef __cplusplus
12192extern "C"
12193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012194char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012195int
12196main ()
12197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 ;
12200 return 0;
12201}
12202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205else
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012208rm -f core conftest.err conftest.$ac_objext \
12209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012210LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12213$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012214if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012216 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012217else
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12219$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012220if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012222else
12223 ac_check_lib_save_LIBS=$LIBS
12224LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012226/* end confdefs.h. */
12227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228/* Override any GCC internal prototype to avoid an error.
12229 Use char because int might match the return type of a GCC
12230 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012231#ifdef __cplusplus
12232extern "C"
12233#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012234char openpty ();
12235int
12236main ()
12237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012238return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012239 ;
12240 return 0;
12241}
12242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012243if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012244 ac_cv_lib_bsd_openpty=yes
12245else
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012248rm -f core conftest.err conftest.$ac_objext \
12249 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012250LIBS=$ac_check_lib_save_LIBS
12251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12253$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012254if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012256 LIBS="$LIBS -lbsd"
12257fi
12258
12259
12260fi
12261
Fred Drake8cef4cf2000-06-28 16:40:38 +000012262
12263fi
12264done
12265
12266for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012267do :
12268 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012269if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012270 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012272_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012273
Fred Drake8cef4cf2000-06-28 16:40:38 +000012274else
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12276$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012277if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012279else
Martin v. Löwis11437992002-04-12 09:54:03 +000012280 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012281LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285/* Override any GCC internal prototype to avoid an error.
12286 Use char because int might match the return type of a GCC
12287 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012288#ifdef __cplusplus
12289extern "C"
12290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012291char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012292int
12293main ()
12294{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 ;
12297 return 0;
12298}
12299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012300if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012305rm -f core conftest.err conftest.$ac_objext \
12306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012307LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12310$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012311if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012313 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012314else
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12316$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012317if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012319else
12320 ac_check_lib_save_LIBS=$LIBS
12321LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012323/* end confdefs.h. */
12324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325/* Override any GCC internal prototype to avoid an error.
12326 Use char because int might match the return type of a GCC
12327 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012328#ifdef __cplusplus
12329extern "C"
12330#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012331char forkpty ();
12332int
12333main ()
12334{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012336 ;
12337 return 0;
12338}
12339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012340if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012341 ac_cv_lib_bsd_forkpty=yes
12342else
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012345rm -f core conftest.err conftest.$ac_objext \
12346 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012347LIBS=$ac_check_lib_save_LIBS
12348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12350$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012351if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012353 LIBS="$LIBS -lbsd"
12354fi
12355
12356
12357fi
12358
Fred Drake8cef4cf2000-06-28 16:40:38 +000012359
12360fi
12361done
12362
Jack Jansendd19cf82001-12-06 22:36:17 +000012363
Christian Heimesb186d002008-03-18 15:15:01 +000012364# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012365for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012366do :
12367 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012368if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012369 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012370#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012371_ACEOF
12372
12373fi
12374done
12375
12376
Michael W. Hudson54241132001-12-07 15:38:26 +000012377# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012378for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012379do :
12380 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12381ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012382if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012383 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012384#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012385_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012386
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012387fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012388done
12389
Michael W. Hudson54241132001-12-07 15:38:26 +000012390
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012391ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012392if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012393 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012394
Martin v. Löwis1142de32002-03-29 16:28:31 +000012395else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012397 *" dup2.$ac_objext "* ) ;;
12398 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012400esac
12401
Martin v. Löwis1142de32002-03-29 16:28:31 +000012402fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012403
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012404ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012405if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012406 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12407
12408else
12409 case " $LIBOBJS " in
12410 *" strdup.$ac_objext "* ) ;;
12411 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12412 ;;
12413esac
12414
12415fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012416
12417
12418for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012419do :
12420 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012421if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012426/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012428int
12429main ()
12430{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 ;
12433 return 0;
12434}
12435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012439
Guido van Rossum627b2d71993-12-24 10:39:16 +000012440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012442
Guido van Rossum627b2d71993-12-24 10:39:16 +000012443fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012444done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012445
Jack Jansen150753c2003-03-29 22:07:47 +000012446for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012447do :
12448 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012449if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012450 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012454/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012455#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012456int
12457main ()
12458{
12459setpgrp(0,0);
12460 ;
12461 return 0;
12462}
12463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012467
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012470
12471fi
12472done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012473
Thomas Wouters3a584202000-08-05 23:28:51 +000012474for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012475do :
12476 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012477if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012479#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012482/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012483#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012484int
12485main ()
12486{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 ;
12489 return 0;
12490}
12491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012492if ac_fn_c_try_compile "$LINENO"; then :
12493
Guido van Rossum627b2d71993-12-24 10:39:16 +000012494else
Skip Montanaro6dead952003-09-25 14:50:04 +000012495
Matthias Kloseb9621712010-04-24 17:59:49 +000012496$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Guido van Rossum627b2d71993-12-24 10:39:16 +000012499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012501
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012502fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012503done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012504
Michael W. Hudson54241132001-12-07 15:38:26 +000012505
Victor Stinnere0be4232011-10-25 13:06:09 +020012506for ac_func in clock_gettime
12507do :
12508 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12509if test "x$ac_cv_func_clock_gettime" = xyes; then :
12510 cat >>confdefs.h <<_ACEOF
12511#define HAVE_CLOCK_GETTIME 1
12512_ACEOF
12513
12514else
12515
12516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12517$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12518if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12519 $as_echo_n "(cached) " >&6
12520else
12521 ac_check_lib_save_LIBS=$LIBS
12522LIBS="-lrt $LIBS"
12523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12524/* end confdefs.h. */
12525
12526/* Override any GCC internal prototype to avoid an error.
12527 Use char because int might match the return type of a GCC
12528 builtin and then its argument prototype would still apply. */
12529#ifdef __cplusplus
12530extern "C"
12531#endif
12532char clock_gettime ();
12533int
12534main ()
12535{
12536return clock_gettime ();
12537 ;
12538 return 0;
12539}
12540_ACEOF
12541if ac_fn_c_try_link "$LINENO"; then :
12542 ac_cv_lib_rt_clock_gettime=yes
12543else
12544 ac_cv_lib_rt_clock_gettime=no
12545fi
12546rm -f core conftest.err conftest.$ac_objext \
12547 conftest$ac_exeext conftest.$ac_ext
12548LIBS=$ac_check_lib_save_LIBS
12549fi
12550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12551$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12552if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12553
Victor Stinner7efb8332014-08-29 15:41:08 +020012554 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012555 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12556
12557
12558$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12559
12560
12561fi
12562
12563
12564fi
12565done
12566
12567
12568for ac_func in clock_getres
12569do :
12570 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12571if test "x$ac_cv_func_clock_getres" = xyes; then :
12572 cat >>confdefs.h <<_ACEOF
12573#define HAVE_CLOCK_GETRES 1
12574_ACEOF
12575
12576else
12577
12578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12579$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12580if ${ac_cv_lib_rt_clock_getres+:} false; then :
12581 $as_echo_n "(cached) " >&6
12582else
12583 ac_check_lib_save_LIBS=$LIBS
12584LIBS="-lrt $LIBS"
12585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12586/* end confdefs.h. */
12587
12588/* Override any GCC internal prototype to avoid an error.
12589 Use char because int might match the return type of a GCC
12590 builtin and then its argument prototype would still apply. */
12591#ifdef __cplusplus
12592extern "C"
12593#endif
12594char clock_getres ();
12595int
12596main ()
12597{
12598return clock_getres ();
12599 ;
12600 return 0;
12601}
12602_ACEOF
12603if ac_fn_c_try_link "$LINENO"; then :
12604 ac_cv_lib_rt_clock_getres=yes
12605else
12606 ac_cv_lib_rt_clock_getres=no
12607fi
12608rm -f core conftest.err conftest.$ac_objext \
12609 conftest$ac_exeext conftest.$ac_ext
12610LIBS=$ac_check_lib_save_LIBS
12611fi
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12613$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12614if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12615
12616 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12617
12618
12619fi
12620
12621
12622fi
12623done
12624
12625
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012626for ac_func in clock_settime
12627do :
12628 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12629if test "x$ac_cv_func_clock_settime" = xyes; then :
12630 cat >>confdefs.h <<_ACEOF
12631#define HAVE_CLOCK_SETTIME 1
12632_ACEOF
12633
12634else
12635
12636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12637$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12638if ${ac_cv_lib_rt_clock_settime+:} false; then :
12639 $as_echo_n "(cached) " >&6
12640else
12641 ac_check_lib_save_LIBS=$LIBS
12642LIBS="-lrt $LIBS"
12643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12644/* end confdefs.h. */
12645
12646/* Override any GCC internal prototype to avoid an error.
12647 Use char because int might match the return type of a GCC
12648 builtin and then its argument prototype would still apply. */
12649#ifdef __cplusplus
12650extern "C"
12651#endif
12652char clock_settime ();
12653int
12654main ()
12655{
12656return clock_settime ();
12657 ;
12658 return 0;
12659}
12660_ACEOF
12661if ac_fn_c_try_link "$LINENO"; then :
12662 ac_cv_lib_rt_clock_settime=yes
12663else
12664 ac_cv_lib_rt_clock_settime=no
12665fi
12666rm -f core conftest.err conftest.$ac_objext \
12667 conftest$ac_exeext conftest.$ac_ext
12668LIBS=$ac_check_lib_save_LIBS
12669fi
12670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12671$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12672if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12673
12674 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12675
12676
12677fi
12678
12679
12680fi
12681done
12682
12683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12685$as_echo_n "checking for major... " >&6; }
12686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012687/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012688
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012689#if defined(MAJOR_IN_MKDEV)
12690#include <sys/mkdev.h>
12691#elif defined(MAJOR_IN_SYSMACROS)
12692#include <sys/sysmacros.h>
12693#else
12694#include <sys/types.h>
12695#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012696
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012697int
12698main ()
12699{
12700
12701 makedev(major(0),minor(0));
12702
12703 ;
12704 return 0;
12705}
12706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012708
12709
Matthias Kloseb9621712010-04-24 17:59:49 +000012710$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12713$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012714
12715else
Skip Montanaro6dead952003-09-25 14:50:04 +000012716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12718$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012719
12720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012721rm -f core conftest.err conftest.$ac_objext \
12722 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012723
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012724# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12725# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12727$as_echo_n "checking for if_nameindex... " >&6; }
12728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12729/* end confdefs.h. */
12730
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012731#include <stdio.h>
12732#ifdef STDC_HEADERS
12733# include <stdlib.h>
12734# include <stddef.h>
12735#else
12736# ifdef HAVE_STDLIB_H
12737# include <stdlib.h>
12738# endif
12739#endif
12740#ifdef HAVE_SYS_SOCKET_H
12741# include <sys/socket.h>
12742#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012743#ifdef HAVE_NET_IF_H
12744# include <net/if.h>
12745#endif
12746
12747int
12748main ()
12749{
12750struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12751 ;
12752 return 0;
12753}
12754_ACEOF
12755if ac_fn_c_try_link "$LINENO"; then :
12756
12757$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12758
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12760$as_echo "yes" >&6; }
12761else
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12763$as_echo "no" >&6; }
12764
12765fi
12766rm -f core conftest.err conftest.$ac_objext \
12767 conftest$ac_exeext conftest.$ac_ext
12768
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012769# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12770# macro is not defined in android-ndk-r13.
12771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12772$as_echo_n "checking for lockf... " >&6; }
12773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12774/* end confdefs.h. */
12775#include <unistd.h>
12776int
12777main ()
12778{
12779lockf(0, F_LOCK, 0);
12780 ;
12781 return 0;
12782}
12783_ACEOF
12784if ac_fn_c_try_link "$LINENO"; then :
12785
12786$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12787
12788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12789$as_echo "yes" >&6; }
12790else
12791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12792$as_echo "no" >&6; }
12793
12794fi
12795rm -f core conftest.err conftest.$ac_objext \
12796 conftest$ac_exeext conftest.$ac_ext
12797
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012798# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012799# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12801$as_echo_n "checking for getaddrinfo... " >&6; }
12802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012804
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012805#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012806#include <sys/socket.h>
12807#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012808#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012809
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012813getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 ;
12815 return 0;
12816}
12817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012818if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012819 have_getaddrinfo=yes
12820else
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012823rm -f core conftest.err conftest.$ac_objext \
12824 conftest$ac_exeext conftest.$ac_ext
12825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12826$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012827if test $have_getaddrinfo = yes
12828then
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12830$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012831 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012832 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012835
12836if test "${enable_ipv6+set}" = set; then
12837 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12838else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012839 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012840fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841else
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012843/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012844
Stefan Krah19c21392012-11-22 23:47:32 +010012845#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012846#include <sys/types.h>
12847#include <netdb.h>
12848#include <string.h>
12849#include <sys/socket.h>
12850#include <netinet/in.h>
12851
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012852int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012853{
12854 int passive, gaierr, inet4 = 0, inet6 = 0;
12855 struct addrinfo hints, *ai, *aitop;
12856 char straddr[INET6_ADDRSTRLEN], strport[16];
12857
12858 for (passive = 0; passive <= 1; passive++) {
12859 memset(&hints, 0, sizeof(hints));
12860 hints.ai_family = AF_UNSPEC;
12861 hints.ai_flags = passive ? AI_PASSIVE : 0;
12862 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012863 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012864 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12865 (void)gai_strerror(gaierr);
12866 goto bad;
12867 }
12868 for (ai = aitop; ai; ai = ai->ai_next) {
12869 if (ai->ai_addr == NULL ||
12870 ai->ai_addrlen == 0 ||
12871 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12872 straddr, sizeof(straddr), strport, sizeof(strport),
12873 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12874 goto bad;
12875 }
12876 switch (ai->ai_family) {
12877 case AF_INET:
12878 if (strcmp(strport, "54321") != 0) {
12879 goto bad;
12880 }
12881 if (passive) {
12882 if (strcmp(straddr, "0.0.0.0") != 0) {
12883 goto bad;
12884 }
12885 } else {
12886 if (strcmp(straddr, "127.0.0.1") != 0) {
12887 goto bad;
12888 }
12889 }
12890 inet4++;
12891 break;
12892 case AF_INET6:
12893 if (strcmp(strport, "54321") != 0) {
12894 goto bad;
12895 }
12896 if (passive) {
12897 if (strcmp(straddr, "::") != 0) {
12898 goto bad;
12899 }
12900 } else {
12901 if (strcmp(straddr, "::1") != 0) {
12902 goto bad;
12903 }
12904 }
12905 inet6++;
12906 break;
12907 case AF_UNSPEC:
12908 goto bad;
12909 break;
12910 default:
12911 /* another family support? */
12912 break;
12913 }
12914 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012915 freeaddrinfo(aitop);
12916 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012917 }
12918
12919 if (!(inet4 == 0 || inet4 == 2))
12920 goto bad;
12921 if (!(inet6 == 0 || inet6 == 2))
12922 goto bad;
12923
12924 if (aitop)
12925 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012926 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012927
12928 bad:
12929 if (aitop)
12930 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012931 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012932}
12933
Martin v. Löwis11437992002-04-12 09:54:03 +000012934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012935if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012936 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012937else
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12941 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012944fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012945
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12949$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12950
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012951if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012952then
12953 if test $ipv6 = yes
12954 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012955 echo 'Fatal: You must get working getaddrinfo() function.'
12956 echo ' or you can specify "--disable-ipv6"'.
12957 exit 1
12958 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012959else
Martin v. Löwis11437992002-04-12 09:54:03 +000012960
Matthias Kloseb9621712010-04-24 17:59:49 +000012961$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012962
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012963fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012964
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012965for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012966do :
12967 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012968if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012970#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012971_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012972
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012973fi
12974done
12975
Michael W. Hudson54241132001-12-07 15:38:26 +000012976
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012977# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12979$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012980if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012981 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012982else
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012985#include <sys/types.h>
12986#include <sys/time.h>
12987#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Martin v. Löwis11437992002-04-12 09:54:03 +000012989int
12990main ()
12991{
12992if ((struct tm *) 0)
12993return 0;
12994 ;
12995 return 0;
12996}
12997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012998if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012999 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013000else
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13006$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013007if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013008
Matthias Kloseb9621712010-04-24 17:59:49 +000013009$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013010
13011fi
13012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13014$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013015if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013017else
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013019/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020#include <sys/types.h>
13021#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013022
Martin v. Löwis11437992002-04-12 09:54:03 +000013023int
13024main ()
13025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026struct tm tm;
13027 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013029 ;
13030 return 0;
13031}
13032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013033if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013034 ac_cv_struct_tm=time.h
13035else
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13041$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013042if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013043
Matthias Kloseb9621712010-04-24 17:59:49 +000013044$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013045
13046fi
13047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048ac_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 +000013049#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051"
Victor Stinnere0be4232011-10-25 13:06:09 +020013052if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
13054cat >>confdefs.h <<_ACEOF
13055#define HAVE_STRUCT_TM_TM_ZONE 1
13056_ACEOF
13057
13058
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013059fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013060
Martin v. Löwis11437992002-04-12 09:54:03 +000013061if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064
13065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13067"
Victor Stinnere0be4232011-10-25 13:06:09 +020013068if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070else
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072fi
13073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013076_ACEOF
13077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13079$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013080if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013082else
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013084/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013085#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086#if !HAVE_DECL_TZNAME
13087extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
Martin v. Löwis11437992002-04-12 09:54:03 +000013090int
13091main ()
13092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013094 ;
13095 return 0;
13096}
13097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013098if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099 ac_cv_var_tzname=yes
13100else
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013103rm -f core conftest.err conftest.$ac_objext \
13104 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13107$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013108 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
Matthias Kloseb9621712010-04-24 17:59:49 +000013110$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013111
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013112 fi
13113fi
13114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115ac_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 +020013116if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013117
13118cat >>confdefs.h <<_ACEOF
13119#define HAVE_STRUCT_STAT_ST_RDEV 1
13120_ACEOF
13121
13122
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013123fi
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125ac_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 +020013126if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013127
Martin v. Löwis11437992002-04-12 09:54:03 +000013128cat >>confdefs.h <<_ACEOF
13129#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13130_ACEOF
13131
13132
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013133fi
13134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135ac_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 +020013136if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013137
13138cat >>confdefs.h <<_ACEOF
13139#define HAVE_STRUCT_STAT_ST_FLAGS 1
13140_ACEOF
13141
13142
13143fi
13144
Matthias Kloseb9621712010-04-24 17:59:49 +000013145ac_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 +020013146if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013147
13148cat >>confdefs.h <<_ACEOF
13149#define HAVE_STRUCT_STAT_ST_GEN 1
13150_ACEOF
13151
13152
13153fi
13154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155ac_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 +020013156if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013157
13158cat >>confdefs.h <<_ACEOF
13159#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13160_ACEOF
13161
13162
13163fi
13164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165ac_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 +020013166if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013167
Martin v. Löwis11437992002-04-12 09:54:03 +000013168cat >>confdefs.h <<_ACEOF
13169#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13170_ACEOF
13171
13172
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013173fi
13174
Stefan Krah267b6392016-04-26 01:09:18 +020013175ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13176 #include <sys/types.h>
13177 #include <pwd.h>
13178
13179"
13180if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13181
13182cat >>confdefs.h <<_ACEOF
13183#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13184_ACEOF
13185
13186
13187fi
13188ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13189 #include <sys/types.h>
13190 #include <pwd.h>
13191
13192"
13193if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13194
13195cat >>confdefs.h <<_ACEOF
13196#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13197_ACEOF
13198
13199
13200fi
13201
Zachary Ware6a6967e2016-10-01 00:47:27 -050013202# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13203ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13204"
13205if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13206
13207cat >>confdefs.h <<_ACEOF
13208#define HAVE_SIGINFO_T_SI_BAND 1
13209_ACEOF
13210
13211
13212fi
13213
Michael W. Hudson54241132001-12-07 15:38:26 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13216$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013217if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013219else
Matthias Kloseb159a552010-04-25 21:00:44 +000013220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013222/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013223#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013224int
13225main ()
13226{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013227return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 ;
13229 return 0;
13230}
13231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013232if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013233 ac_cv_header_time_altzone=yes
13234else
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239fi
13240
Matthias Kloseb9621712010-04-24 17:59:49 +000013241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13242$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013243if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
Matthias Kloseb9621712010-04-24 17:59:49 +000013245$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013246
13247fi
13248
Guido van Rossumda88dad1995-01-26 00:46:29 +000013249was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13251$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013253/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013254
13255#include <sys/types.h>
13256#include <sys/select.h>
13257#include <sys/time.h>
13258
Martin v. Löwis11437992002-04-12 09:54:03 +000013259int
13260main ()
13261{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013262;
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 ;
13264 return 0;
13265}
13266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013268
13269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013272 was_it_defined=yes
13273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13277$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13280$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013281if ${ac_cv_struct_addrinfo+:} 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. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013286#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013287int
13288main ()
13289{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013290struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 ;
13292 return 0;
13293}
13294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013296 ac_cv_struct_addrinfo=yes
13297else
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13301fi
13302
Matthias Kloseb9621712010-04-24 17:59:49 +000013303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13304$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013305if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308
13309fi
13310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13312$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013313if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013317/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013318
13319# include <sys/types.h>
13320# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013321int
13322main ()
13323{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013324struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013325 ;
13326 return 0;
13327}
13328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013330 ac_cv_struct_sockaddr_storage=yes
13331else
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13335fi
13336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13338$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013339if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013342
13343fi
13344
Christian Heimesdffa3942016-09-05 23:54:41 +020013345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13346$as_echo_n "checking for sockaddr_alg... " >&6; }
13347if ${ac_cv_struct_sockaddr_alg+:} false; then :
13348 $as_echo_n "(cached) " >&6
13349else
13350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13351/* end confdefs.h. */
13352
13353# include <sys/types.h>
13354# include <sys/socket.h>
13355# include <linux/if_alg.h>
13356int
13357main ()
13358{
13359struct sockaddr_alg s
13360 ;
13361 return 0;
13362}
13363_ACEOF
13364if ac_fn_c_try_compile "$LINENO"; then :
13365 ac_cv_struct_sockaddr_alg=yes
13366else
13367 ac_cv_struct_sockaddr_alg=no
13368fi
13369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13370fi
13371
13372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13373$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13374if test $ac_cv_struct_sockaddr_alg = yes; then
13375
13376$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13377
13378fi
13379
Guido van Rossum627b2d71993-12-24 10:39:16 +000013380# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13383$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013384if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013386else
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013389$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013390int
13391main ()
13392{
13393static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013394test_array [0] = 0;
13395return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013396
13397 ;
13398 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013399}
Martin v. Löwis11437992002-04-12 09:54:03 +000013400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013401if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013402 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013403else
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13409$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013412
13413fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13416$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013417if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013419else
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013421/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422
Martin v. Löwis11437992002-04-12 09:54:03 +000013423int
13424main ()
13425{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013426
Martin v. Löwis11437992002-04-12 09:54:03 +000013427#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013428 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013430 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013432 char const *const *pcpcc;
13433 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 /* NEC SVR4.0.2 mips cc rejects this. */
13435 struct point {int x, y;};
13436 static struct point const zero = {0,0};
13437 /* AIX XL C 1.02.0.0 rejects this.
13438 It does not let you subtract one const X* pointer from another in
13439 an arm of an if-expression whose if-part is not a constant
13440 expression */
13441 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444 ++pcpcc;
13445 ppc = (char**) pcpcc;
13446 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013447 { /* SCO 3.2v4 cc rejects this sort of thing. */
13448 char tx;
13449 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013451
Martin v. Löwis11437992002-04-12 09:54:03 +000013452 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013453 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 }
13455 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13456 int x[] = {25, 17};
13457 const int *foo = &x[0];
13458 ++foo;
13459 }
13460 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13461 typedef const int *iptr;
13462 iptr p = 0;
13463 ++p;
13464 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013465 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013467 struct s { int j; const int *ap[3]; } bx;
13468 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013469 }
13470 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13471 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013472 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013474 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013475#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013476
Martin v. Löwis11437992002-04-12 09:54:03 +000013477 ;
13478 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013479}
Martin v. Löwis11437992002-04-12 09:54:03 +000013480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013481if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482 ac_cv_c_const=yes
13483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13489$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013493
13494fi
13495
Michael W. Hudson54241132001-12-07 15:38:26 +000013496
Guido van Rossumda88dad1995-01-26 00:46:29 +000013497works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13499$as_echo_n "checking for working volatile... " >&6; }
13500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013501/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503int
13504main ()
13505{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013506volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 ;
13508 return 0;
13509}
13510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013511if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013512 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013513else
Skip Montanaro6dead952003-09-25 14:50:04 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013516
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013517
Guido van Rossum627b2d71993-12-24 10:39:16 +000013518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13521$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013522
Guido van Rossumda88dad1995-01-26 00:46:29 +000013523works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13525$as_echo_n "checking for working signed char... " >&6; }
13526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013527/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013528
Martin v. Löwis11437992002-04-12 09:54:03 +000013529int
13530main ()
13531{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013532signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 ;
13534 return 0;
13535}
13536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013537if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013538 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013539else
Skip Montanaro6dead952003-09-25 14:50:04 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013542
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013543
Guido van Rossum7f43da71994-08-01 12:15:30 +000013544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13547$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013548
Guido van Rossumda88dad1995-01-26 00:46:29 +000013549have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13551$as_echo_n "checking for prototypes... " >&6; }
13552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013553/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013554int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013555int
13556main ()
13557{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013558return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 ;
13560 return 0;
13561}
13562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013566
Matthias Kloseb159a552010-04-25 21:00:44 +000013567 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13571$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013572
Guido van Rossumda88dad1995-01-26 00:46:29 +000013573works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13575$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013577/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013578
13579#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013580int foo(int x, ...) {
13581 va_list va;
13582 va_start(va, x);
13583 va_arg(va, int);
13584 va_arg(va, char *);
13585 va_arg(va, double);
13586 return 0;
13587}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013588
Martin v. Löwis11437992002-04-12 09:54:03 +000013589int
13590main ()
13591{
Guido van Rossum90eea071996-08-30 20:58:57 +000013592return foo(10, "", 3.14);
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 :
Martin v. Löwis11437992002-04-12 09:54:03 +000013598
13599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013602 works=yes
13603
Guido van Rossum627b2d71993-12-24 10:39:16 +000013604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13607$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013608
Martin v. Löwisd6320502004-08-12 13:45:08 +000013609# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13611$as_echo_n "checking for socketpair... " >&6; }
13612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013613/* end confdefs.h. */
13614
13615#include <sys/types.h>
13616#include <sys/socket.h>
13617
13618int
13619main ()
13620{
13621void *x=socketpair
13622 ;
13623 return 0;
13624}
13625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013629
Matthias Kloseb159a552010-04-25 21:00:44 +000013630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013631$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13634$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013635
13636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013638
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013639# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13641$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013643/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013644#include <sys/types.h>
13645#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013646int
13647main ()
13648{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013649struct sockaddr x;
13650x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013651 ;
13652 return 0;
13653}
13654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013655if ac_fn_c_try_compile "$LINENO"; then :
13656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13657$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013658
Matthias Kloseb9621712010-04-24 17:59:49 +000013659$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013660
13661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13663$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013664
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013667
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013668# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
13670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013672if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13677$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013678 OLD_CFLAGS=$CFLAGS
13679 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013681/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013682
13683# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013684
Martin v. Löwis11437992002-04-12 09:54:03 +000013685int
13686main ()
13687{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013688
13689 char *name;
13690 struct hostent *he, *res;
13691 char buffer[2048];
13692 int buflen = 2048;
13693 int h_errnop;
13694
13695 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
13697 ;
13698 return 0;
13699}
13700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013701if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013704
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13709$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013711else
Skip Montanaro6dead952003-09-25 14:50:04 +000013712
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13714$as_echo "no" >&6; }
13715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13716$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013718/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013720# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013721
Martin v. Löwis11437992002-04-12 09:54:03 +000013722int
13723main ()
13724{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013725
13726 char *name;
13727 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013728 char buffer[2048];
13729 int buflen = 2048;
13730 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013731
Matthias Kloseb159a552010-04-25 21:00:44 +000013732 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
13734 ;
13735 return 0;
13736}
13737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013738if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013739
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013741
Martin v. Löwis11437992002-04-12 09:54:03 +000013742
Matthias Kloseb159a552010-04-25 21:00:44 +000013743$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13746$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013748else
Skip Montanaro6dead952003-09-25 14:50:04 +000013749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13751$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13753$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13755/* end confdefs.h. */
13756
13757# include <netdb.h>
13758
13759int
13760main ()
13761{
13762
13763 char *name;
13764 struct hostent *he;
13765 struct hostent_data data;
13766
13767 (void) gethostbyname_r(name, he, &data);
13768
13769 ;
13770 return 0;
13771}
13772_ACEOF
13773if ac_fn_c_try_compile "$LINENO"; then :
13774
13775 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13776
13777
13778$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13779
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13781$as_echo "yes" >&6; }
13782
13783else
13784
13785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13786$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013787
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013790
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013793
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013796 CFLAGS=$OLD_CFLAGS
13797
13798else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013799
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 for ac_func in gethostbyname
13801do :
13802 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013803if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013804 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013805#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013806_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013807
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013808fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013809done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013810
Michael W. Hudson54241132001-12-07 15:38:26 +000013811
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013812fi
13813
Michael W. Hudson54241132001-12-07 15:38:26 +000013814
13815
13816
13817
13818
13819
Guido van Rossum627b2d71993-12-24 10:39:16 +000013820# checks for system services
13821# (none yet)
13822
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013823# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013824ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013825if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013826
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013827else
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13829$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013830if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013832else
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013834LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838/* Override any GCC internal prototype to avoid an error.
13839 Use char because int might match the return type of a GCC
13840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013841#ifdef __cplusplus
13842extern "C"
13843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013844char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013845int
13846main ()
13847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013849 ;
13850 return 0;
13851}
13852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013855else
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013858rm -f core conftest.err conftest.$ac_objext \
13859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013860LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13863$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013864if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 cat >>confdefs.h <<_ACEOF
13866#define HAVE_LIBIEEE 1
13867_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013868
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013869 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013870
Guido van Rossum627b2d71993-12-24 10:39:16 +000013871fi
13872
Michael W. Hudson54241132001-12-07 15:38:26 +000013873
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013874fi
13875
Michael W. Hudson54241132001-12-07 15:38:26 +000013876
Guido van Rossum7f253911997-05-09 02:42:48 +000013877# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13879$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013882if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013884if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013885then
13886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013888
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13890$as_echo "yes" >&6; }
13891else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13892$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013893fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013894else
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13896$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897fi
13898
Guido van Rossum7f253911997-05-09 02:42:48 +000013899
Guido van Rossum7f43da71994-08-01 12:15:30 +000013900# check for --with-libm=...
13901
Guido van Rossum563e7081996-09-10 18:20:48 +000013902case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013903Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013904*) LIBM=-lm
13905esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13907$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013909# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013910if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013912if test "$withval" = no
13913then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13915$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013916elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013917then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13919$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013920else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013921fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013922else
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13924$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925fi
13926
Guido van Rossum7f43da71994-08-01 12:15:30 +000013927
13928# check for --with-libc=...
13929
Matthias Kloseb9621712010-04-24 17:59:49 +000013930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13931$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013934if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013936if test "$withval" = no
13937then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13939$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013940elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013941then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13943$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013944else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013945fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013946else
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13948$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949fi
13950
Guido van Rossum7f43da71994-08-01 12:15:30 +000013951
Stefan Krah1919b7e2012-03-21 18:25:23 +010013952# **************************************
13953# * Check for gcc x64 inline assembler *
13954# **************************************
13955
13956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13957$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959/* end confdefs.h. */
13960
13961int
13962main ()
13963{
13964
13965 __asm__ __volatile__ ("movq %rcx, %rax");
13966
13967 ;
13968 return 0;
13969}
13970_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013971if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013972 have_gcc_asm_for_x64=yes
13973else
13974 have_gcc_asm_for_x64=no
13975fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013976rm -f core conftest.err conftest.$ac_objext \
13977 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13979$as_echo "$have_gcc_asm_for_x64" >&6; }
13980if test "$have_gcc_asm_for_x64" = yes
13981then
13982
13983$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13984
13985fi
13986
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013987# **************************************************
13988# * Check for various properties of floating point *
13989# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13992$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013993if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013995else
13996
Matthias Kloseb9621712010-04-24 17:59:49 +000013997if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013998 ac_cv_little_endian_double=no
13999else
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014001/* end confdefs.h. */
14002
14003#include <string.h>
14004int main() {
14005 double x = 9006104071832581.0;
14006 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
14007 return 0;
14008 else
14009 return 1;
14010}
14011
14012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014013if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014014 ac_cv_little_endian_double=yes
14015else
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14019 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014020fi
14021
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014022fi
14023
Matthias Kloseb9621712010-04-24 17:59:49 +000014024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14025$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026if test "$ac_cv_little_endian_double" = yes
14027then
14028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014030
14031fi
14032
Matthias Kloseb9621712010-04-24 17:59:49 +000014033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14034$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014035if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014037else
14038
Matthias Kloseb9621712010-04-24 17:59:49 +000014039if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014040 ac_cv_big_endian_double=no
14041else
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014043/* end confdefs.h. */
14044
14045#include <string.h>
14046int main() {
14047 double x = 9006104071832581.0;
14048 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14049 return 0;
14050 else
14051 return 1;
14052}
14053
14054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014055if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014056 ac_cv_big_endian_double=yes
14057else
Matthias Kloseb9621712010-04-24 17:59:49 +000014058 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14061 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014062fi
14063
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014064fi
14065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14067$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014068if test "$ac_cv_big_endian_double" = yes
14069then
14070
Matthias Kloseb9621712010-04-24 17:59:49 +000014071$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014072
14073fi
14074
14075# Some ARM platforms use a mixed-endian representation for doubles.
14076# While Python doesn't currently have full support for these platforms
14077# (see e.g., issue 1762561), we can at least make sure that float <-> string
14078# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14080$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014081if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014083else
14084
Matthias Kloseb9621712010-04-24 17:59:49 +000014085if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014086 ac_cv_mixed_endian_double=no
14087else
Matthias Kloseb9621712010-04-24 17:59:49 +000014088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014089/* end confdefs.h. */
14090
14091#include <string.h>
14092int main() {
14093 double x = 9006104071832581.0;
14094 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14095 return 0;
14096 else
14097 return 1;
14098}
14099
14100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014101if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014102 ac_cv_mixed_endian_double=yes
14103else
Matthias Kloseb9621712010-04-24 17:59:49 +000014104 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14107 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014108fi
14109
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014110fi
14111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14113$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014114if test "$ac_cv_mixed_endian_double" = yes
14115then
14116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014118
14119fi
14120
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014121# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014122# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014123# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014124# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014125# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014126# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014127
14128# This inline assembler syntax may also work for suncc and icc,
14129# so we try it on all platforms.
14130
Matthias Kloseb9621712010-04-24 17:59:49 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14132$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014134/* end confdefs.h. */
14135
14136int
14137main ()
14138{
14139
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014140 unsigned short cw;
14141 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14142 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014143
14144 ;
14145 return 0;
14146}
14147_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014148if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014149 have_gcc_asm_for_x87=yes
14150else
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014152fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014153rm -f core conftest.err conftest.$ac_objext \
14154 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14156$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014157if test "$have_gcc_asm_for_x87" = yes
14158then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014159
Matthias Kloseb9621712010-04-24 17:59:49 +000014160$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014161
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014163
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14165$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14167/* end confdefs.h. */
14168
14169int
14170main ()
14171{
14172
14173 unsigned int fpcr;
14174 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14175 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14176
14177 ;
14178 return 0;
14179}
14180_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014181if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014182 have_gcc_asm_for_mc68881=yes
14183else
14184 have_gcc_asm_for_mc68881=no
14185fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014186rm -f core conftest.err conftest.$ac_objext \
14187 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14189$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14190if test "$have_gcc_asm_for_mc68881" = yes
14191then
14192
14193$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14194
14195fi
14196
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014197# Detect whether system arithmetic is subject to x87-style double
14198# rounding issues. The result of this test has little meaning on non
14199# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14200# mode is round-to-nearest and double rounding issues are present, and
14201# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14203$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014204# $BASECFLAGS may affect the result
14205ac_save_cc="$CC"
14206CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014207if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014208 ac_cv_x87_double_rounding=no
14209else
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014211/* end confdefs.h. */
14212
14213#include <stdlib.h>
14214#include <math.h>
14215int main() {
14216 volatile double x, y, z;
14217 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14218 x = 0.99999999999999989; /* 1-2**-53 */
14219 y = 1./x;
14220 if (y != 1.)
14221 exit(0);
14222 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14223 x = 1e16;
14224 y = 2.99999;
14225 z = x + y;
14226 if (z != 1e16+4.)
14227 exit(0);
14228 /* both tests show evidence of double rounding */
14229 exit(1);
14230}
14231
14232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014233if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014234 ac_cv_x87_double_rounding=no
14235else
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14239 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014240fi
14241
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014242CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14244$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014245if test "$ac_cv_x87_double_rounding" = yes
14246then
14247
Matthias Kloseb9621712010-04-24 17:59:49 +000014248$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014249
14250fi
14251
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014252# ************************************
14253# * Check for mathematical functions *
14254# ************************************
14255
14256LIBS_SAVE=$LIBS
14257LIBS="$LIBS $LIBM"
14258
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014259for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14260do :
14261 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14262ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014263if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014264 cat >>confdefs.h <<_ACEOF
14265#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14266_ACEOF
14267
14268fi
14269done
14270
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014271for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014272do :
14273 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14274ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014275if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014276 cat >>confdefs.h <<_ACEOF
14277#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14278_ACEOF
14279
14280fi
14281done
14282
14283ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14284"
Victor Stinnere0be4232011-10-25 13:06:09 +020014285if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014286 ac_have_decl=1
14287else
14288 ac_have_decl=0
14289fi
14290
14291cat >>confdefs.h <<_ACEOF
14292#define HAVE_DECL_ISINF $ac_have_decl
14293_ACEOF
14294ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14295"
Victor Stinnere0be4232011-10-25 13:06:09 +020014296if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014297 ac_have_decl=1
14298else
14299 ac_have_decl=0
14300fi
14301
14302cat >>confdefs.h <<_ACEOF
14303#define HAVE_DECL_ISNAN $ac_have_decl
14304_ACEOF
14305ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14306"
Victor Stinnere0be4232011-10-25 13:06:09 +020014307if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014308 ac_have_decl=1
14309else
14310 ac_have_decl=0
14311fi
14312
14313cat >>confdefs.h <<_ACEOF
14314#define HAVE_DECL_ISFINITE $ac_have_decl
14315_ACEOF
14316
14317
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014318# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14319# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14321$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014322if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014324else
14325
Matthias Kloseb9621712010-04-24 17:59:49 +000014326if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014327 ac_cv_tanh_preserves_zero_sign=no
14328else
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014330/* end confdefs.h. */
14331
14332#include <math.h>
14333#include <stdlib.h>
14334int main() {
14335 /* return 0 if either negative zeros don't exist
14336 on this platform or if negative zeros exist
14337 and tanh(-0.) == -0. */
14338 if (atan2(0., -1.) == atan2(-0., -1.) ||
14339 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14340 else exit(1);
14341}
14342
14343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014344if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014345 ac_cv_tanh_preserves_zero_sign=yes
14346else
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14350 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014351fi
14352
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014353fi
14354
Matthias Kloseb9621712010-04-24 17:59:49 +000014355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14356$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014357if test "$ac_cv_tanh_preserves_zero_sign" = yes
14358then
14359
Matthias Kloseb9621712010-04-24 17:59:49 +000014360$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014361
14362fi
14363
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014364if test "$ac_cv_func_log1p" = yes
14365then
14366 # On some versions of AIX, log1p(-0.) returns 0. instead of
14367 # -0. See issue #9920.
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14369$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014370 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014371 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014372else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014373
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014374 if test "$cross_compiling" = yes; then :
14375 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014376else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14378/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014379
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014380 #include <math.h>
14381 #include <stdlib.h>
14382 int main() {
14383 /* Fail if the signs of log1p(-0.) and -0. can be
14384 distinguished. */
14385 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14386 return 0;
14387 else
14388 return 1;
14389 }
14390
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014391_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014392if ac_fn_c_try_run "$LINENO"; then :
14393 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014394else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014395 ac_cv_log1p_drops_zero_sign=yes
14396fi
14397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14398 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014399fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014400
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014401fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014402
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14404$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14405fi
14406if test "$ac_cv_log1p_drops_zero_sign" = yes
14407then
14408
14409$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14410
14411fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014412
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014413LIBS=$LIBS_SAVE
14414
Mark Dickinsona614f042009-11-28 12:48:43 +000014415# For multiprocessing module, check that sem_open
14416# actually works. For FreeBSD versions <= 7.2,
14417# the kernel module that provides POSIX semaphores
14418# isn't loaded by default, so an attempt to call
14419# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14421$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014422if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014424else
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014426 ac_cv_posix_semaphores_enabled=yes
14427else
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014429/* end confdefs.h. */
14430
14431#include <unistd.h>
14432#include <fcntl.h>
14433#include <stdio.h>
14434#include <semaphore.h>
14435#include <sys/stat.h>
14436
14437int main(void) {
14438 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14439 if (a == SEM_FAILED) {
14440 perror("sem_open");
14441 return 1;
14442 }
14443 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014444 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014445 return 0;
14446}
14447
14448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014449if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014450 ac_cv_posix_semaphores_enabled=yes
14451else
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14455 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014456fi
14457
14458
Mark Dickinsona614f042009-11-28 12:48:43 +000014459fi
14460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14462$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014463if test $ac_cv_posix_semaphores_enabled = no
14464then
14465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014467
14468fi
14469
Mark Dickinson10683072009-04-18 21:18:19 +000014470# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14472$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014473if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014475else
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014477 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014478else
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014480/* end confdefs.h. */
14481
14482#include <unistd.h>
14483#include <fcntl.h>
14484#include <stdio.h>
14485#include <semaphore.h>
14486#include <sys/stat.h>
14487
14488int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014489 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014490 int count;
14491 int res;
14492 if(a==SEM_FAILED){
14493 perror("sem_open");
14494 return 1;
14495
14496 }
14497 res = sem_getvalue(a, &count);
14498 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014499 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014500 return res==-1 ? 1 : 0;
14501}
14502
Mark Dickinson10683072009-04-18 21:18:19 +000014503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014504if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014505 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014506else
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014509rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14510 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014511fi
14512
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014513
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014514fi
14515
Matthias Kloseb9621712010-04-24 17:59:49 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14517$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014518if test $ac_cv_broken_sem_getvalue = yes
14519then
14520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014522
14523fi
14524
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014525ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14526"
14527if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14528 ac_have_decl=1
14529else
14530 ac_have_decl=0
14531fi
14532
14533cat >>confdefs.h <<_ACEOF
14534#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14535_ACEOF
14536ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14537"
14538if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14539 ac_have_decl=1
14540else
14541 ac_have_decl=0
14542fi
14543
14544cat >>confdefs.h <<_ACEOF
14545#define HAVE_DECL_RTLD_NOW $ac_have_decl
14546_ACEOF
14547ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14548"
14549if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14550 ac_have_decl=1
14551else
14552 ac_have_decl=0
14553fi
14554
14555cat >>confdefs.h <<_ACEOF
14556#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14557_ACEOF
14558ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14559"
14560if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14561 ac_have_decl=1
14562else
14563 ac_have_decl=0
14564fi
14565
14566cat >>confdefs.h <<_ACEOF
14567#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14568_ACEOF
14569ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14570"
14571if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14572 ac_have_decl=1
14573else
14574 ac_have_decl=0
14575fi
14576
14577cat >>confdefs.h <<_ACEOF
14578#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14579_ACEOF
14580ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14581"
14582if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14583 ac_have_decl=1
14584else
14585 ac_have_decl=0
14586fi
14587
14588cat >>confdefs.h <<_ACEOF
14589#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14590_ACEOF
14591ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14592"
14593if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14594 ac_have_decl=1
14595else
14596 ac_have_decl=0
14597fi
14598
14599cat >>confdefs.h <<_ACEOF
14600#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14601_ACEOF
14602
14603
Mark Dickinsonbd792642009-03-18 20:06:12 +000014604# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14606$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014607# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014608if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014609 enableval=$enable_big_digits; case $enable_big_digits in
14610yes)
14611 enable_big_digits=30 ;;
14612no)
14613 enable_big_digits=15 ;;
1461415|30)
14615 ;;
14616*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014617 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 +000014618esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14620$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014621
14622cat >>confdefs.h <<_ACEOF
14623#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14624_ACEOF
14625
14626
14627else
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14629$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014630fi
14631
14632
Guido van Rossumef2255b2000-03-10 22:30:29 +000014633# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014634ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014635if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014636
14637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014639
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014640 wchar_h="yes"
14641
Guido van Rossumef2255b2000-03-10 22:30:29 +000014642else
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014644
14645fi
14646
Michael W. Hudson54241132001-12-07 15:38:26 +000014647
Martin v. Löwis11437992002-04-12 09:54:03 +000014648
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014649# determine wchar_t size
14650if test "$wchar_h" = yes
14651then
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14654# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14655# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14657$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014658if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014659 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014660else
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14662"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014663
Martin v. Löwis11437992002-04-12 09:54:03 +000014664else
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 if test "$ac_cv_type_wchar_t" = yes; then
14666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014668as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014669See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670 else
14671 ac_cv_sizeof_wchar_t=0
14672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014674
Martin v. Löwis11437992002-04-12 09:54:03 +000014675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14677$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678
14679
14680
Martin v. Löwis11437992002-04-12 09:54:03 +000014681cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014682#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014683_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014684
Michael W. Hudson54241132001-12-07 15:38:26 +000014685
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014686fi
14687
Matthias Kloseb9621712010-04-24 17:59:49 +000014688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14689$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014690have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014692/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014693
14694#include <tcl.h>
14695#if TCL_UTF_MAX != 6
14696# error "NOT UCS4_TCL"
14697#endif
14698int
14699main ()
14700{
14701
14702 ;
14703 return 0;
14704}
14705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014707
14708
Matthias Kloseb9621712010-04-24 17:59:49 +000014709$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014710
14711 have_ucs4_tcl=yes
14712
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14716$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014717
Skip Montanaro6dead952003-09-25 14:50:04 +000014718# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014719if test "$wchar_h" = yes
14720then
14721 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14723$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014724 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014726else
14727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014729 ac_cv_wchar_t_signed=yes
14730else
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014732/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014733
14734 #include <wchar.h>
14735 int main()
14736 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014737 /* Success: exit code 0 */
14738 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014739 }
14740
14741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014742if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014743 ac_cv_wchar_t_signed=yes
14744else
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014749fi
14750
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014751fi
14752
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14754$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755fi
14756
Georg Brandl52d168a2008-01-07 18:10:24 +000014757# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014758if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014759 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014760then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014761 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014762
Matthias Kloseb9621712010-04-24 17:59:49 +000014763$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014764
Georg Brandl52d168a2008-01-07 18:10:24 +000014765else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014766 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014767fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14769$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014770
14771# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14773$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014774if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014776else
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 ac_cv_c_bigendian=unknown
14778 # See if we're dealing with a universal compiler.
14779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780/* end confdefs.h. */
14781#ifndef __APPLE_CC__
14782 not a universal capable compiler
14783 #endif
14784 typedef int dummy;
14785
Skip Montanaro6dead952003-09-25 14:50:04 +000014786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014787if ac_fn_c_try_compile "$LINENO"; then :
14788
14789 # Check for potential -arch flags. It is not universal unless
14790 # there are at least two -arch flags with different values.
14791 ac_arch=
14792 ac_prev=
14793 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14794 if test -n "$ac_prev"; then
14795 case $ac_word in
14796 i?86 | x86_64 | ppc | ppc64)
14797 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14798 ac_arch=$ac_word
14799 else
14800 ac_cv_c_bigendian=universal
14801 break
14802 fi
14803 ;;
14804 esac
14805 ac_prev=
14806 elif test "x$ac_word" = "x-arch"; then
14807 ac_prev=arch
14808 fi
14809 done
14810fi
14811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14812 if test $ac_cv_c_bigendian = unknown; then
14813 # See if sys/param.h defines the BYTE_ORDER macro.
14814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014815/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014816#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014818
Martin v. Löwis11437992002-04-12 09:54:03 +000014819int
14820main ()
14821{
Matthias Kloseb9621712010-04-24 17:59:49 +000014822#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14823 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14824 && LITTLE_ENDIAN)
14825 bogus endian macros
14826 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014827
14828 ;
14829 return 0;
14830}
14831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014832if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014833 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014835/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014836#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014838
Martin v. Löwis11437992002-04-12 09:54:03 +000014839int
14840main ()
14841{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014842#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 not big endian
14844 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014845
14846 ;
14847 return 0;
14848}
14849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014850if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014851 ac_cv_c_bigendian=yes
14852else
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014856fi
14857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14858 fi
14859 if test $ac_cv_c_bigendian = unknown; then
14860 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014862/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014863#include <limits.h>
14864
Martin v. Löwis11437992002-04-12 09:54:03 +000014865int
14866main ()
14867{
Matthias Kloseb9621712010-04-24 17:59:49 +000014868#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14869 bogus endian macros
14870 #endif
14871
Martin v. Löwis11437992002-04-12 09:54:03 +000014872 ;
14873 return 0;
14874}
14875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014876if ac_fn_c_try_compile "$LINENO"; then :
14877 # It does; now see whether it defined to _BIG_ENDIAN or not.
14878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14879/* end confdefs.h. */
14880#include <limits.h>
14881
14882int
14883main ()
14884{
14885#ifndef _BIG_ENDIAN
14886 not big endian
14887 #endif
14888
14889 ;
14890 return 0;
14891}
14892_ACEOF
14893if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014895else
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14899fi
14900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14901 fi
14902 if test $ac_cv_c_bigendian = unknown; then
14903 # Compile a test program.
14904 if test "$cross_compiling" = yes; then :
14905 # Try to guess by grepping values from an object file.
14906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14907/* end confdefs.h. */
14908short int ascii_mm[] =
14909 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14910 short int ascii_ii[] =
14911 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14912 int use_ascii (int i) {
14913 return ascii_mm[i] + ascii_ii[i];
14914 }
14915 short int ebcdic_ii[] =
14916 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14917 short int ebcdic_mm[] =
14918 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14919 int use_ebcdic (int i) {
14920 return ebcdic_mm[i] + ebcdic_ii[i];
14921 }
14922 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923
Matthias Kloseb9621712010-04-24 17:59:49 +000014924int
14925main ()
14926{
14927return use_ascii (foo) == use_ebcdic (foo);
14928 ;
14929 return 0;
14930}
14931_ACEOF
14932if ac_fn_c_try_compile "$LINENO"; then :
14933 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14934 ac_cv_c_bigendian=yes
14935 fi
14936 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14937 if test "$ac_cv_c_bigendian" = unknown; then
14938 ac_cv_c_bigendian=no
14939 else
14940 # finding both strings is unlikely to happen, but who knows?
14941 ac_cv_c_bigendian=unknown
14942 fi
14943 fi
14944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014946else
Matthias Kloseb9621712010-04-24 17:59:49 +000014947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014948/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014950int
14951main ()
14952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 /* Are we little or big endian? From Harbison&Steele. */
14955 union
14956 {
14957 long int l;
14958 char c[sizeof (long int)];
14959 } u;
14960 u.l = 1;
14961 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962
14963 ;
14964 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014965}
Martin v. Löwis11437992002-04-12 09:54:03 +000014966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014967if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014968 ac_cv_c_bigendian=no
14969else
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14973 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14979$as_echo "$ac_cv_c_bigendian" >&6; }
14980 case $ac_cv_c_bigendian in #(
14981 yes)
14982 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14983;; #(
14984 no)
14985 ;; #(
14986 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014987
Matthias Kloseb9621712010-04-24 17:59:49 +000014988$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 ;; #(
14991 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014992 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014993 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014995
Michael W. Hudson54241132001-12-07 15:38:26 +000014996
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014997# ABI version string for Python extension modules. This appears between the
14998# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14999# from the following attributes which affect the ABI of this Python build (in
15000# this order):
15001#
15002# * The Python implementation (always 'cpython-' for us)
15003# * The major and minor version numbers
15004# * --with-pydebug (adds a 'd')
15005# * --with-pymalloc (adds a 'm')
15006# * --with-wide-unicode (adds a 'u')
15007#
15008# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015009# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15010# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015011
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15013$as_echo_n "checking ABIFLAGS... " >&6; }
15014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15015$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15017$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015018SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15020$as_echo "$SOABI" >&6; }
15021
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015022
15023case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015024 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015025 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15026 *)
15027 EXT_SUFFIX=${SHLIB_SUFFIX};;
15028esac
15029
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15031$as_echo_n "checking LDVERSION... " >&6; }
15032LDVERSION='$(VERSION)$(ABIFLAGS)'
15033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15034$as_echo "$LDVERSION" >&6; }
15035
doko@python.org87421192013-01-26 11:39:31 +010015036
doko@ubuntu.com55532312016-06-14 08:55:19 +020015037if test x$PLATFORM_TRIPLET = x; then
15038 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15039else
15040 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15041fi
doko@python.org87421192013-01-26 11:39:31 +010015042
15043
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015044# Check whether right shifting a negative integer extends the sign bit
15045# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15047$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015048if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015050else
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015053 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015054else
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015056/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015057
15058int main()
15059{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015060 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015061}
15062
Martin v. Löwis11437992002-04-12 09:54:03 +000015063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015064if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015065 ac_cv_rshift_extends_sign=yes
15066else
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15070 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015071fi
15072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073fi
15074
Matthias Kloseb9621712010-04-24 17:59:49 +000015075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15076$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015077if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015078then
Martin v. Löwis11437992002-04-12 09:54:03 +000015079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015081
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015082fi
15083
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015084# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15086$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015087if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015089else
Martin v. Löwis11437992002-04-12 09:54:03 +000015090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015092/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015093#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015094int
15095main ()
15096{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015097
15098 FILE *f = fopen("/dev/null", "r");
15099 flockfile(f);
15100 getc_unlocked(f);
15101 funlockfile(f);
15102
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 ;
15104 return 0;
15105}
15106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015107if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015108 ac_cv_have_getc_unlocked=yes
15109else
Matthias Kloseb9621712010-04-24 17:59:49 +000015110 ac_cv_have_getc_unlocked=no
15111fi
15112rm -f core conftest.err conftest.$ac_objext \
15113 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115
Matthias Kloseb9621712010-04-24 17:59:49 +000015116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15117$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015118if test "$ac_cv_have_getc_unlocked" = yes
15119then
Martin v. Löwis11437992002-04-12 09:54:03 +000015120
Matthias Kloseb9621712010-04-24 17:59:49 +000015121$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015122
15123fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015124
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015125# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015126# save the value of LIBS so we don't actually link Python with readline
15127LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015128
Gregory P. Smith18820942008-09-07 06:24:49 +000015129# On some systems we need to link readline to a termcap compatible
15130# library. NOTE: Keep the precedence of listed libraries synchronised
15131# with setup.py.
15132py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15134$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015135for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015136 if test -z "$py_libtermcap"; then
15137 READLINE_LIBS="-lreadline"
15138 else
15139 READLINE_LIBS="-lreadline -l$py_libtermcap"
15140 fi
15141 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015143/* end confdefs.h. */
15144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145/* Override any GCC internal prototype to avoid an error.
15146 Use char because int might match the return type of a GCC
15147 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015148#ifdef __cplusplus
15149extern "C"
15150#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015151char readline ();
15152int
15153main ()
15154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015156 ;
15157 return 0;
15158}
15159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015160if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015161 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015163rm -f core conftest.err conftest.$ac_objext \
15164 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015165 if test $py_cv_lib_readline = yes; then
15166 break
15167 fi
15168done
15169# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15170#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015171if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15173$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015174else
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15176$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015177
Matthias Kloseb9621712010-04-24 17:59:49 +000015178$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015179
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015180fi
15181
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015182# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15184$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015185if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187else
15188 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015189LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015191/* end confdefs.h. */
15192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193/* Override any GCC internal prototype to avoid an error.
15194 Use char because int might match the return type of a GCC
15195 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015196#ifdef __cplusplus
15197extern "C"
15198#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015199char rl_callback_handler_install ();
15200int
15201main ()
15202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015204 ;
15205 return 0;
15206}
15207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015208if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015209 ac_cv_lib_readline_rl_callback_handler_install=yes
15210else
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015213rm -f core conftest.err conftest.$ac_objext \
15214 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015215LIBS=$ac_check_lib_save_LIBS
15216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15218$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015219if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015222
15223fi
15224
15225
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015226# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015228/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015229#include <readline/readline.h>
15230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015231if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015232 have_readline=yes
15233else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015234 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015235
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015236fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015237rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015238if test $have_readline = yes
15239then
Matthias Kloseb9621712010-04-24 17:59:49 +000015240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015241/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015242#include <readline/readline.h>
15243
15244_ACEOF
15245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015247
Matthias Kloseb9621712010-04-24 17:59:49 +000015248$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015249
15250fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015251rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015254/* end confdefs.h. */
15255#include <readline/readline.h>
15256
15257_ACEOF
15258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015262
15263fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015264rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015265
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015266fi
15267
Martin v. Löwis0daad592001-09-30 21:09:59 +000015268# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15270$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015271if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015273else
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015275LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279/* Override any GCC internal prototype to avoid an error.
15280 Use char because int might match the return type of a GCC
15281 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015282#ifdef __cplusplus
15283extern "C"
15284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015285char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015286int
15287main ()
15288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015289return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 ;
15291 return 0;
15292}
15293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015294if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015296else
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015299rm -f core conftest.err conftest.$ac_objext \
15300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015301LIBS=$ac_check_lib_save_LIBS
15302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15304$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015305if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015306
Matthias Kloseb9621712010-04-24 17:59:49 +000015307$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015308
Martin v. Löwis0daad592001-09-30 21:09:59 +000015309fi
15310
Michael W. Hudson54241132001-12-07 15:38:26 +000015311
Thomas Wouters89d996e2007-09-08 17:39:28 +000015312# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15314$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015315if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015317else
15318 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015319LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015321/* end confdefs.h. */
15322
15323/* Override any GCC internal prototype to avoid an error.
15324 Use char because int might match the return type of a GCC
15325 builtin and then its argument prototype would still apply. */
15326#ifdef __cplusplus
15327extern "C"
15328#endif
15329char rl_completion_display_matches_hook ();
15330int
15331main ()
15332{
15333return rl_completion_display_matches_hook ();
15334 ;
15335 return 0;
15336}
15337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015338if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015339 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15340else
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015343rm -f core conftest.err conftest.$ac_objext \
15344 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015345LIBS=$ac_check_lib_save_LIBS
15346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15348$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015349if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015352
15353fi
15354
15355
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015356# also in 4.0, but not in editline
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15358$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15359if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15360 $as_echo_n "(cached) " >&6
15361else
15362 ac_check_lib_save_LIBS=$LIBS
15363LIBS="-lreadline $READLINE_LIBS $LIBS"
15364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365/* end confdefs.h. */
15366
15367/* Override any GCC internal prototype to avoid an error.
15368 Use char because int might match the return type of a GCC
15369 builtin and then its argument prototype would still apply. */
15370#ifdef __cplusplus
15371extern "C"
15372#endif
15373char rl_resize_terminal ();
15374int
15375main ()
15376{
15377return rl_resize_terminal ();
15378 ;
15379 return 0;
15380}
15381_ACEOF
15382if ac_fn_c_try_link "$LINENO"; then :
15383 ac_cv_lib_readline_rl_resize_terminal=yes
15384else
15385 ac_cv_lib_readline_rl_resize_terminal=no
15386fi
15387rm -f core conftest.err conftest.$ac_objext \
15388 conftest$ac_exeext conftest.$ac_ext
15389LIBS=$ac_check_lib_save_LIBS
15390fi
15391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15392$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15393if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15394
15395$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15396
15397fi
15398
15399
Martin v. Löwis0daad592001-09-30 21:09:59 +000015400# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15402$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015403if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015404 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015405else
Martin v. Löwis11437992002-04-12 09:54:03 +000015406 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015407LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411/* Override any GCC internal prototype to avoid an error.
15412 Use char because int might match the return type of a GCC
15413 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015414#ifdef __cplusplus
15415extern "C"
15416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015417char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015418int
15419main ()
15420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 ;
15423 return 0;
15424}
15425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015426if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015428else
Matthias Kloseb9621712010-04-24 17:59:49 +000015429 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015431rm -f core conftest.err conftest.$ac_objext \
15432 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015433LIBS=$ac_check_lib_save_LIBS
15434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15436$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015437if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015438
Matthias Kloseb9621712010-04-24 17:59:49 +000015439$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015440
Guido van Rossum353ae582001-07-10 16:45:32 +000015441fi
15442
Jack Jansendd19cf82001-12-06 22:36:17 +000015443
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015444# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015446/* end confdefs.h. */
15447#include <readline/readline.h>
15448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015449if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015450 have_readline=yes
15451else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015452 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015453
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015454fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015455rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015456if test $have_readline = yes
15457then
Matthias Kloseb9621712010-04-24 17:59:49 +000015458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015459/* end confdefs.h. */
15460#include <readline/readline.h>
15461
15462_ACEOF
15463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015465
Matthias Kloseb9621712010-04-24 17:59:49 +000015466$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015467
15468fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015469rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015470
15471fi
15472
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15474$as_echo_n "checking for append_history in -lreadline... " >&6; }
15475if ${ac_cv_lib_readline_append_history+:} false; then :
15476 $as_echo_n "(cached) " >&6
15477else
15478 ac_check_lib_save_LIBS=$LIBS
15479LIBS="-lreadline $READLINE_LIBS $LIBS"
15480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15481/* end confdefs.h. */
15482
15483/* Override any GCC internal prototype to avoid an error.
15484 Use char because int might match the return type of a GCC
15485 builtin and then its argument prototype would still apply. */
15486#ifdef __cplusplus
15487extern "C"
15488#endif
15489char append_history ();
15490int
15491main ()
15492{
15493return append_history ();
15494 ;
15495 return 0;
15496}
15497_ACEOF
15498if ac_fn_c_try_link "$LINENO"; then :
15499 ac_cv_lib_readline_append_history=yes
15500else
15501 ac_cv_lib_readline_append_history=no
15502fi
15503rm -f core conftest.err conftest.$ac_objext \
15504 conftest$ac_exeext conftest.$ac_ext
15505LIBS=$ac_check_lib_save_LIBS
15506fi
15507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15508$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15509if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15510
15511$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15512
15513fi
15514
15515
Martin v. Löwis82bca632006-02-10 20:49:30 +000015516# End of readline checks: restore LIBS
15517LIBS=$LIBS_no_readline
15518
Matthias Kloseb9621712010-04-24 17:59:49 +000015519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15520$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015521if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015523else
Martin v. Löwis11437992002-04-12 09:54:03 +000015524
Matthias Kloseb9621712010-04-24 17:59:49 +000015525if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015526 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015527else
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015529/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015530
15531int main()
15532{
15533 int val1 = nice(1);
15534 if (val1 != -1 && val1 == nice(2))
15535 exit(0);
15536 exit(1);
15537}
15538
Martin v. Löwis11437992002-04-12 09:54:03 +000015539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015540if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015541 ac_cv_broken_nice=yes
15542else
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15546 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015547fi
15548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549fi
15550
Matthias Kloseb9621712010-04-24 17:59:49 +000015551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15552$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015553if test "$ac_cv_broken_nice" = yes
15554then
Martin v. Löwis11437992002-04-12 09:54:03 +000015555
Matthias Kloseb9621712010-04-24 17:59:49 +000015556$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015557
15558fi
15559
Matthias Kloseb9621712010-04-24 17:59:49 +000015560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15561$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015562if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015563 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015564else
Matthias Kloseb9621712010-04-24 17:59:49 +000015565 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015566 ac_cv_broken_poll=no
15567else
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015569/* end confdefs.h. */
15570
15571#include <poll.h>
15572
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015573int main()
15574{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015575 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015576 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015577
15578 close (42);
15579
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015580 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015581 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015582 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015583 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015584 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015585 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015586 return 1;
15587}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015588
15589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015590if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015591 ac_cv_broken_poll=yes
15592else
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15596 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015599fi
15600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15602$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015603if test "$ac_cv_broken_poll" = yes
15604then
15605
Matthias Kloseb9621712010-04-24 17:59:49 +000015606$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015607
15608fi
15609
Brett Cannon43802422005-02-10 20:48:03 +000015610# 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 +000015611# (which is not required by ISO C or UNIX spec) and/or if we support
15612# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015613ac_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 +000015614#include <$ac_cv_struct_tm>
15615
Matthias Kloseb9621712010-04-24 17:59:49 +000015616"
Victor Stinnere0be4232011-10-25 13:06:09 +020015617if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015618
15619cat >>confdefs.h <<_ACEOF
15620#define HAVE_STRUCT_TM_TM_ZONE 1
15621_ACEOF
15622
15623
15624fi
15625
15626if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15627
Matthias Kloseb9621712010-04-24 17:59:49 +000015628$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015629
15630else
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15632"
Victor Stinnere0be4232011-10-25 13:06:09 +020015633if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015634 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635else
Matthias Kloseb9621712010-04-24 17:59:49 +000015636 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637fi
15638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015639cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015640#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015641_ACEOF
15642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15644$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015645if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647else
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015649/* end confdefs.h. */
15650#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015651#if !HAVE_DECL_TZNAME
15652extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015653#endif
15654
15655int
15656main ()
15657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015659 ;
15660 return 0;
15661}
15662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015663if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015664 ac_cv_var_tzname=yes
15665else
Matthias Kloseb9621712010-04-24 17:59:49 +000015666 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015668rm -f core conftest.err conftest.$ac_objext \
15669 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15672$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015673 if test $ac_cv_var_tzname = yes; then
15674
Matthias Kloseb9621712010-04-24 17:59:49 +000015675$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015676
15677 fi
15678fi
15679
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015680
Martin v. Löwis1d459062005-03-14 21:23:33 +000015681# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15683$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015684if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015686else
15687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015689 ac_cv_working_tzset=no
15690else
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015692/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015693
15694#include <stdlib.h>
15695#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015696#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015697
15698#if HAVE_TZNAME
15699extern char *tzname[];
15700#endif
15701
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015702int main()
15703{
Brett Cannon18367812003-09-19 00:59:16 +000015704 /* Note that we need to ensure that not only does tzset(3)
15705 do 'something' with localtime, but it works as documented
15706 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015707 This includes making sure that tzname is set properly if
15708 tm->tm_zone does not exist since it is the alternative way
15709 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015710
15711 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015712 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015713 */
15714
Martin v. Löwis1d459062005-03-14 21:23:33 +000015715 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015716 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15717
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015718 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015719 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015720 if (localtime(&groundhogday)->tm_hour != 0)
15721 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015722#if HAVE_TZNAME
15723 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15724 if (strcmp(tzname[0], "UTC") ||
15725 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15726 exit(1);
15727#endif
Brett Cannon18367812003-09-19 00:59:16 +000015728
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015729 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015730 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015731 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015732 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015733#if HAVE_TZNAME
15734 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15735 exit(1);
15736#endif
Brett Cannon18367812003-09-19 00:59:16 +000015737
15738 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15739 tzset();
15740 if (localtime(&groundhogday)->tm_hour != 11)
15741 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015742#if HAVE_TZNAME
15743 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15744 exit(1);
15745#endif
15746
15747#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015748 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15749 exit(1);
15750 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15751 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015752#endif
Brett Cannon18367812003-09-19 00:59:16 +000015753
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015754 exit(0);
15755}
15756
15757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015758if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015759 ac_cv_working_tzset=yes
15760else
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15764 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015765fi
15766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015767fi
15768
Matthias Kloseb9621712010-04-24 17:59:49 +000015769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15770$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015771if test "$ac_cv_working_tzset" = yes
15772then
15773
Matthias Kloseb9621712010-04-24 17:59:49 +000015774$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015775
15776fi
15777
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015778# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15780$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015781if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015783else
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015785/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015786#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015787int
15788main ()
15789{
15790
15791struct stat st;
15792st.st_mtim.tv_nsec = 1;
15793
15794 ;
15795 return 0;
15796}
15797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015798if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015799 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015800else
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15804fi
15805
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15807$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015808if test "$ac_cv_stat_tv_nsec" = yes
15809then
15810
Matthias Kloseb9621712010-04-24 17:59:49 +000015811$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015812
15813fi
15814
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015815# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15817$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015818if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015819 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015820else
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015822/* end confdefs.h. */
15823#include <sys/stat.h>
15824int
15825main ()
15826{
15827
15828struct stat st;
15829st.st_mtimespec.tv_nsec = 1;
15830
15831 ;
15832 return 0;
15833}
15834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015835if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015836 ac_cv_stat_tv_nsec2=yes
15837else
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15841fi
15842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15844$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015845if test "$ac_cv_stat_tv_nsec2" = yes
15846then
15847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015849
15850fi
15851
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015852# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015853ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015854if test "$cross_compiling" = no; then
15855 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15856fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015857
15858for ac_header in curses.h ncurses.h
15859do :
15860 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15861ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15862if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15863 cat >>confdefs.h <<_ACEOF
15864#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15865_ACEOF
15866
15867fi
15868
15869done
15870
15871
15872# On Solaris, term.h requires curses.h
15873for ac_header in term.h
15874do :
15875 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15876#ifdef HAVE_CURSES_H
15877#include <curses.h>
15878#endif
15879
15880"
15881if test "x$ac_cv_header_term_h" = xyes; then :
15882 cat >>confdefs.h <<_ACEOF
15883#define HAVE_TERM_H 1
15884_ACEOF
15885
15886fi
15887
15888done
15889
15890
Jack Jansen666b1e72001-10-31 12:11:48 +000015891# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15893$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015894if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015895 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015896else
Matthias Kloseb9621712010-04-24 17:59:49 +000015897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015898/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015899#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015900int
15901main ()
15902{
Jack Jansen666b1e72001-10-31 12:11:48 +000015903
15904 int rtn;
15905 rtn = mvwdelch(0,0,0);
15906
Martin v. Löwis11437992002-04-12 09:54:03 +000015907 ;
15908 return 0;
15909}
15910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015911if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015912 ac_cv_mvwdelch_is_expression=yes
15913else
Matthias Kloseb9621712010-04-24 17:59:49 +000015914 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15917fi
15918
Matthias Kloseb9621712010-04-24 17:59:49 +000015919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15920$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015921
15922if test "$ac_cv_mvwdelch_is_expression" = yes
15923then
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
Matthias Kloseb9621712010-04-24 17:59:49 +000015925$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015926
15927fi
15928
Matthias Kloseb9621712010-04-24 17:59:49 +000015929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15930$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015931if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015932 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015933else
Matthias Kloseb9621712010-04-24 17:59:49 +000015934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015935/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015936#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015937int
15938main ()
15939{
Jack Jansen666b1e72001-10-31 12:11:48 +000015940
15941 WINDOW *w;
15942 w->_flags = 0;
15943
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 ;
15945 return 0;
15946}
15947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015948if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015949 ac_cv_window_has_flags=yes
15950else
Matthias Kloseb9621712010-04-24 17:59:49 +000015951 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15954fi
15955
Matthias Kloseb9621712010-04-24 17:59:49 +000015956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15957$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015958
Jack Jansen666b1e72001-10-31 12:11:48 +000015959
15960if test "$ac_cv_window_has_flags" = yes
15961then
Martin v. Löwis11437992002-04-12 09:54:03 +000015962
Matthias Kloseb9621712010-04-24 17:59:49 +000015963$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015964
15965fi
15966
Matthias Kloseb9621712010-04-24 17:59:49 +000015967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15968$as_echo_n "checking for is_term_resized... " >&6; }
15969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015970/* end confdefs.h. */
15971#include <curses.h>
15972int
15973main ()
15974{
15975void *x=is_term_resized
15976 ;
15977 return 0;
15978}
15979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015980if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015983
Matthias Kloseb159a552010-04-25 21:00:44 +000015984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015985$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015986else
Matthias Kloseb9621712010-04-24 17:59:49 +000015987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15988$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015989
15990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15994$as_echo_n "checking for resize_term... " >&6; }
15995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015996/* end confdefs.h. */
15997#include <curses.h>
15998int
15999main ()
16000{
16001void *x=resize_term
16002 ;
16003 return 0;
16004}
16005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016006if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016007
Matthias Kloseb9621712010-04-24 17:59:49 +000016008$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016009
Matthias Kloseb159a552010-04-25 21:00:44 +000016010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016011$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016012else
Matthias Kloseb9621712010-04-24 17:59:49 +000016013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16014$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016015
16016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16018
Matthias Kloseb9621712010-04-24 17:59:49 +000016019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16020$as_echo_n "checking for resizeterm... " >&6; }
16021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016022/* end confdefs.h. */
16023#include <curses.h>
16024int
16025main ()
16026{
16027void *x=resizeterm
16028 ;
16029 return 0;
16030}
16031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016032if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016033
Matthias Kloseb9621712010-04-24 17:59:49 +000016034$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016035
Matthias Kloseb159a552010-04-25 21:00:44 +000016036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016037$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016038else
Matthias Kloseb9621712010-04-24 17:59:49 +000016039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16040$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016041
16042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016044# last curses configure check
16045CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16048$as_echo "$as_me: checking for device files" >&6;}
16049
16050if test "x$cross_compiling" = xyes; then
16051 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16053$as_echo_n "checking for /dev/ptmx... " >&6; }
16054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16055$as_echo "not set" >&6; }
16056 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16057 fi
16058 if test "${ac_cv_file__dev_ptc+set}" != set; then
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16060$as_echo_n "checking for /dev/ptc... " >&6; }
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16062$as_echo "not set" >&6; }
16063 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16064 fi
16065fi
16066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16068$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016069if ${ac_cv_file__dev_ptmx+:} false; then :
16070 $as_echo_n "(cached) " >&6
16071else
16072 test "$cross_compiling" = yes &&
16073 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16074if test -r "/dev/ptmx"; then
16075 ac_cv_file__dev_ptmx=yes
16076else
16077 ac_cv_file__dev_ptmx=no
16078fi
16079fi
16080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16081$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16082if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016083
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016084fi
16085
16086if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016087
Matthias Kloseb9621712010-04-24 17:59:49 +000016088$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016089
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16092$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016093if ${ac_cv_file__dev_ptc+:} false; then :
16094 $as_echo_n "(cached) " >&6
16095else
16096 test "$cross_compiling" = yes &&
16097 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16098if test -r "/dev/ptc"; then
16099 ac_cv_file__dev_ptc=yes
16100else
16101 ac_cv_file__dev_ptc=no
16102fi
16103fi
16104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16105$as_echo "$ac_cv_file__dev_ptc" >&6; }
16106if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016107
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016108fi
16109
16110if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016111
Matthias Kloseb9621712010-04-24 17:59:49 +000016112$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016113
Neal Norwitz865400f2003-03-21 01:42:58 +000016114fi
16115
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016116if test $ac_sys_system = Darwin
16117then
16118 LIBS="$LIBS -framework CoreFoundation"
16119fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016120
Matthias Kloseb9621712010-04-24 17:59:49 +000016121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16122$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016123if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016125else
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016127 ac_cv_have_size_t_format="cross -- assuming yes"
16128
Thomas Wouters477c8d52006-05-27 19:21:47 +000016129else
Matthias Kloseb9621712010-04-24 17:59:49 +000016130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016131/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016132
Thomas Wouters477c8d52006-05-27 19:21:47 +000016133#include <stdio.h>
16134#include <stddef.h>
16135#include <string.h>
16136
Christian Heimes2c181612007-12-17 20:04:13 +000016137#ifdef HAVE_SYS_TYPES_H
16138#include <sys/types.h>
16139#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016140
16141#ifdef HAVE_SSIZE_T
16142typedef ssize_t Py_ssize_t;
16143#elif SIZEOF_VOID_P == SIZEOF_LONG
16144typedef long Py_ssize_t;
16145#else
16146typedef int Py_ssize_t;
16147#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016148
Christian Heimes2c181612007-12-17 20:04:13 +000016149int main()
16150{
16151 char buffer[256];
16152
Thomas Wouters477c8d52006-05-27 19:21:47 +000016153 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16154 return 1;
16155
Thomas Wouters89f507f2006-12-13 04:49:30 +000016156 if (strcmp(buffer, "123"))
16157 return 1;
16158
16159 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16160 return 1;
16161
16162 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016163 return 1;
16164
16165 return 0;
16166}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016167
Thomas Wouters477c8d52006-05-27 19:21:47 +000016168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016169if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016170 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016171else
Matthias Kloseb9621712010-04-24 17:59:49 +000016172 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016176fi
16177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16180$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016181if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016182
Matthias Kloseb9621712010-04-24 17:59:49 +000016183$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016184
16185fi
16186
Matthias Kloseb9621712010-04-24 17:59:49 +000016187ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016188#ifdef HAVE_SYS_TYPES_H
16189#include <sys/types.h>
16190#endif
16191#ifdef HAVE_SYS_SOCKET_H
16192#include <sys/socket.h>
16193#endif
16194
Matthias Kloseb9621712010-04-24 17:59:49 +000016195"
Victor Stinnere0be4232011-10-25 13:06:09 +020016196if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016197
Martin v. Löwis11437992002-04-12 09:54:03 +000016198else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016199
Matthias Kloseb9621712010-04-24 17:59:49 +000016200$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016201
16202fi
16203
Michael W. Hudson54241132001-12-07 15:38:26 +000016204
Matthias Kloseb9621712010-04-24 17:59:49 +000016205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16206$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016207if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016208 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016209else
Matthias Kloseb9621712010-04-24 17:59:49 +000016210 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016211 ac_cv_broken_mbstowcs=no
16212else
Matthias Kloseb9621712010-04-24 17:59:49 +000016213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016214/* end confdefs.h. */
16215
Stefan Krah19c21392012-11-22 23:47:32 +010016216#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016217#include<stdlib.h>
16218int main() {
16219 size_t len = -1;
16220 const char *str = "text";
16221 len = mbstowcs(NULL, str, 0);
16222 return (len != 4);
16223}
16224
16225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016226if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016227 ac_cv_broken_mbstowcs=no
16228else
Matthias Kloseb9621712010-04-24 17:59:49 +000016229 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16232 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016233fi
16234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016235fi
16236
Matthias Kloseb9621712010-04-24 17:59:49 +000016237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16238$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016239if test "$ac_cv_broken_mbstowcs" = yes
16240then
16241
Matthias Kloseb9621712010-04-24 17:59:49 +000016242$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016243
16244fi
16245
Antoine Pitroub52ec782009-01-25 16:34:23 +000016246# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16248$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016249
16250# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016251if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016252 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016253if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016254then
16255
Matthias Kloseb9621712010-04-24 17:59:49 +000016256$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016257
Matthias Kloseb9621712010-04-24 17:59:49 +000016258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16259$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016260fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016261if test "$withval" = no
16262then
16263
16264$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16265
Matthias Kloseb9621712010-04-24 17:59:49 +000016266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16267$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016268fi
16269
Antoine Pitrou042b1282010-08-13 21:15:58 +000016270else
16271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16272$as_echo "no value specified" >&6; }
16273fi
16274
Antoine Pitroub52ec782009-01-25 16:34:23 +000016275
Matthias Kloseb17289e2012-03-15 19:51:34 +010016276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16277$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16278if ${ac_cv_computed_gotos+:} false; then :
16279 $as_echo_n "(cached) " >&6
16280else
16281 if test "$cross_compiling" = yes; then :
16282 if test "${with_computed_gotos+set}" = set; then
16283 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16284 else
16285 ac_cv_computed_gotos=no
16286 fi
16287else
16288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16289/* end confdefs.h. */
16290
16291int main(int argc, char **argv)
16292{
16293 static void *targets[1] = { &&LABEL1 };
16294 goto LABEL2;
16295LABEL1:
16296 return 0;
16297LABEL2:
16298 goto *targets[0];
16299 return 1;
16300}
16301
16302_ACEOF
16303if ac_fn_c_try_run "$LINENO"; then :
16304 ac_cv_computed_gotos=yes
16305else
16306 ac_cv_computed_gotos=no
16307fi
16308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16309 conftest.$ac_objext conftest.beam conftest.$ac_ext
16310fi
16311
16312fi
16313
16314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16315$as_echo "$ac_cv_computed_gotos" >&6; }
16316case "$ac_cv_computed_gotos" in yes*)
16317
16318$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16319
16320esac
16321
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016322case $ac_sys_system in
16323AIX*)
16324
16325$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16326 ;;
16327esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016328
Michael W. Hudson54241132001-12-07 15:38:26 +000016329
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016330
16331
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016332for h in `(cd $srcdir;echo Python/thread_*.h)`
16333do
16334 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16335done
16336
Michael W. Hudson54241132001-12-07 15:38:26 +000016337
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016338SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16340$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016341for dir in $SRCDIRS; do
16342 if test ! -d $dir; then
16343 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016344 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016345done
Matthias Kloseb9621712010-04-24 17:59:49 +000016346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16347$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016348
Stefan Krah1919b7e2012-03-21 18:25:23 +010016349# Availability of -O2:
16350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16351$as_echo_n "checking for -O2... " >&6; }
16352saved_cflags="$CFLAGS"
16353CFLAGS="-O2"
16354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16355/* end confdefs.h. */
16356
16357int
16358main ()
16359{
16360
16361
16362 ;
16363 return 0;
16364}
16365_ACEOF
16366if ac_fn_c_try_compile "$LINENO"; then :
16367 have_O2=yes
16368else
16369 have_O2=no
16370fi
16371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16373$as_echo "$have_O2" >&6; }
16374CFLAGS="$saved_cflags"
16375
16376# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16377# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16379$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16380saved_cflags="$CFLAGS"
16381CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16382if test "$have_O2" = no; then
16383 CFLAGS=""
16384fi
16385if test "$cross_compiling" = yes; then :
16386 have_glibc_memmove_bug=undefined
16387else
16388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16389/* end confdefs.h. */
16390
16391#include <stdio.h>
16392#include <stdlib.h>
16393#include <string.h>
16394void foo(void *p, void *q) { memmove(p, q, 19); }
16395int main() {
16396 char a[32] = "123456789000000000";
16397 foo(&a[9], a);
16398 if (strcmp(a, "123456789123456789000000000") != 0)
16399 return 1;
16400 foo(a, &a[9]);
16401 if (strcmp(a, "123456789000000000") != 0)
16402 return 1;
16403 return 0;
16404}
16405
16406_ACEOF
16407if ac_fn_c_try_run "$LINENO"; then :
16408 have_glibc_memmove_bug=no
16409else
16410 have_glibc_memmove_bug=yes
16411fi
16412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16413 conftest.$ac_objext conftest.beam conftest.$ac_ext
16414fi
16415
16416CFLAGS="$saved_cflags"
16417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16418$as_echo "$have_glibc_memmove_bug" >&6; }
16419if test "$have_glibc_memmove_bug" = yes; then
16420
16421$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16422
16423fi
16424
16425if test "$have_gcc_asm_for_x87" = yes; then
16426 # Some versions of gcc miscompile inline asm:
16427 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16428 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16429 case $CC in
16430 *gcc*)
16431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16432$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16433 saved_cflags="$CFLAGS"
16434 CFLAGS="-O2"
16435 if test "$cross_compiling" = yes; then :
16436 have_ipa_pure_const_bug=undefined
16437else
16438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16439/* end confdefs.h. */
16440
16441 __attribute__((noinline)) int
16442 foo(int *p) {
16443 int r;
16444 asm ( "movl \$6, (%1)\n\t"
16445 "xorl %0, %0\n\t"
16446 : "=r" (r) : "r" (p) : "memory"
16447 );
16448 return r;
16449 }
16450 int main() {
16451 int p = 8;
16452 if ((foo(&p) ? : p) != 6)
16453 return 1;
16454 return 0;
16455 }
16456
16457_ACEOF
16458if ac_fn_c_try_run "$LINENO"; then :
16459 have_ipa_pure_const_bug=no
16460else
16461 have_ipa_pure_const_bug=yes
16462fi
16463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16464 conftest.$ac_objext conftest.beam conftest.$ac_ext
16465fi
16466
16467 CFLAGS="$saved_cflags"
16468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16469$as_echo "$have_ipa_pure_const_bug" >&6; }
16470 if test "$have_ipa_pure_const_bug" = yes; then
16471
16472$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16473
16474 fi
16475 ;;
16476 esac
16477fi
16478
Victor Stinner4f5366e2015-01-09 02:13:19 +010016479# Check for stdatomic.h
16480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16481$as_echo_n "checking for stdatomic.h... " >&6; }
16482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16483/* end confdefs.h. */
16484
16485
16486 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016487 atomic_int value = ATOMIC_VAR_INIT(1);
16488 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016489 int main() {
16490 int loaded_value = atomic_load(&value);
16491 return 0;
16492 }
16493
16494
16495_ACEOF
16496if ac_fn_c_try_link "$LINENO"; then :
16497 have_stdatomic_h=yes
16498else
16499 have_stdatomic_h=no
16500fi
16501rm -f core conftest.err conftest.$ac_objext \
16502 conftest$ac_exeext conftest.$ac_ext
16503
16504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16505$as_echo "$have_stdatomic_h" >&6; }
16506
16507if test "$have_stdatomic_h" = yes; then
16508
16509$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16510
16511fi
16512
16513# Check for GCC >= 4.7 __atomic builtins
16514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16515$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16517/* end confdefs.h. */
16518
16519
16520 volatile int val = 1;
16521 int main() {
16522 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16523 return 0;
16524 }
16525
16526
16527_ACEOF
16528if ac_fn_c_try_link "$LINENO"; then :
16529 have_builtin_atomic=yes
16530else
16531 have_builtin_atomic=no
16532fi
16533rm -f core conftest.err conftest.$ac_objext \
16534 conftest$ac_exeext conftest.$ac_ext
16535
16536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16537$as_echo "$have_builtin_atomic" >&6; }
16538
16539if test "$have_builtin_atomic" = yes; then
16540
16541$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16542
16543fi
16544
Ned Deily322f5ba2013-11-21 23:01:59 -080016545# ensurepip option
16546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16547$as_echo_n "checking for ensurepip... " >&6; }
16548
16549# Check whether --with-ensurepip was given.
16550if test "${with_ensurepip+set}" = set; then :
16551 withval=$with_ensurepip;
16552else
16553 with_ensurepip=upgrade
16554fi
16555
16556case $with_ensurepip in #(
16557 yes|upgrade) :
16558 ENSUREPIP=upgrade ;; #(
16559 install) :
16560 ENSUREPIP=install ;; #(
16561 no) :
16562 ENSUREPIP=no ;; #(
16563 *) :
16564 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16565esac
16566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16567$as_echo "$ENSUREPIP" >&6; }
16568
16569
Victor Stinner35a97c02015-03-08 02:59:09 +010016570# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16572$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16574/* end confdefs.h. */
16575
16576
16577 #include <dirent.h>
16578
16579 int main() {
16580 struct dirent entry;
16581 return entry.d_type == DT_UNKNOWN;
16582 }
16583
16584
16585_ACEOF
16586if ac_fn_c_try_link "$LINENO"; then :
16587 have_dirent_d_type=yes
16588else
16589 have_dirent_d_type=no
16590fi
16591rm -f core conftest.err conftest.$ac_objext \
16592 conftest$ac_exeext conftest.$ac_ext
16593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16594$as_echo "$have_dirent_d_type" >&6; }
16595
16596if test "$have_dirent_d_type" = yes; then
16597
16598$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16599
16600fi
16601
Victor Stinner9eb57c52015-03-19 22:21:49 +010016602# check if the Linux getrandom() syscall is available
16603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16604$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16606/* end confdefs.h. */
16607
16608
Victor Stinner1b80b242016-04-12 22:34:58 +020016609 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016610 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016611 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016612
16613 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016614 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016615 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016616 const int flags = GRND_NONBLOCK;
16617 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016618 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016619 return 0;
16620 }
16621
16622
16623_ACEOF
16624if ac_fn_c_try_link "$LINENO"; then :
16625 have_getrandom_syscall=yes
16626else
16627 have_getrandom_syscall=no
16628fi
16629rm -f core conftest.err conftest.$ac_objext \
16630 conftest$ac_exeext conftest.$ac_ext
16631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16632$as_echo "$have_getrandom_syscall" >&6; }
16633
16634if test "$have_getrandom_syscall" = yes; then
16635
16636$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16637
16638fi
16639
Victor Stinner3abf44e2015-09-18 15:38:37 +020016640# check if the getrandom() function is available
16641# the test was written for the Solaris function of <sys/random.h>
16642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16643$as_echo_n "checking for the getrandom() function... " >&6; }
16644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16645/* end confdefs.h. */
16646
16647
16648 #include <sys/random.h>
16649
16650 int main() {
16651 char buffer[1];
16652 const size_t buflen = sizeof(buffer);
16653 const int flags = 0;
16654 /* ignore the result, Python checks for ENOSYS at runtime */
16655 (void)getrandom(buffer, buflen, flags);
16656 return 0;
16657 }
16658
16659
16660_ACEOF
16661if ac_fn_c_try_link "$LINENO"; then :
16662 have_getrandom=yes
16663else
16664 have_getrandom=no
16665fi
16666rm -f core conftest.err conftest.$ac_objext \
16667 conftest$ac_exeext conftest.$ac_ext
16668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16669$as_echo "$have_getrandom" >&6; }
16670
16671if test "$have_getrandom" = yes; then
16672
16673$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16674
16675fi
16676
Guido van Rossum627b2d71993-12-24 10:39:16 +000016677# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016678ac_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 +000016679
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016680ac_config_files="$ac_config_files Modules/ld_so_aix"
16681
Martin v. Löwis11437992002-04-12 09:54:03 +000016682cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016683# This file is a shell script that caches the results of configure
16684# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016685# scripts and configure runs, see configure's option --config-cache.
16686# It is not useful on other systems. If it contains results you don't
16687# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016688#
Martin v. Löwis11437992002-04-12 09:54:03 +000016689# config.status only pays attention to the cache file if you give it
16690# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016691#
Skip Montanaro6dead952003-09-25 14:50:04 +000016692# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016693# loading this file, other *unset* `ac_cv_foo' will be assigned the
16694# following values.
16695
16696_ACEOF
16697
Guido van Rossumf78abae1997-01-21 22:02:36 +000016698# The following way of writing the cache mishandles newlines in values,
16699# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016701# Ultrix sh set writes to stderr and can't be redirected directly,
16702# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703(
16704 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16705 eval ac_val=\$$ac_var
16706 case $ac_val in #(
16707 *${as_nl}*)
16708 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016709 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16710$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711 esac
16712 case $ac_var in #(
16713 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016714 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16715 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716 esac ;;
16717 esac
16718 done
16719
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16722 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016723 # `set' does not quote correctly, so add quotes: double-quote
16724 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016725 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016726 "s/'/'\\\\''/g;
16727 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016729 *)
16730 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016733 esac |
16734 sort
16735) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016736 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016738 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016740 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16741 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016742 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16743 :end' >>confcache
16744if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16745 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016746 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016747 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16748$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016749 if test ! -f "$cache_file" || test -h "$cache_file"; then
16750 cat confcache >"$cache_file"
16751 else
16752 case $cache_file in #(
16753 */* | ?:*)
16754 mv -f confcache "$cache_file"$$ &&
16755 mv -f "$cache_file"$$ "$cache_file" ;; #(
16756 *)
16757 mv -f confcache "$cache_file" ;;
16758 esac
16759 fi
16760 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016761 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016762 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16763$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016764 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016765fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016766rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016767
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016768test "x$prefix" = xNONE && prefix=$ac_default_prefix
16769# Let make expand exec_prefix.
16770test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016771
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016772DEFS=-DHAVE_CONFIG_H
16773
Skip Montanaro6dead952003-09-25 14:50:04 +000016774ac_libobjs=
16775ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016776U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016777for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16778 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016779 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016780 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016781 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16782 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016783 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16784 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016785done
16786LIBOBJS=$ac_libobjs
16787
16788LTLIBOBJS=$ac_ltlibobjs
16789
16790
Martin v. Löwis11437992002-04-12 09:54:03 +000016791
Matthias Kloseb9621712010-04-24 17:59:49 +000016792
Victor Stinnere0be4232011-10-25 13:06:09 +020016793: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016794ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016795ac_clean_files_save=$ac_clean_files
16796ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016797{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16798$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16799as_write_fail=0
16800cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016801#! $SHELL
16802# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016803# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016804# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016805# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016806
Martin v. Löwis11437992002-04-12 09:54:03 +000016807debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016808ac_cs_recheck=false
16809ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016810
Matthias Kloseb9621712010-04-24 17:59:49 +000016811SHELL=\${CONFIG_SHELL-$SHELL}
16812export SHELL
16813_ASEOF
16814cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16815## -------------------- ##
16816## M4sh Initialization. ##
16817## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819# Be more Bourne compatible
16820DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016821if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016822 emulate sh
16823 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016824 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016825 # is contrary to our usage. Disable this feature.
16826 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016828else
Matthias Kloseb9621712010-04-24 17:59:49 +000016829 case `(set -o) 2>/dev/null` in #(
16830 *posix*) :
16831 set -o posix ;; #(
16832 *) :
16833 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016835fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016836
16837
Matthias Kloseb9621712010-04-24 17:59:49 +000016838as_nl='
16839'
16840export as_nl
16841# Printing a long string crashes Solaris 7 /usr/bin/printf.
16842as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16843as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16844as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16845# Prefer a ksh shell builtin over an external printf program on Solaris,
16846# but without wasting forks for bash or zsh.
16847if test -z "$BASH_VERSION$ZSH_VERSION" \
16848 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16849 as_echo='print -r --'
16850 as_echo_n='print -rn --'
16851elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16852 as_echo='printf %s\n'
16853 as_echo_n='printf %s'
16854else
16855 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16856 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16857 as_echo_n='/usr/ucb/echo -n'
16858 else
16859 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16860 as_echo_n_body='eval
16861 arg=$1;
16862 case $arg in #(
16863 *"$as_nl"*)
16864 expr "X$arg" : "X\\(.*\\)$as_nl";
16865 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16866 esac;
16867 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16868 '
16869 export as_echo_n_body
16870 as_echo_n='sh -c $as_echo_n_body as_echo'
16871 fi
16872 export as_echo_body
16873 as_echo='sh -c $as_echo_body as_echo'
16874fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016875
16876# The user is always right.
16877if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 PATH_SEPARATOR=:
16879 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16880 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16881 PATH_SEPARATOR=';'
16882 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885
16886# IFS
16887# We need space, tab and new line, in precisely that order. Quoting is
16888# there to prevent editors from complaining about space-tab.
16889# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16890# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891IFS=" "" $as_nl"
16892
16893# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016894as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016895case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896 *[\\/]* ) as_myself=$0 ;;
16897 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016898for as_dir in $PATH
16899do
16900 IFS=$as_save_IFS
16901 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016902 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16903 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016904IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016906 ;;
16907esac
16908# We did not find ourselves, most probably we were run as `sh COMMAND'
16909# in which case we are not to be found in the path.
16910if test "x$as_myself" = x; then
16911 as_myself=$0
16912fi
16913if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016914 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16915 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916fi
16917
Matthias Kloseb9621712010-04-24 17:59:49 +000016918# Unset variables that we do not need and which cause bugs (e.g. in
16919# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16920# suppresses any "Segmentation fault" message there. '((' could
16921# trigger a bug in pdksh 5.2.14.
16922for as_var in BASH_ENV ENV MAIL MAILPATH
16923do eval test x\${$as_var+set} = xset \
16924 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925done
16926PS1='$ '
16927PS2='> '
16928PS4='+ '
16929
16930# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016931LC_ALL=C
16932export LC_ALL
16933LANGUAGE=C
16934export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935
Matthias Kloseb9621712010-04-24 17:59:49 +000016936# CDPATH.
16937(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16938
16939
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016940# as_fn_error STATUS ERROR [LINENO LOG_FD]
16941# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016942# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16943# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016944# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016945as_fn_error ()
16946{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016947 as_status=$1; test $as_status -eq 0 && as_status=1
16948 if test "$4"; then
16949 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16950 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016951 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016952 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016953 as_fn_exit $as_status
16954} # as_fn_error
16955
16956
16957# as_fn_set_status STATUS
16958# -----------------------
16959# Set $? to STATUS, without forking.
16960as_fn_set_status ()
16961{
16962 return $1
16963} # as_fn_set_status
16964
16965# as_fn_exit STATUS
16966# -----------------
16967# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16968as_fn_exit ()
16969{
16970 set +e
16971 as_fn_set_status $1
16972 exit $1
16973} # as_fn_exit
16974
16975# as_fn_unset VAR
16976# ---------------
16977# Portably unset VAR.
16978as_fn_unset ()
16979{
16980 { eval $1=; unset $1;}
16981}
16982as_unset=as_fn_unset
16983# as_fn_append VAR VALUE
16984# ----------------------
16985# Append the text in VALUE to the end of the definition contained in VAR. Take
16986# advantage of any shell optimizations that allow amortized linear growth over
16987# repeated appends, instead of the typical quadratic growth present in naive
16988# implementations.
16989if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16990 eval 'as_fn_append ()
16991 {
16992 eval $1+=\$2
16993 }'
16994else
16995 as_fn_append ()
16996 {
16997 eval $1=\$$1\$2
16998 }
16999fi # as_fn_append
17000
17001# as_fn_arith ARG...
17002# ------------------
17003# Perform arithmetic evaluation on the ARGs, and store the result in the
17004# global $as_val. Take advantage of shells that can avoid forks. The arguments
17005# must be portable across $(()) and expr.
17006if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17007 eval 'as_fn_arith ()
17008 {
17009 as_val=$(( $* ))
17010 }'
17011else
17012 as_fn_arith ()
17013 {
17014 as_val=`expr "$@" || test $? -eq 1`
17015 }
17016fi # as_fn_arith
17017
17018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017019if expr a : '\(a\)' >/dev/null 2>&1 &&
17020 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17021 as_expr=expr
17022else
17023 as_expr=false
17024fi
17025
17026if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17027 as_basename=basename
17028else
17029 as_basename=false
17030fi
17031
Matthias Kloseb9621712010-04-24 17:59:49 +000017032if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17033 as_dirname=dirname
17034else
17035 as_dirname=false
17036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038as_me=`$as_basename -- "$0" ||
17039$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17040 X"$0" : 'X\(//\)$' \| \
17041 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017042$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043 sed '/^.*\/\([^/][^/]*\)\/*$/{
17044 s//\1/
17045 q
17046 }
17047 /^X\/\(\/\/\)$/{
17048 s//\1/
17049 q
17050 }
17051 /^X\/\(\/\).*/{
17052 s//\1/
17053 q
17054 }
17055 s/.*/./; q'`
17056
Matthias Kloseb9621712010-04-24 17:59:49 +000017057# Avoid depending upon Character Ranges.
17058as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17059as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17060as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17061as_cr_digits='0123456789'
17062as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017063
17064ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017065case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017066-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017067 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017069 xy) ECHO_C='\c';;
17070 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17071 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072 esac;;
17073*)
17074 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017076
Martin v. Löwis11437992002-04-12 09:54:03 +000017077rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017078if test -d conf$$.dir; then
17079 rm -f conf$$.dir/conf$$.file
17080else
17081 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017082 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017084if (echo >conf$$.file) 2>/dev/null; then
17085 if ln -s conf$$.file conf$$ 2>/dev/null; then
17086 as_ln_s='ln -s'
17087 # ... but there are two gotchas:
17088 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17089 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017090 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017091 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017092 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017093 elif ln conf$$.file conf$$ 2>/dev/null; then
17094 as_ln_s=ln
17095 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017096 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017097 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017098else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017099 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17102rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017103
Matthias Kloseb9621712010-04-24 17:59:49 +000017104
17105# as_fn_mkdir_p
17106# -------------
17107# Create "$as_dir" as a directory, including parents if necessary.
17108as_fn_mkdir_p ()
17109{
17110
17111 case $as_dir in #(
17112 -*) as_dir=./$as_dir;;
17113 esac
17114 test -d "$as_dir" || eval $as_mkdir_p || {
17115 as_dirs=
17116 while :; do
17117 case $as_dir in #(
17118 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17119 *) as_qdir=$as_dir;;
17120 esac
17121 as_dirs="'$as_qdir' $as_dirs"
17122 as_dir=`$as_dirname -- "$as_dir" ||
17123$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17124 X"$as_dir" : 'X\(//\)[^/]' \| \
17125 X"$as_dir" : 'X\(//\)$' \| \
17126 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17127$as_echo X"$as_dir" |
17128 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17129 s//\1/
17130 q
17131 }
17132 /^X\(\/\/\)[^/].*/{
17133 s//\1/
17134 q
17135 }
17136 /^X\(\/\/\)$/{
17137 s//\1/
17138 q
17139 }
17140 /^X\(\/\).*/{
17141 s//\1/
17142 q
17143 }
17144 s/.*/./; q'`
17145 test -d "$as_dir" && break
17146 done
17147 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017148 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017149
17150
17151} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017152if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017153 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017154else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017155 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017156 as_mkdir_p=false
17157fi
17158
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017159
17160# as_fn_executable_p FILE
17161# -----------------------
17162# Test if FILE is an executable regular file.
17163as_fn_executable_p ()
17164{
17165 test -f "$1" && test -x "$1"
17166} # as_fn_executable_p
17167as_test_x='test -x'
17168as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017169
17170# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017171as_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 +000017172
17173# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017174as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017175
17176
Martin v. Löwis11437992002-04-12 09:54:03 +000017177exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017178## ----------------------------------- ##
17179## Main body of $CONFIG_STATUS script. ##
17180## ----------------------------------- ##
17181_ASEOF
17182test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
Matthias Kloseb9621712010-04-24 17:59:49 +000017184cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17185# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017186# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187# values after options handling.
17188ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017189This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017190generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017191
17192 CONFIG_FILES = $CONFIG_FILES
17193 CONFIG_HEADERS = $CONFIG_HEADERS
17194 CONFIG_LINKS = $CONFIG_LINKS
17195 CONFIG_COMMANDS = $CONFIG_COMMANDS
17196 $ $0 $@
17197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198on `(hostname || uname -n) 2>/dev/null | sed 1q`
17199"
17200
Martin v. Löwis11437992002-04-12 09:54:03 +000017201_ACEOF
17202
Matthias Kloseb9621712010-04-24 17:59:49 +000017203case $ac_config_files in *"
17204"*) set x $ac_config_files; shift; ac_config_files=$*;;
17205esac
17206
17207case $ac_config_headers in *"
17208"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17209esac
17210
17211
17212cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017213# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017214config_files="$ac_config_files"
17215config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017218
Matthias Kloseb9621712010-04-24 17:59:49 +000017219cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017220ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017221\`$as_me' instantiates files and other configuration actions
17222from templates according to the current configuration. Unless the files
17223and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017224
Matthias Kloseb9621712010-04-24 17:59:49 +000017225Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017226
17227 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017229 --config print configuration, then exit
17230 -q, --quiet, --silent
17231 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017232 -d, --debug don't remove temporary files
17233 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017234 --file=FILE[:TEMPLATE]
17235 instantiate the configuration file FILE
17236 --header=FILE[:TEMPLATE]
17237 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017238
17239Configuration files:
17240$config_files
17241
17242Configuration headers:
17243$config_headers
17244
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017245Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017248cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17249ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017250ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017251python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017252configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017253 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017254
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017255Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017256This config.status script is free software; the Free Software Foundation
17257gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258
17259ac_pwd='$ac_pwd'
17260srcdir='$srcdir'
17261INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017262MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017263test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017264_ACEOF
17265
Matthias Kloseb9621712010-04-24 17:59:49 +000017266cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17267# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017268ac_need_defaults=:
17269while test $# != 0
17270do
17271 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017272 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017273 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17274 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017275 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017276 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277 --*=)
17278 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17279 ac_optarg=
17280 ac_shift=:
17281 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017283 ac_option=$1
17284 ac_optarg=$2
17285 ac_shift=shift
17286 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 esac
17288
Skip Montanaro6dead952003-09-25 14:50:04 +000017289 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017290 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017291 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17292 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017294 $as_echo "$ac_cs_version"; exit ;;
17295 --config | --confi | --conf | --con | --co | --c )
17296 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017298 debug=: ;;
17299 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017300 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017301 case $ac_optarg in
17302 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017303 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017304 esac
17305 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017306 ac_need_defaults=false;;
17307 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017308 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017309 case $ac_optarg in
17310 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17311 esac
17312 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017314 --he | --h)
17315 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017316 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017317Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017319 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017320 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17321 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17322 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017323
17324 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017325 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017326Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017327
Matthias Kloseb9621712010-04-24 17:59:49 +000017328 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017330
17331 esac
17332 shift
17333done
17334
Skip Montanaro6dead952003-09-25 14:50:04 +000017335ac_configure_extra_args=
17336
17337if $ac_cs_silent; then
17338 exec 6>/dev/null
17339 ac_configure_extra_args="$ac_configure_extra_args --silent"
17340fi
17341
17342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017344if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017345 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017346 shift
17347 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17348 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017351fi
17352
Martin v. Löwis11437992002-04-12 09:54:03 +000017353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355exec 5>>config.log
17356{
17357 echo
17358 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17359## Running $as_me. ##
17360_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017361 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017365cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017366_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017367
Matthias Kloseb9621712010-04-24 17:59:49 +000017368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369
17370# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017371for ac_config_target in $ac_config_targets
17372do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373 case $ac_config_target in
17374 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17375 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17376 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017377 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17378 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17380 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017381 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017382 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017383 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384
Victor Stinnere0be4232011-10-25 13:06:09 +020017385 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017386 esac
17387done
17388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389
Martin v. Löwis11437992002-04-12 09:54:03 +000017390# If the user did not use the arguments to specify the items to instantiate,
17391# then the envvar interface is used. Set only those that are not.
17392# We use the long form for the default assignment because of an extremely
17393# bizarre bug on SunOS 4.1.3.
17394if $ac_need_defaults; then
17395 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17396 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17397fi
17398
Skip Montanaro6dead952003-09-25 14:50:04 +000017399# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017401# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402# Hook for its removal unless debugging.
17403# Note that there is a small window in which the directory will not be cleaned:
17404# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017405$debug ||
17406{
Victor Stinnere0be4232011-10-25 13:06:09 +020017407 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017409 : "${ac_tmp:=$tmp}"
17410 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017412 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017413}
Martin v. Löwis11437992002-04-12 09:54:03 +000017414# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017415
Martin v. Löwis11437992002-04-12 09:54:03 +000017416{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017418 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017419} ||
17420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421 tmp=./conf$$-$RANDOM
17422 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017423} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017424ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017425
Matthias Kloseb9621712010-04-24 17:59:49 +000017426# Set up the scripts for CONFIG_FILES section.
17427# No need to generate them if there are no CONFIG_FILES.
17428# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017430
Matthias Kloseb9621712010-04-24 17:59:49 +000017431
17432ac_cr=`echo X | tr X '\015'`
17433# On cygwin, bash can eat \r inside `` if the user requested igncr.
17434# But we know of no other shell where ac_cr would be empty at this
17435# point, so we can use a bashism as a fallback.
17436if test "x$ac_cr" = x; then
17437 eval ac_cr=\$\'\\r\'
17438fi
17439ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17440if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017441 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017442else
17443 ac_cs_awk_cr=$ac_cr
17444fi
17445
Victor Stinnere0be4232011-10-25 13:06:09 +020017446echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017447_ACEOF
17448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449
Matthias Kloseb9621712010-04-24 17:59:49 +000017450{
17451 echo "cat >conf$$subs.awk <<_ACEOF" &&
17452 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17453 echo "_ACEOF"
17454} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017455 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17456ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457ac_delim='%!_!# '
17458for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017459 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017460 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461
Matthias Kloseb9621712010-04-24 17:59:49 +000017462 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17463 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464 break
17465 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017466 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467 else
17468 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470done
Matthias Kloseb9621712010-04-24 17:59:49 +000017471rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472
Matthias Kloseb9621712010-04-24 17:59:49 +000017473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017474cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017476sed -n '
17477h
17478s/^/S["/; s/!.*/"]=/
17479p
17480g
17481s/^[^!]*!//
17482:repl
17483t repl
17484s/'"$ac_delim"'$//
17485t delim
17486:nl
17487h
17488s/\(.\{148\}\)..*/\1/
17489t more1
17490s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17491p
17492n
17493b repl
17494:more1
17495s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17496p
17497g
17498s/.\{148\}//
17499t nl
17500:delim
17501h
17502s/\(.\{148\}\)..*/\1/
17503t more2
17504s/["\\]/\\&/g; s/^/"/; s/$/"/
17505p
17506b
17507:more2
17508s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17509p
17510g
17511s/.\{148\}//
17512t delim
17513' <conf$$subs.awk | sed '
17514/^[^""]/{
17515 N
17516 s/\n//
17517}
17518' >>$CONFIG_STATUS || ac_write_fail=1
17519rm -f conf$$subs.awk
17520cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17521_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017522cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017523 for (key in S) S_is_set[key] = 1
17524 FS = ""
17525
17526}
17527{
17528 line = $ 0
17529 nfields = split(line, field, "@")
17530 substed = 0
17531 len = length(field[1])
17532 for (i = 2; i < nfields; i++) {
17533 key = field[i]
17534 keylen = length(key)
17535 if (S_is_set[key]) {
17536 value = S[key]
17537 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17538 len += length(value) + length(field[++i])
17539 substed = 1
17540 } else
17541 len += 1 + keylen
17542 }
17543
17544 print line
17545}
17546
17547_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017549cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17550if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17551 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17552else
17553 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017554fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017555 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017556_ACEOF
17557
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017558# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17559# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560# trailing colons and then remove the whole line if VPATH becomes empty
17561# (actually we leave an empty line to preserve line numbers).
17562if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017563 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17564h
17565s///
17566s/^/:/
17567s/[ ]*$/:/
17568s/:\$(srcdir):/:/g
17569s/:\${srcdir}:/:/g
17570s/:@srcdir@:/:/g
17571s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017573x
17574s/\(=[ ]*\).*/\1/
17575G
17576s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577s/^[^=]*=[ ]*$//
17578}'
17579fi
17580
Matthias Kloseb9621712010-04-24 17:59:49 +000017581cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017582fi # test -n "$CONFIG_FILES"
17583
Matthias Kloseb9621712010-04-24 17:59:49 +000017584# Set up the scripts for CONFIG_HEADERS section.
17585# No need to generate them if there are no CONFIG_HEADERS.
17586# This happens for instance with `./config.status Makefile'.
17587if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017588cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017589BEGIN {
17590_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591
Matthias Kloseb9621712010-04-24 17:59:49 +000017592# Transform confdefs.h into an awk script `defines.awk', embedded as
17593# here-document in config.status, that substitutes the proper values into
17594# config.h.in to produce config.h.
17595
17596# Create a delimiter string that does not exist in confdefs.h, to ease
17597# handling of long lines.
17598ac_delim='%!_!# '
17599for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017600 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17601 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017602 break
17603 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017604 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017605 else
17606 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17607 fi
17608done
17609
17610# For the awk script, D is an array of macro values keyed by name,
17611# likewise P contains macro parameters if any. Preserve backslash
17612# newline sequences.
17613
17614ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17615sed -n '
17616s/.\{148\}/&'"$ac_delim"'/g
17617t rset
17618:rset
17619s/^[ ]*#[ ]*define[ ][ ]*/ /
17620t def
17621d
17622:def
17623s/\\$//
17624t bsnl
17625s/["\\]/\\&/g
17626s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17627D["\1"]=" \3"/p
17628s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17629d
17630:bsnl
17631s/["\\]/\\&/g
17632s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17633D["\1"]=" \3\\\\\\n"\\/p
17634t cont
17635s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17636t cont
17637d
17638:cont
17639n
17640s/.\{148\}/&'"$ac_delim"'/g
17641t clear
17642:clear
17643s/\\$//
17644t bsnlc
17645s/["\\]/\\&/g; s/^/"/; s/$/"/p
17646d
17647:bsnlc
17648s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17649b cont
17650' <confdefs.h | sed '
17651s/'"$ac_delim"'/"\\\
17652"/g' >>$CONFIG_STATUS || ac_write_fail=1
17653
17654cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17655 for (key in D) D_is_set[key] = 1
17656 FS = ""
17657}
17658/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17659 line = \$ 0
17660 split(line, arg, " ")
17661 if (arg[1] == "#") {
17662 defundef = arg[2]
17663 mac1 = arg[3]
17664 } else {
17665 defundef = substr(arg[1], 2)
17666 mac1 = arg[2]
17667 }
17668 split(mac1, mac2, "(") #)
17669 macro = mac2[1]
17670 prefix = substr(line, 1, index(line, defundef) - 1)
17671 if (D_is_set[macro]) {
17672 # Preserve the white space surrounding the "#".
17673 print prefix "define", macro P[macro] D[macro]
17674 next
17675 } else {
17676 # Replace #undef with comments. This is necessary, for example,
17677 # in the case of _POSIX_SOURCE, which is predefined and required
17678 # on some systems where configure will not decide to define it.
17679 if (defundef == "undef") {
17680 print "/*", prefix defundef, macro, "*/"
17681 next
17682 }
17683 }
17684}
17685{ print }
17686_ACAWK
17687_ACEOF
17688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017689 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017690fi # test -n "$CONFIG_HEADERS"
17691
17692
17693eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17694shift
17695for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017696do
17697 case $ac_tag in
17698 :[FHLC]) ac_mode=$ac_tag; continue;;
17699 esac
17700 case $ac_mode$ac_tag in
17701 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017702 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703 :[FH]-) ac_tag=-:-;;
17704 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17705 esac
17706 ac_save_IFS=$IFS
17707 IFS=:
17708 set x $ac_tag
17709 IFS=$ac_save_IFS
17710 shift
17711 ac_file=$1
17712 shift
17713
17714 case $ac_mode in
17715 :L) ac_source=$1;;
17716 :[FH])
17717 ac_file_inputs=
17718 for ac_f
17719 do
17720 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017721 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 *) # Look for the file first in the build tree, then in the source tree
17723 # (if the path is not absolute). The absolute path cannot be DOS-style,
17724 # because $ac_f cannot contain `:'.
17725 test -f "$ac_f" ||
17726 case $ac_f in
17727 [\\/$]*) false;;
17728 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17729 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017730 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017732 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17733 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 done
17735
17736 # Let's still pretend it is `configure' which instantiates (i.e., don't
17737 # use $as_me), people would be surprised to read:
17738 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017739 configure_input='Generated from '`
17740 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17741 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742 if test x"$ac_file" != x-; then
17743 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017744 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17745$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017747 # Neutralize special characters interpreted by sed in replacement strings.
17748 case $configure_input in #(
17749 *\&* | *\|* | *\\* )
17750 ac_sed_conf_input=`$as_echo "$configure_input" |
17751 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17752 *) ac_sed_conf_input=$configure_input;;
17753 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754
17755 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017756 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17757 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758 esac
17759 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017760 esac
17761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017763$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017764 X"$ac_file" : 'X\(//\)[^/]' \| \
17765 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017767$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17769 s//\1/
17770 q
17771 }
17772 /^X\(\/\/\)[^/].*/{
17773 s//\1/
17774 q
17775 }
17776 /^X\(\/\/\)$/{
17777 s//\1/
17778 q
17779 }
17780 /^X\(\/\).*/{
17781 s//\1/
17782 q
17783 }
17784 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017785 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017786 ac_builddir=.
17787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788case "$ac_dir" in
17789.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17790*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017791 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017793 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794 case $ac_top_builddir_sub in
17795 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17796 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17797 esac ;;
17798esac
17799ac_abs_top_builddir=$ac_pwd
17800ac_abs_builddir=$ac_pwd$ac_dir_suffix
17801# for backward compatibility:
17802ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017803
17804case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017806 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807 ac_top_srcdir=$ac_top_builddir_sub
17808 ac_abs_top_srcdir=$ac_pwd ;;
17809 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017810 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811 ac_top_srcdir=$srcdir
17812 ac_abs_top_srcdir=$srcdir ;;
17813 *) # Relative name.
17814 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17815 ac_top_srcdir=$ac_top_build_prefix$srcdir
17816 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017817esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017819
Martin v. Löwis11437992002-04-12 09:54:03 +000017820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821 case $ac_mode in
17822 :F)
17823 #
17824 # CONFIG_FILE
17825 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017826
17827 case $INSTALL in
17828 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017830 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017831 ac_MKDIR_P=$MKDIR_P
17832 case $MKDIR_P in
17833 [\\/$]* | ?:[\\/]* ) ;;
17834 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17835 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017836_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837
Matthias Kloseb9621712010-04-24 17:59:49 +000017838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839# If the template does not know about datarootdir, expand it.
17840# FIXME: This hack should be removed a few years after 2.60.
17841ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017842ac_sed_dataroot='
17843/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844 p
17845 q
17846}
17847/@datadir@/p
17848/@docdir@/p
17849/@infodir@/p
17850/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017851/@mandir@/p'
17852case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017853*datarootdir*) ac_datarootdir_seen=yes;;
17854*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17856$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017858cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859 ac_datarootdir_hack='
17860 s&@datadir@&$datadir&g
17861 s&@docdir@&$docdir&g
17862 s&@infodir@&$infodir&g
17863 s&@localedir@&$localedir&g
17864 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017865 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866esac
17867_ACEOF
17868
17869# Neutralize VPATH when `$srcdir' = `.'.
17870# Shell code in configure.ac might set extrasub.
17871# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017872cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17873ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017874$extrasub
17875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017876cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017877:t
17878/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017879s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017881s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017882s&@srcdir@&$ac_srcdir&;t t
17883s&@abs_srcdir@&$ac_abs_srcdir&;t t
17884s&@top_srcdir@&$ac_top_srcdir&;t t
17885s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17886s&@builddir@&$ac_builddir&;t t
17887s&@abs_builddir@&$ac_abs_builddir&;t t
17888s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17889s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017890s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017892"
Victor Stinnere0be4232011-10-25 13:06:09 +020017893eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17894 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017897 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17898 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17899 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017901which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017902$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017903which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017904
Victor Stinnere0be4232011-10-25 13:06:09 +020017905 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017907 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17908 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017909 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017910 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017911 ;;
17912 :H)
17913 #
17914 # CONFIG_HEADER
17915 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017916 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017917 {
17918 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017919 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17920 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017921 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017922 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017923 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17924$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017925 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017926 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017927 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017928 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017929 fi
17930 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017931 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017932 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017933 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017934 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017935 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937
17938 esac
17939
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017940
17941 case $ac_file$ac_mode in
17942 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17943
17944 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945done # for ac_tag
17946
Guido van Rossum627b2d71993-12-24 10:39:16 +000017947
Matthias Kloseb9621712010-04-24 17:59:49 +000017948as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017949_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017950ac_clean_files=$ac_clean_files_save
17951
Matthias Kloseb9621712010-04-24 17:59:49 +000017952test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017953 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017954
Martin v. Löwis11437992002-04-12 09:54:03 +000017955
17956# configure is writing to config.log, and then calls config.status.
17957# config.status does its own redirection, appending to config.log.
17958# Unfortunately, on DOS this fails, as config.log is still kept open
17959# by configure, so config.status won't be able to write to it; its
17960# output is simply discarded. So we exec the FD to /dev/null,
17961# effectively closing config.log, so it can be properly (re)opened and
17962# appended to by config.status. When coming back to configure, we
17963# need to make the FD available again.
17964if test "$no_create" != yes; then
17965 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017966 ac_config_status_args=
17967 test "$silent" = yes &&
17968 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017970 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 exec 5>>config.log
17972 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17973 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017974 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017975fi
17976if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17977 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17978$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017979fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017980
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017981
Christian Heimes75ed8902013-11-20 01:11:18 +010017982echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017983if test ! -f Modules/Setup
17984then
17985 cp $srcdir/Modules/Setup.dist Modules/Setup
17986fi
17987
Christian Heimes75ed8902013-11-20 01:11:18 +010017988echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017989if test ! -f Modules/Setup.local
17990then
17991 echo "# Edit this file for local setup changes" >Modules/Setup.local
17992fi
17993
Christian Heimes75ed8902013-11-20 01:11:18 +010017994echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017995$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17996 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017997 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017998mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017999
18000if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18001 echo "" >&6
18002 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020018003 echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000018004 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018005 echo "" >&6
18006 echo "" >&6
18007fi
18008