blob: f14fa0bd3af66551de66dda08628bb816997b185 [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
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500763HAS_HG
764HGBRANCH
765HGTAG
766HGVERSION
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 Peterson37098cd2016-09-13 22:55:09 -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
Brett Cannon63d98bc2016-09-06 17:12:40 -0700821with_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 Peterson37098cd2016-09-13 22:55:09 -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 Peterson37098cd2016-09-13 22:55:09 -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 Peterson37098cd2016-09-13 22:55:09 -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 Peterson37098cd2016-09-13 22:55:09 -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
Benjamin Peterson076ed002010-10-31 17:11:02 +00001491 --enable-loadable-sqlite-extensions
1492 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --enable-ipv6 Enable ipv6 (with ipv4) support
1494 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001495 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001496 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498Optional Packages:
1499 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1500 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001501 --with-universal-archs=ARCH
1502 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001503 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001504 --with-framework-name=FRAMEWORK
1505 specify an alternate name of the framework built
1506 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001508 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001509 --with-cxx-main=<compiler>
1510 compile main() and link python executable with C++
1511 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-suffix=.exe set executable suffix
1513 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00001514 --with-optimizations Enable expensive optimizations (PGO, maybe LTO,
Brett Cannon63d98bc2016-09-06 17:12:40 -07001515 etc). Disabled by default.
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
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002713if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714then
2715# Extract the first word of "hg", so it can be a program name with args.
2716set dummy hg; ac_word=$2
2717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002719if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 $as_echo_n "(cached) " >&6
2721else
2722 if test -n "$HAS_HG"; then
2723 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2724else
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
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 ac_cv_prog_HAS_HG="found"
2733 $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
2740 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2741fi
2742fi
2743HAS_HG=$ac_cv_prog_HAS_HG
2744if test -n "$HAS_HG"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2746$as_echo "$HAS_HG" >&6; }
2747else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749$as_echo "no" >&6; }
2750fi
2751
2752
2753else
2754HAS_HG=no-repository
2755fi
2756if test $HAS_HG = found
2757then
2758 HGVERSION="hg id -i \$(srcdir)"
2759 HGTAG="hg id -t \$(srcdir)"
2760 HGBRANCH="hg id -b \$(srcdir)"
2761else
2762 HGVERSION=""
2763 HGTAG=""
2764 HGBRANCH=""
2765fi
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
3262 *-*-linux*)
3263 ac_sys_system=Linux
3264 ;;
3265 *-*-cygwin*)
3266 ac_sys_system=Cygwin
3267 ;;
3268 *)
3269 # for now, limit cross builds to known configurations
3270 MACHDEP="unknown"
3271 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3272 esac
3273 ac_sys_release=
3274 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003276 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003277 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 fi
3283 ac_md_system=`echo $ac_sys_system |
3284 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3285 ac_md_release=`echo $ac_sys_release |
3286 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3287 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003288
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003290 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003291 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003292 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003293 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003294 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003296fi
Guido van Rossum91922671997-10-09 20:24:13 +00003297
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003298
3299if test "$cross_compiling" = yes; then
3300 case "$host" in
3301 *-*-linux*)
3302 case "$host_cpu" in
3303 arm*)
3304 _host_cpu=arm
3305 ;;
3306 *)
3307 _host_cpu=$host_cpu
3308 esac
3309 ;;
3310 *-*-cygwin*)
3311 _host_cpu=
3312 ;;
3313 *)
3314 # for now, limit cross builds to known configurations
3315 MACHDEP="unknown"
3316 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3317 esac
3318 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3319fi
3320
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003321# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3322# disable features if it is defined, without any means to access these
3323# features as extensions. For these systems, we skip the definition of
3324# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3325# some feature, make sure there is no alternative way to access this
3326# feature. Also, when using wildcards, make sure you have verified the
3327# need for not defining _XOPEN_SOURCE on all systems matching the
3328# wildcard, and that the wildcard does not include future systems
3329# (which may remove their limitations).
3330case $ac_sys_system/$ac_sys_release in
3331 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3332 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003333 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003334 # In addition, Stefan Krah confirms that issue #1244610 exists through
3335 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337 define_xopen_source=no
3338 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3339 # also defined. This can be overridden by defining _BSD_SOURCE
3340 # As this has a different meaning on Linux, only define it on OpenBSD
3341
Matthias Kloseb9621712010-04-24 17:59:49 +00003342$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003343
3344 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003346 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3347 # also defined. This can be overridden by defining _BSD_SOURCE
3348 # As this has a different meaning on Linux, only define it on OpenBSD
3349
Matthias Kloseb9621712010-04-24 17:59:49 +00003350$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003351
3352 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003353 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3354 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3355 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003356 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 +00003357 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003358 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3359 # request to enable features supported by the standard as a request
3360 # to disable features not supported by the standard. The best way
3361 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3362 # entirely and define __EXTENSIONS__ instead.
3363 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003364 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003365 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3366 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003367 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003368 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003369 define_xopen_source=no;;
3370 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003371 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003374 # On FreeBSD 4, the math functions C89 does not cover are never defined
3375 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3376 FreeBSD/4.*)
3377 define_xopen_source=no;;
3378 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3379 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3380 # identifies itself as Darwin/7.*
3381 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3382 # disables platform specific features beyond repair.
3383 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3384 # has no effect, don't bother defining them
3385 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003386 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003387 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003388 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003389 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3390 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3391 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003392 AIX/4)
3393 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003394 AIX/5)
3395 if test `uname -r` -eq 1; then
3396 define_xopen_source=no
3397 fi
3398 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003399 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3400 # defining NI_NUMERICHOST.
3401 QNX/6.3.2)
3402 define_xopen_source=no
3403 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003404
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003405esac
3406
3407if test $define_xopen_source = yes
3408then
Victor Stinner14d098d2011-09-07 22:29:43 +02003409 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
Victor Stinner14d098d2011-09-07 22:29:43 +02003411$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003412
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
3414 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3415 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3416 # several APIs are not declared. Since this is also needed in some
3417 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Matthias Kloseb9621712010-04-24 17:59:49 +00003419$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
3421
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003422
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003423$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003424
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003425fi
3426
Christian Heimes647cd872013-12-07 23:39:33 +01003427# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3428case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429 hp*|HP*)
3430 define_stdc_a1=yes;;
3431 *)
3432 define_stdc_a1=no;;
3433esac
3434
3435if test $define_stdc_a1 = yes
3436then
Christian Heimes647cd872013-12-07 23:39:33 +01003437
3438$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3439
Christian Heimesb02bcae2013-12-08 15:21:08 +01003440fi
Christian Heimes647cd872013-12-07 23:39:33 +01003441
Guido van Rossum91922671997-10-09 20:24:13 +00003442#
3443# SGI compilers allow the specification of the both the ABI and the
3444# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003445# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003446#
3447# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3448# thus supply support for various ABI/ISA combinations. The MACHDEP
3449# variable is also adjusted.
3450#
3451
3452if test ! -z "$SGI_ABI"
3453then
3454 CC="cc $SGI_ABI"
3455 LDFLAGS="$SGI_ABI $LDFLAGS"
3456 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3459$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003460
Jack Jansen6b08a402004-06-03 12:41:45 +00003461# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3462# it may influence the way we can build extensions, so distutils
3463# needs to check it
3464
Thomas Wouters477c8d52006-05-27 19:21:47 +00003465
Jack Jansen6b08a402004-06-03 12:41:45 +00003466CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003467EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003468
Guido van Rossum627b2d71993-12-24 10:39:16 +00003469# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003470
3471# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3472# for debug/optimization stuff. BASECFLAGS is for flags that are required
3473# just to get things to compile and link. Users are free to override OPT
3474# when running configure or make. The build should not break if they do.
3475# BASECFLAGS should generally not be messed with, however.
3476
3477# XXX shouldn't some/most/all of this code be merged with the stuff later
3478# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3480$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003483if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003485 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003486 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003487 without_gcc=yes;;
3488 yes) CC=gcc
3489 without_gcc=no;;
3490 *) CC=$withval
3491 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003492 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003493else
Martin v. Löwis11437992002-04-12 09:54:03 +00003494
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003495 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003496 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003497 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003498 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003499 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003500fi
3501
Matthias Kloseb9621712010-04-24 17:59:49 +00003502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3503$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003504
Zachary Ware5af85642015-12-21 12:09:17 -06003505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3506$as_echo_n "checking for --with-icc... " >&6; }
3507
3508# Check whether --with-icc was given.
3509if test "${with_icc+set}" = set; then :
3510 withval=$with_icc;
3511 case $withval in
3512 no) CC=${CC:-cc}
3513 with_icc=no;;
3514 yes) CC=icc
3515 CXX=icpc
3516 with_icc=yes;;
3517 *) CC=$withval
3518 with_icc=$withval;;
3519 esac
3520else
3521
3522 with_icc=no
3523fi
3524
3525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3526$as_echo "$with_icc" >&6; }
3527
Guido van Rossum8b131c51995-03-09 14:10:13 +00003528# If the user switches compilers, we can't believe the cache
3529if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3530then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003531 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003532(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003533fi
3534
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003535# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3536# when the compiler supports them, but we don't always want -O2, and
3537# we set -g later.
3538if test -z "$CFLAGS"; then
3539 CFLAGS=
3540fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003541
3542if test "$ac_sys_system" = "Darwin"
3543then
3544 # Compiler selection on MacOSX is more complicated than
3545 # AC_PROG_CC can handle, see Mac/README.txt for more
3546 # information
3547 if test -z "${CC}"
3548 then
3549 found_gcc=
3550 found_clang=
3551 as_save_IFS=$IFS; IFS=:
3552 for as_dir in $PATH
3553 do
3554 IFS=$as_save_IFS
3555 if test -x $as_dir/gcc; then
3556 if test -z "${found_gcc}"; then
3557 found_gcc=$as_dir/gcc
3558 fi
3559 fi
3560 if test -x $as_dir/clang; then
3561 if test -z "${found_clang}"; then
3562 found_clang=$as_dir/clang
3563 fi
3564 fi
3565 done
3566 IFS=$as_save_IFS
3567
3568 if test -n "$found_gcc" -a -n "$found_clang"
3569 then
3570 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3571 then
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3573$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3574 CC="$found_clang"
3575 CXX="$found_clang++"
3576 fi
3577
3578
3579 elif test -z "$found_gcc" -a -n "$found_clang"
3580 then
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3582$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3583 CC="$found_clang"
3584 CXX="$found_clang++"
3585
3586 elif test -z "$found_gcc" -a -z "$found_clang"
3587 then
3588 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3589 if test -n "${found_clang}"
3590 then
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3592$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3593 CC="${found_clang}"
3594 CXX="`/usr/bin/xcrun -find clang++`"
3595
3596 # else: use default behaviour
3597 fi
3598 fi
3599 fi
3600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003601ac_ext=c
3602ac_cpp='$CPP $CPPFLAGS'
3603ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3604ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3605ac_compiler_gnu=$ac_cv_c_compiler_gnu
3606if test -n "$ac_tool_prefix"; then
3607 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3608set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3610$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003611if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003613else
3614 if test -n "$CC"; then
3615 ac_cv_prog_CC="$CC" # Let the user override the test.
3616else
Martin v. Löwis11437992002-04-12 09:54:03 +00003617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3618for as_dir in $PATH
3619do
3620 IFS=$as_save_IFS
3621 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $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 +00003626 break 2
3627 fi
3628done
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003631
Jack Jansendd19cf82001-12-06 22:36:17 +00003632fi
3633fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003634CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003635if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3637$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003638else
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3640$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003641fi
3642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643
Martin v. Löwis11437992002-04-12 09:54:03 +00003644fi
3645if test -z "$ac_cv_prog_CC"; then
3646 ac_ct_CC=$CC
3647 # Extract the first word of "gcc", so it can be a program name with args.
3648set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3650$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003651if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003653else
3654 if test -n "$ac_ct_CC"; then
3655 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3656else
3657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658for as_dir in $PATH
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 $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 +00003666 break 2
3667 fi
3668done
Matthias Kloseb9621712010-04-24 17:59:49 +00003669 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003670IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003671
3672fi
3673fi
3674ac_ct_CC=$ac_cv_prog_ac_ct_CC
3675if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3677$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003678else
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3680$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003681fi
3682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683 if test "x$ac_ct_CC" = x; then
3684 CC=""
3685 else
3686 case $cross_compiling:$ac_tool_warned in
3687yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003688{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3689$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690ac_tool_warned=yes ;;
3691esac
3692 CC=$ac_ct_CC
3693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003694else
3695 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003696fi
3697
Jack Jansendd19cf82001-12-06 22:36:17 +00003698if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699 if test -n "$ac_tool_prefix"; then
3700 # 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 +00003701set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3703$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003704if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003706else
3707 if test -n "$CC"; then
3708 ac_cv_prog_CC="$CC" # Let the user override the test.
3709else
Martin v. Löwis11437992002-04-12 09:54:03 +00003710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3711for as_dir in $PATH
3712do
3713 IFS=$as_save_IFS
3714 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $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 +00003719 break 2
3720 fi
3721done
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
3725fi
3726fi
3727CC=$ac_cv_prog_CC
3728if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3730$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003731else
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3733$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003734fi
3735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003738fi
3739if test -z "$CC"; then
3740 # Extract the first word of "cc", so it can be a program name with args.
3741set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3743$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003744if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003746else
3747 if test -n "$CC"; then
3748 ac_cv_prog_CC="$CC" # Let the user override the test.
3749else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003750 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3752for as_dir in $PATH
3753do
3754 IFS=$as_save_IFS
3755 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3759 ac_prog_rejected=yes
3760 continue
3761 fi
3762 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $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 +00003764 break 2
3765 fi
3766done
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003769
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770if test $ac_prog_rejected = yes; then
3771 # We found a bogon in the path, so make sure we never use it.
3772 set dummy $ac_cv_prog_CC
3773 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003775 # We chose a different compiler from the bogus one.
3776 # However, it has the same basename, so the bogon will be chosen
3777 # first if we set CC to just the basename; use the full file name.
3778 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003779 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780 fi
3781fi
3782fi
3783fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003784CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003785if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3787$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788else
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3790$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791fi
3792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793
Martin v. Löwis11437992002-04-12 09:54:03 +00003794fi
3795if test -z "$CC"; then
3796 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 do
3799 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3800set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3802$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003803if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003805else
3806 if test -n "$CC"; then
3807 ac_cv_prog_CC="$CC" # Let the user override the test.
3808else
Martin v. Löwis11437992002-04-12 09:54:03 +00003809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3810for as_dir in $PATH
3811do
3812 IFS=$as_save_IFS
3813 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $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 +00003818 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003819 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003820done
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003823
3824fi
3825fi
3826CC=$ac_cv_prog_CC
3827if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3829$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830else
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3832$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003833fi
3834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 test -n "$CC" && break
3837 done
3838fi
3839if test -z "$CC"; then
3840 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003842do
3843 # Extract the first word of "$ac_prog", so it can be a program name with args.
3844set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3846$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003847if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003849else
3850 if test -n "$ac_ct_CC"; then
3851 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3852else
3853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3854for as_dir in $PATH
3855do
3856 IFS=$as_save_IFS
3857 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 $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 +00003862 break 2
3863 fi
3864done
Matthias Kloseb9621712010-04-24 17:59:49 +00003865 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868fi
3869fi
3870ac_ct_CC=$ac_cv_prog_ac_ct_CC
3871if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3873$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003874else
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3876$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879
Martin v. Löwis11437992002-04-12 09:54:03 +00003880 test -n "$ac_ct_CC" && break
3881done
Michael W. Hudson54241132001-12-07 15:38:26 +00003882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883 if test "x$ac_ct_CC" = x; then
3884 CC=""
3885 else
3886 case $cross_compiling:$ac_tool_warned in
3887yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003888{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3889$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890ac_tool_warned=yes ;;
3891esac
3892 CC=$ac_ct_CC
3893 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003894fi
3895
3896fi
3897
3898
Matthias Kloseb9621712010-04-24 17:59:49 +00003899test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003901as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003902See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003903
3904# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003905$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3906set X $ac_compile
3907ac_compiler=$2
3908for ac_option in --version -v -V -qversion; do
3909 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910case "(($ac_try" in
3911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3912 *) ac_try_echo=$ac_try;;
3913esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3915$as_echo "$ac_try_echo"; } >&5
3916 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003918 if test -s conftest.err; then
3919 sed '10a\
3920... rest of stderr output deleted ...
3921 10q' conftest.err >conftest.er1
3922 cat conftest.er1 >&5
3923 fi
3924 rm -f conftest.er1 conftest.err
3925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3926 test $ac_status = 0; }
3927done
Martin v. Löwis11437992002-04-12 09:54:03 +00003928
Matthias Kloseb9621712010-04-24 17:59:49 +00003929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003930/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003931
Martin v. Löwis11437992002-04-12 09:54:03 +00003932int
3933main ()
3934{
3935
3936 ;
3937 return 0;
3938}
3939_ACEOF
3940ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003941ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003942# Try to create an executable without -o first, disregard a.out.
3943# It will help us diagnose broken compilers, and finding out an intuition
3944# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3946$as_echo_n "checking whether the C compiler works... " >&6; }
3947ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3948
3949# The possible output files:
3950ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952ac_rmfiles=
3953for ac_file in $ac_files
3954do
3955 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3958 esac
3959done
3960rm -f $ac_rmfiles
3961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963case "(($ac_try" in
3964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3965 *) ac_try_echo=$ac_try;;
3966esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3968$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3972 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3974# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3975# in a Makefile. We should not override ac_cv_exeext if it was cached,
3976# so that the user can short-circuit this test for compilers unknown to
3977# Autoconf.
3978for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003979do
3980 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003981 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983 ;;
3984 [ab].out )
3985 # We found the default executable, but exeext='' is most
3986 # certainly right.
3987 break;;
3988 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990 then :; else
3991 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3992 fi
3993 # We set ac_cv_exeext here because the later test for it is not
3994 # safe: cross compilers may not add the suffix if given an `-o'
3995 # argument, so we may need to know it at that point already.
3996 # Even if this section looks crufty: it has the advantage of
3997 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998 break;;
3999 * )
4000 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 esac
4002done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003test "$ac_cv_exeext" = no && ac_cv_exeext=
4004
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004005else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006 ac_file=''
4007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004008if test -z "$ac_file"; then :
4009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4010$as_echo "no" >&6; }
4011$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004012sed 's/^/| /' conftest.$ac_ext >&5
4013
Matthias Kloseb9621712010-04-24 17:59:49 +00004014{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004016as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004017See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004018else
4019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4020$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4023$as_echo_n "checking for C compiler default output file name... " >&6; }
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4025$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004027
Matthias Kloseb9621712010-04-24 17:59:49 +00004028rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4031$as_echo_n "checking for suffix of executables... " >&6; }
4032if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033case "(($ac_try" in
4034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4035 *) ac_try_echo=$ac_try;;
4036esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4038$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004040 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4042 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4044# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4045# work properly (i.e., refer to `conftest.exe'), while it won't with
4046# `rm'.
4047for ac_file in conftest.exe conftest conftest.*; do
4048 test -f "$ac_file" || continue
4049 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4052 break;;
4053 * ) break;;
4054 esac
4055done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056else
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004059as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004060See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004062rm -f conftest conftest$ac_cv_exeext
4063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4064$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004065
4066rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004067EXEEXT=$ac_cv_exeext
4068ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4070/* end confdefs.h. */
4071#include <stdio.h>
4072int
4073main ()
4074{
4075FILE *f = fopen ("conftest.out", "w");
4076 return ferror (f) || fclose (f) != 0;
4077
4078 ;
4079 return 0;
4080}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004082ac_clean_files="$ac_clean_files conftest.out"
4083# Check that the compiler produces executables we can run. If not, either
4084# the compiler is broken, or we cross compile.
4085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4086$as_echo_n "checking whether we are cross compiling... " >&6; }
4087if test "$cross_compiling" != yes; then
4088 { { ac_try="$ac_link"
4089case "(($ac_try" in
4090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4091 *) ac_try_echo=$ac_try;;
4092esac
4093eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4094$as_echo "$ac_try_echo"; } >&5
4095 (eval "$ac_link") 2>&5
4096 ac_status=$?
4097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4098 test $ac_status = 0; }
4099 if { ac_try='./conftest$ac_cv_exeext'
4100 { { case "(($ac_try" in
4101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4102 *) ac_try_echo=$ac_try;;
4103esac
4104eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4105$as_echo "$ac_try_echo"; } >&5
4106 (eval "$ac_try") 2>&5
4107 ac_status=$?
4108 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4109 test $ac_status = 0; }; }; then
4110 cross_compiling=no
4111 else
4112 if test "$cross_compiling" = maybe; then
4113 cross_compiling=yes
4114 else
4115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004117as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004118If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004119See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 fi
4121 fi
4122fi
4123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4124$as_echo "$cross_compiling" >&6; }
4125
4126rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4127ac_clean_files=$ac_clean_files_save
4128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4129$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004130if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 $as_echo_n "(cached) " >&6
4132else
4133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134/* end confdefs.h. */
4135
4136int
4137main ()
4138{
4139
4140 ;
4141 return 0;
4142}
4143_ACEOF
4144rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004145if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146case "(($ac_try" in
4147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4148 *) ac_try_echo=$ac_try;;
4149esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004150eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4151$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004153 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4155 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156 for ac_file in conftest.o conftest.obj conftest.*; do
4157 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4161 break;;
4162 esac
4163done
4164else
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004166sed 's/^/| /' conftest.$ac_ext >&5
4167
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004170as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004171See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004172fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004173rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4176$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004177OBJEXT=$ac_cv_objext
4178ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4180$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004181if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004183else
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004186
Martin v. Löwis11437992002-04-12 09:54:03 +00004187int
4188main ()
4189{
4190#ifndef __GNUC__
4191 choke me
4192#endif
4193
4194 ;
4195 return 0;
4196}
4197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004199 ac_compiler_gnu=yes
4200else
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004204ac_cv_c_compiler_gnu=$ac_compiler_gnu
4205
4206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4208$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4209if test $ac_compiler_gnu = yes; then
4210 GCC=yes
4211else
4212 GCC=
4213fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004214ac_test_CFLAGS=${CFLAGS+set}
4215ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4217$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004218if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004220else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221 ac_save_c_werror_flag=$ac_c_werror_flag
4222 ac_c_werror_flag=yes
4223 ac_cv_prog_cc_g=no
4224 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004227
Martin v. Löwis11437992002-04-12 09:54:03 +00004228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004236if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004237 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238else
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 CFLAGS=""
4240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241/* end confdefs.h. */
4242
4243int
4244main ()
4245{
4246
4247 ;
4248 return 0;
4249}
4250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004251if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252
Matthias Kloseb9621712010-04-24 17:59:49 +00004253else
4254 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257/* end confdefs.h. */
4258
4259int
4260main ()
4261{
4262
4263 ;
4264 return 0;
4265}
4266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004267if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275 ac_c_werror_flag=$ac_save_c_werror_flag
4276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4278$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004280 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281elif test $ac_cv_prog_cc_g = yes; then
4282 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004283 CFLAGS="-g -O2"
4284 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004285 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286 fi
4287else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004288 if test "$GCC" = yes; then
4289 CFLAGS="-O2"
4290 else
4291 CFLAGS=
4292 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4295$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004296if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004297 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004298else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004300ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004302/* end confdefs.h. */
4303#include <stdarg.h>
4304#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004305struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004306/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4307struct buf { int x; };
4308FILE * (*rcsopen) (struct buf *, struct stat *, int);
4309static char *e (p, i)
4310 char **p;
4311 int i;
4312{
4313 return p[i];
4314}
4315static char *f (char * (*g) (char **, int), char **p, ...)
4316{
4317 char *s;
4318 va_list v;
4319 va_start (v,p);
4320 s = g (p, va_arg (v,int));
4321 va_end (v);
4322 return s;
4323}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004324
4325/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4326 function prototypes and stuff, but not '\xHH' hex character constants.
4327 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004329 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4330 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004332int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4335 inside strings and character constants. */
4336#define FOO(x) 'x'
4337int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4338
Skip Montanaro6dead952003-09-25 14:50:04 +00004339int test (int i, double x);
4340struct s1 {int (*f) (int a);};
4341struct s2 {int (*f) (double a);};
4342int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4343int argc;
4344char **argv;
4345int
4346main ()
4347{
4348return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4349 ;
4350 return 0;
4351}
4352_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4354 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004355do
4356 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360rm -f core conftest.err conftest.$ac_objext
4361 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004362done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004364CC=$ac_save_CC
4365
4366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367# AC_CACHE_VAL
4368case "x$ac_cv_prog_cc_c89" in
4369 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4371$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4374$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004375 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4378$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004379esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004380if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004381
Matthias Kloseb9621712010-04-24 17:59:49 +00004382fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Martin v. Löwis11437992002-04-12 09:54:03 +00004384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004390ac_ext=c
4391ac_cpp='$CPP $CPPFLAGS'
4392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4394ac_compiler_gnu=$ac_cv_c_compiler_gnu
4395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4396$as_echo_n "checking how to run the C preprocessor... " >&6; }
4397# On Suns, sometimes $CPP names a directory.
4398if test -n "$CPP" && test -d "$CPP"; then
4399 CPP=
4400fi
4401if test -z "$CPP"; then
4402 if ${ac_cv_prog_CPP+:} false; then :
4403 $as_echo_n "(cached) " >&6
4404else
4405 # Double quotes because CPP needs to be expanded
4406 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4407 do
4408 ac_preproc_ok=false
4409for ac_c_preproc_warn_flag in '' yes
4410do
4411 # Use a header file that comes with gcc, so configuring glibc
4412 # with a fresh cross-compiler works.
4413 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4414 # <limits.h> exists even on freestanding compilers.
4415 # On the NeXT, cc -E runs the code through the compiler's parser,
4416 # not just through cpp. "Syntax error" is here to catch this case.
4417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4418/* end confdefs.h. */
4419#ifdef __STDC__
4420# include <limits.h>
4421#else
4422# include <assert.h>
4423#endif
4424 Syntax error
4425_ACEOF
4426if ac_fn_c_try_cpp "$LINENO"; then :
4427
4428else
4429 # Broken: fails on valid input.
4430continue
4431fi
4432rm -f conftest.err conftest.i conftest.$ac_ext
4433
4434 # OK, works on sane cases. Now check whether nonexistent headers
4435 # can be detected and how.
4436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4437/* end confdefs.h. */
4438#include <ac_nonexistent.h>
4439_ACEOF
4440if ac_fn_c_try_cpp "$LINENO"; then :
4441 # Broken: success on invalid input.
4442continue
4443else
4444 # Passes both tests.
4445ac_preproc_ok=:
4446break
4447fi
4448rm -f conftest.err conftest.i conftest.$ac_ext
4449
4450done
4451# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4452rm -f conftest.i conftest.err conftest.$ac_ext
4453if $ac_preproc_ok; then :
4454 break
4455fi
4456
4457 done
4458 ac_cv_prog_CPP=$CPP
4459
4460fi
4461 CPP=$ac_cv_prog_CPP
4462else
4463 ac_cv_prog_CPP=$CPP
4464fi
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4466$as_echo "$CPP" >&6; }
4467ac_preproc_ok=false
4468for ac_c_preproc_warn_flag in '' yes
4469do
4470 # Use a header file that comes with gcc, so configuring glibc
4471 # with a fresh cross-compiler works.
4472 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4473 # <limits.h> exists even on freestanding compilers.
4474 # On the NeXT, cc -E runs the code through the compiler's parser,
4475 # not just through cpp. "Syntax error" is here to catch this case.
4476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4477/* end confdefs.h. */
4478#ifdef __STDC__
4479# include <limits.h>
4480#else
4481# include <assert.h>
4482#endif
4483 Syntax error
4484_ACEOF
4485if ac_fn_c_try_cpp "$LINENO"; then :
4486
4487else
4488 # Broken: fails on valid input.
4489continue
4490fi
4491rm -f conftest.err conftest.i conftest.$ac_ext
4492
4493 # OK, works on sane cases. Now check whether nonexistent headers
4494 # can be detected and how.
4495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4496/* end confdefs.h. */
4497#include <ac_nonexistent.h>
4498_ACEOF
4499if ac_fn_c_try_cpp "$LINENO"; then :
4500 # Broken: success on invalid input.
4501continue
4502else
4503 # Passes both tests.
4504ac_preproc_ok=:
4505break
4506fi
4507rm -f conftest.err conftest.i conftest.$ac_ext
4508
4509done
4510# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4511rm -f conftest.i conftest.err conftest.$ac_ext
4512if $ac_preproc_ok; then :
4513
4514else
4515 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4516$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4517as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4518See \`config.log' for more details" "$LINENO" 5; }
4519fi
4520
4521ac_ext=c
4522ac_cpp='$CPP $CPPFLAGS'
4523ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4524ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4525ac_compiler_gnu=$ac_cv_c_compiler_gnu
4526
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4528$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4529if ${ac_cv_path_GREP+:} false; then :
4530 $as_echo_n "(cached) " >&6
4531else
4532 if test -z "$GREP"; then
4533 ac_path_GREP_found=false
4534 # Loop through the user's path and test for each of PROGNAME-LIST
4535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4536for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4537do
4538 IFS=$as_save_IFS
4539 test -z "$as_dir" && as_dir=.
4540 for ac_prog in grep ggrep; do
4541 for ac_exec_ext in '' $ac_executable_extensions; do
4542 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4543 as_fn_executable_p "$ac_path_GREP" || continue
4544# Check for GNU ac_path_GREP and select it if it is found.
4545 # Check for GNU $ac_path_GREP
4546case `"$ac_path_GREP" --version 2>&1` in
4547*GNU*)
4548 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4549*)
4550 ac_count=0
4551 $as_echo_n 0123456789 >"conftest.in"
4552 while :
4553 do
4554 cat "conftest.in" "conftest.in" >"conftest.tmp"
4555 mv "conftest.tmp" "conftest.in"
4556 cp "conftest.in" "conftest.nl"
4557 $as_echo 'GREP' >> "conftest.nl"
4558 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4559 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4560 as_fn_arith $ac_count + 1 && ac_count=$as_val
4561 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4562 # Best one so far, save it but keep looking for a better one
4563 ac_cv_path_GREP="$ac_path_GREP"
4564 ac_path_GREP_max=$ac_count
4565 fi
4566 # 10*(2^10) chars as input seems more than enough
4567 test $ac_count -gt 10 && break
4568 done
4569 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4570esac
4571
4572 $ac_path_GREP_found && break 3
4573 done
4574 done
4575 done
4576IFS=$as_save_IFS
4577 if test -z "$ac_cv_path_GREP"; then
4578 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4579 fi
4580else
4581 ac_cv_path_GREP=$GREP
4582fi
4583
4584fi
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4586$as_echo "$ac_cv_path_GREP" >&6; }
4587 GREP="$ac_cv_path_GREP"
4588
4589
Łukasz Langaa785c872016-09-09 17:37:37 -07004590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4591$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4592if ${ac_cv_path_SED+:} false; then :
4593 $as_echo_n "(cached) " >&6
4594else
4595 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4596 for ac_i in 1 2 3 4 5 6 7; do
4597 ac_script="$ac_script$as_nl$ac_script"
4598 done
4599 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4600 { ac_script=; unset ac_script;}
4601 if test -z "$SED"; then
4602 ac_path_SED_found=false
4603 # Loop through the user's path and test for each of PROGNAME-LIST
4604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4605for as_dir in $PATH
4606do
4607 IFS=$as_save_IFS
4608 test -z "$as_dir" && as_dir=.
4609 for ac_prog in sed gsed; do
4610 for ac_exec_ext in '' $ac_executable_extensions; do
4611 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4612 as_fn_executable_p "$ac_path_SED" || continue
4613# Check for GNU ac_path_SED and select it if it is found.
4614 # Check for GNU $ac_path_SED
4615case `"$ac_path_SED" --version 2>&1` in
4616*GNU*)
4617 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4618*)
4619 ac_count=0
4620 $as_echo_n 0123456789 >"conftest.in"
4621 while :
4622 do
4623 cat "conftest.in" "conftest.in" >"conftest.tmp"
4624 mv "conftest.tmp" "conftest.in"
4625 cp "conftest.in" "conftest.nl"
4626 $as_echo '' >> "conftest.nl"
4627 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4628 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4629 as_fn_arith $ac_count + 1 && ac_count=$as_val
4630 if test $ac_count -gt ${ac_path_SED_max-0}; then
4631 # Best one so far, save it but keep looking for a better one
4632 ac_cv_path_SED="$ac_path_SED"
4633 ac_path_SED_max=$ac_count
4634 fi
4635 # 10*(2^10) chars as input seems more than enough
4636 test $ac_count -gt 10 && break
4637 done
4638 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4639esac
4640
4641 $ac_path_SED_found && break 3
4642 done
4643 done
4644 done
4645IFS=$as_save_IFS
4646 if test -z "$ac_cv_path_SED"; then
4647 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4648 fi
4649else
4650 ac_cv_path_SED=$SED
4651fi
4652
4653fi
4654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4655$as_echo "$ac_cv_path_SED" >&6; }
4656 SED="$ac_cv_path_SED"
4657 rm -f conftest.sed
4658
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004659
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660
4661
Matthias Kloseb9621712010-04-24 17:59:49 +00004662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4663$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004665# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004666if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004667 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004668
4669 case $withval in
4670 no) with_cxx_main=no
4671 MAINCC='$(CC)';;
4672 yes) with_cxx_main=yes
4673 MAINCC='$(CXX)';;
4674 *) with_cxx_main=yes
4675 MAINCC=$withval
4676 if test -z "$CXX"
4677 then
4678 CXX=$withval
4679 fi;;
4680 esac
4681else
4682
4683 with_cxx_main=no
4684 MAINCC='$(CC)'
4685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004686fi
4687
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4689$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004690
4691preset_cxx="$CXX"
4692if test -z "$CXX"
4693then
4694 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004695 gcc) if test -n "$ac_tool_prefix"; then
4696 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4697set dummy ${ac_tool_prefix}g++; ac_word=$2
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4699$as_echo_n "checking for $ac_word... " >&6; }
4700if ${ac_cv_path_CXX+:} false; then :
4701 $as_echo_n "(cached) " >&6
4702else
4703 case $CXX in
4704 [\\/]* | ?:[\\/]*)
4705 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4706 ;;
4707 *)
4708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4709for as_dir in notfound
4710do
4711 IFS=$as_save_IFS
4712 test -z "$as_dir" && as_dir=.
4713 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004714 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004715 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4716 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4717 break 2
4718 fi
4719done
4720 done
4721IFS=$as_save_IFS
4722
4723 ;;
4724esac
4725fi
4726CXX=$ac_cv_path_CXX
4727if test -n "$CXX"; then
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4729$as_echo "$CXX" >&6; }
4730else
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4732$as_echo "no" >&6; }
4733fi
4734
4735
4736fi
4737if test -z "$ac_cv_path_CXX"; then
4738 ac_pt_CXX=$CXX
4739 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4742$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004743if ${ac_cv_path_ac_pt_CXX+:} false; then :
4744 $as_echo_n "(cached) " >&6
4745else
4746 case $ac_pt_CXX in
4747 [\\/]* | ?:[\\/]*)
4748 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4749 ;;
4750 *)
4751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4752for as_dir in notfound
4753do
4754 IFS=$as_save_IFS
4755 test -z "$as_dir" && as_dir=.
4756 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4760 break 2
4761 fi
4762done
4763 done
4764IFS=$as_save_IFS
4765
4766 ;;
4767esac
4768fi
4769ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4770if test -n "$ac_pt_CXX"; then
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4772$as_echo "$ac_pt_CXX" >&6; }
4773else
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4775$as_echo "no" >&6; }
4776fi
4777
4778 if test "x$ac_pt_CXX" = x; then
4779 CXX="g++"
4780 else
4781 case $cross_compiling:$ac_tool_warned in
4782yes:)
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4785ac_tool_warned=yes ;;
4786esac
4787 CXX=$ac_pt_CXX
4788 fi
4789else
4790 CXX="$ac_cv_path_CXX"
4791fi
4792 ;;
4793 cc) if test -n "$ac_tool_prefix"; then
4794 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4795set dummy ${ac_tool_prefix}c++; ac_word=$2
4796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004798if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800else
4801 case $CXX in
4802 [\\/]* | ?:[\\/]*)
4803 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4804 ;;
4805 *)
4806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4807for as_dir in notfound
4808do
4809 IFS=$as_save_IFS
4810 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 break 2
4816 fi
4817done
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004819IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004821 ;;
4822esac
4823fi
4824CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004825if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4827$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004828else
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4830$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004832
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004833
4834fi
4835if test -z "$ac_cv_path_CXX"; then
4836 ac_pt_CXX=$CXX
4837 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004841if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 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 +00004847 ;;
4848 *)
4849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850for as_dir in notfound
4851do
4852 IFS=$as_save_IFS
4853 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004858 break 2
4859 fi
4860done
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004862IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004864 ;;
4865esac
4866fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4868if test -n "$ac_pt_CXX"; then
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4870$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004871else
Matthias Kloseb9621712010-04-24 17:59:49 +00004872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004875
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876 if test "x$ac_pt_CXX" = x; then
4877 CXX="c++"
4878 else
4879 case $cross_compiling:$ac_tool_warned in
4880yes:)
4881{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4882$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4883ac_tool_warned=yes ;;
4884esac
4885 CXX=$ac_pt_CXX
4886 fi
4887else
4888 CXX="$ac_cv_path_CXX"
4889fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004890 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004891 clang|*/clang) if test -n "$ac_tool_prefix"; then
4892 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4893set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4895$as_echo_n "checking for $ac_word... " >&6; }
4896if ${ac_cv_path_CXX+:} false; then :
4897 $as_echo_n "(cached) " >&6
4898else
4899 case $CXX in
4900 [\\/]* | ?:[\\/]*)
4901 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4902 ;;
4903 *)
4904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in notfound
4906do
4907 IFS=$as_save_IFS
4908 test -z "$as_dir" && as_dir=.
4909 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004910 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004911 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4913 break 2
4914 fi
4915done
4916 done
4917IFS=$as_save_IFS
4918
Ned Deilycbfb9a52012-06-23 16:02:19 -07004919 ;;
4920esac
4921fi
4922CXX=$ac_cv_path_CXX
4923if test -n "$CXX"; then
4924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4925$as_echo "$CXX" >&6; }
4926else
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4928$as_echo "no" >&6; }
4929fi
4930
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004931
4932fi
4933if test -z "$ac_cv_path_CXX"; then
4934 ac_pt_CXX=$CXX
4935 # Extract the first word of "clang++", so it can be a program name with args.
4936set dummy clang++; ac_word=$2
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4938$as_echo_n "checking for $ac_word... " >&6; }
4939if ${ac_cv_path_ac_pt_CXX+:} false; then :
4940 $as_echo_n "(cached) " >&6
4941else
4942 case $ac_pt_CXX in
4943 [\\/]* | ?:[\\/]*)
4944 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4945 ;;
4946 *)
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948for as_dir in notfound
4949do
4950 IFS=$as_save_IFS
4951 test -z "$as_dir" && as_dir=.
4952 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004954 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956 break 2
4957 fi
4958done
4959 done
4960IFS=$as_save_IFS
4961
4962 ;;
4963esac
4964fi
4965ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4966if test -n "$ac_pt_CXX"; then
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4968$as_echo "$ac_pt_CXX" >&6; }
4969else
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971$as_echo "no" >&6; }
4972fi
4973
4974 if test "x$ac_pt_CXX" = x; then
4975 CXX="clang++"
4976 else
4977 case $cross_compiling:$ac_tool_warned in
4978yes:)
4979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4981ac_tool_warned=yes ;;
4982esac
4983 CXX=$ac_pt_CXX
4984 fi
4985else
4986 CXX="$ac_cv_path_CXX"
4987fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004988 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004989 icc|*/icc) if test -n "$ac_tool_prefix"; then
4990 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4991set dummy ${ac_tool_prefix}icpc; ac_word=$2
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4993$as_echo_n "checking for $ac_word... " >&6; }
4994if ${ac_cv_path_CXX+:} false; then :
4995 $as_echo_n "(cached) " >&6
4996else
4997 case $CXX in
4998 [\\/]* | ?:[\\/]*)
4999 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5000 ;;
5001 *)
5002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5003for as_dir in notfound
5004do
5005 IFS=$as_save_IFS
5006 test -z "$as_dir" && as_dir=.
5007 for ac_exec_ext in '' $ac_executable_extensions; do
5008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5009 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5011 break 2
5012 fi
5013done
5014 done
5015IFS=$as_save_IFS
5016
5017 ;;
5018esac
5019fi
5020CXX=$ac_cv_path_CXX
5021if test -n "$CXX"; then
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5023$as_echo "$CXX" >&6; }
5024else
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026$as_echo "no" >&6; }
5027fi
5028
5029
5030fi
5031if test -z "$ac_cv_path_CXX"; then
5032 ac_pt_CXX=$CXX
5033 # Extract the first word of "icpc", so it can be a program name with args.
5034set dummy icpc; ac_word=$2
5035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5036$as_echo_n "checking for $ac_word... " >&6; }
5037if ${ac_cv_path_ac_pt_CXX+:} false; then :
5038 $as_echo_n "(cached) " >&6
5039else
5040 case $ac_pt_CXX in
5041 [\\/]* | ?:[\\/]*)
5042 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5043 ;;
5044 *)
5045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5046for as_dir in notfound
5047do
5048 IFS=$as_save_IFS
5049 test -z "$as_dir" && as_dir=.
5050 for ac_exec_ext in '' $ac_executable_extensions; do
5051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5052 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5054 break 2
5055 fi
5056done
5057 done
5058IFS=$as_save_IFS
5059
5060 ;;
5061esac
5062fi
5063ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5064if test -n "$ac_pt_CXX"; then
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5066$as_echo "$ac_pt_CXX" >&6; }
5067else
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069$as_echo "no" >&6; }
5070fi
5071
5072 if test "x$ac_pt_CXX" = x; then
5073 CXX="icpc"
5074 else
5075 case $cross_compiling:$ac_tool_warned in
5076yes:)
5077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5079ac_tool_warned=yes ;;
5080esac
5081 CXX=$ac_pt_CXX
5082 fi
5083else
5084 CXX="$ac_cv_path_CXX"
5085fi
5086 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087 esac
5088 if test "$CXX" = "notfound"
5089 then
5090 CXX=""
5091 fi
5092fi
5093if test -z "$CXX"
5094then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005095 if test -n "$ac_tool_prefix"; then
5096 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5097 do
5098 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5099set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005102if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104else
5105 if test -n "$CXX"; then
5106 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5107else
5108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005115 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005117 break 2
5118 fi
5119done
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005121IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005122
5123fi
5124fi
5125CXX=$ac_cv_prog_CXX
5126if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5128$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005129else
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132fi
5133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005134
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005135 test -n "$CXX" && break
5136 done
5137fi
5138if test -z "$CXX"; then
5139 ac_ct_CXX=$CXX
5140 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5141do
5142 # Extract the first word of "$ac_prog", so it can be a program name with args.
5143set dummy $ac_prog; ac_word=$2
5144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5145$as_echo_n "checking for $ac_word... " >&6; }
5146if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5147 $as_echo_n "(cached) " >&6
5148else
5149 if test -n "$ac_ct_CXX"; then
5150 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5151else
5152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153for as_dir in $PATH
5154do
5155 IFS=$as_save_IFS
5156 test -z "$as_dir" && as_dir=.
5157 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005158 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005159 ac_cv_prog_ac_ct_CXX="$ac_prog"
5160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5161 break 2
5162 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005163done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005164 done
5165IFS=$as_save_IFS
5166
5167fi
5168fi
5169ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5170if test -n "$ac_ct_CXX"; then
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5172$as_echo "$ac_ct_CXX" >&6; }
5173else
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175$as_echo "no" >&6; }
5176fi
5177
5178
5179 test -n "$ac_ct_CXX" && break
5180done
5181
5182 if test "x$ac_ct_CXX" = x; then
5183 CXX="notfound"
5184 else
5185 case $cross_compiling:$ac_tool_warned in
5186yes:)
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5188$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5189ac_tool_warned=yes ;;
5190esac
5191 CXX=$ac_ct_CXX
5192 fi
5193fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194
5195 if test "$CXX" = "notfound"
5196 then
5197 CXX=""
5198 fi
5199fi
5200if test "$preset_cxx" != "$CXX"
5201then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005202 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005203
5204 By default, distutils will build C++ extension modules with \"$CXX\".
5205 If this is not intended, then set CXX on the configure command line.
5206 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005207$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005208
5209 By default, distutils will build C++ extension modules with \"$CXX\".
5210 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005211 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005212fi
5213
5214
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5216
5217
5218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5219$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5220cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005221#undef bfin
5222#undef cris
5223#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005224#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005225#undef hppa
5226#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005227#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005228#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005229#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005230#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005231#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005232#if defined(__ANDROID__)
5233# if defined(__x86_64__) && defined(__LP64__)
5234 x86_64-linux-android
5235# elif defined(__i386__)
5236 i686-linux-android
5237# elif defined(__aarch64__) && defined(__AARCH64EL__)
5238# if defined(__ILP32__)
5239 aarch64_ilp32-linux-android
5240# else
5241 aarch64-linux-android
5242# endif
5243# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5244 arm-linux-androideabi
5245# elif defined(__mips_hard_float) && defined(_MIPSEL)
5246# if _MIPS_SIM == _ABIO32
5247 mipsel-linux-android
5248# elif _MIPS_SIM == _ABI64
5249 mips64el-linux-android
5250# else
5251# error unknown platform triplet
5252# endif
5253# else
5254# error unknown platform triplet
5255# endif
5256#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005257# if defined(__x86_64__) && defined(__LP64__)
5258 x86_64-linux-gnu
5259# elif defined(__x86_64__) && defined(__ILP32__)
5260 x86_64-linux-gnux32
5261# elif defined(__i386__)
5262 i386-linux-gnu
5263# elif defined(__aarch64__) && defined(__AARCH64EL__)
5264# if defined(__ILP32__)
5265 aarch64_ilp32-linux-gnu
5266# else
5267 aarch64-linux-gnu
5268# endif
5269# elif defined(__aarch64__) && defined(__AARCH64EB__)
5270# if defined(__ILP32__)
5271 aarch64_be_ilp32-linux-gnu
5272# else
5273 aarch64_be-linux-gnu
5274# endif
5275# elif defined(__alpha__)
5276 alpha-linux-gnu
5277# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5278# if defined(__ARMEL__)
5279 arm-linux-gnueabihf
5280# else
5281 armeb-linux-gnueabihf
5282# endif
5283# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5284# if defined(__ARMEL__)
5285 arm-linux-gnueabi
5286# else
5287 armeb-linux-gnueabi
5288# endif
5289# elif defined(__hppa__)
5290 hppa-linux-gnu
5291# elif defined(__ia64__)
5292 ia64-linux-gnu
5293# elif defined(__m68k__) && !defined(__mcoldfire__)
5294 m68k-linux-gnu
5295# elif defined(__mips_hard_float) && defined(_MIPSEL)
5296# if _MIPS_SIM == _ABIO32
5297 mipsel-linux-gnu
5298# elif _MIPS_SIM == _ABIN32
5299 mips64el-linux-gnuabin32
5300# elif _MIPS_SIM == _ABI64
5301 mips64el-linux-gnuabi64
5302# else
5303# error unknown platform triplet
5304# endif
5305# elif defined(__mips_hard_float)
5306# if _MIPS_SIM == _ABIO32
5307 mips-linux-gnu
5308# elif _MIPS_SIM == _ABIN32
5309 mips64-linux-gnuabin32
5310# elif _MIPS_SIM == _ABI64
5311 mips64-linux-gnuabi64
5312# else
5313# error unknown platform triplet
5314# endif
5315# elif defined(__or1k__)
5316 or1k-linux-gnu
5317# elif defined(__powerpc__) && defined(__SPE__)
5318 powerpc-linux-gnuspe
5319# elif defined(__powerpc64__)
5320# if defined(__LITTLE_ENDIAN__)
5321 powerpc64le-linux-gnu
5322# else
5323 powerpc64-linux-gnu
5324# endif
5325# elif defined(__powerpc__)
5326 powerpc-linux-gnu
5327# elif defined(__s390x__)
5328 s390x-linux-gnu
5329# elif defined(__s390__)
5330 s390-linux-gnu
5331# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5332 sh4-linux-gnu
5333# elif defined(__sparc__) && defined(__arch64__)
5334 sparc64-linux-gnu
5335# elif defined(__sparc__)
5336 sparc-linux-gnu
5337# else
5338# error unknown platform triplet
5339# endif
5340#elif defined(__FreeBSD_kernel__)
5341# if defined(__LP64__)
5342 x86_64-kfreebsd-gnu
5343# elif defined(__i386__)
5344 i386-kfreebsd-gnu
5345# else
5346# error unknown platform triplet
5347# endif
5348#elif defined(__gnu_hurd__)
5349 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005350#elif defined(__APPLE__)
5351 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005352#else
5353# error unknown platform triplet
5354#endif
5355
5356EOF
5357
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005358if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5361$as_echo "$PLATFORM_TRIPLET" >&6; }
5362else
5363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5364$as_echo "none" >&6; }
5365fi
5366rm -f conftest.c conftest.out
5367
5368if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5369 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5370 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5371 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005372elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5373 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005374fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005375
doko@ubuntu.com55532312016-06-14 08:55:19 +02005376if test x$MULTIARCH != x; then
5377 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5378fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005379
5380
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5382$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5383save_LDFLAGS="$LDFLAGS"
5384LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005385
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5387/* end confdefs.h. */
5388
5389int
5390main ()
5391{
5392
5393 ;
5394 return 0;
5395}
5396_ACEOF
5397if ac_fn_c_try_link "$LINENO"; then :
5398 NO_AS_NEEDED="-Wl,--no-as-needed"
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5400$as_echo "yes" >&6; }
5401else
5402 NO_AS_NEEDED=""
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404$as_echo "no" >&6; }
5405fi
5406rm -f core conftest.err conftest.$ac_objext \
5407 conftest$ac_exeext conftest.$ac_ext
5408LDFLAGS="$save_LDFLAGS"
5409
5410
5411
5412# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413
Matthias Kloseb9621712010-04-24 17:59:49 +00005414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5415$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005416if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418else
5419 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5420 then ac_cv_path_EGREP="$GREP -E"
5421 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 # Loop through the user's path and test for each of PROGNAME-LIST
5425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5427do
5428 IFS=$as_save_IFS
5429 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 for ac_prog in egrep; do
5431 for ac_exec_ext in '' $ac_executable_extensions; do
5432 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005433 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005434# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 # Check for GNU $ac_path_EGREP
5436case `"$ac_path_EGREP" --version 2>&1` in
5437*GNU*)
5438 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5439*)
5440 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005442 while :
5443 do
5444 cat "conftest.in" "conftest.in" >"conftest.tmp"
5445 mv "conftest.tmp" "conftest.in"
5446 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005448 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5449 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5452 # Best one so far, save it but keep looking for a better one
5453 ac_cv_path_EGREP="$ac_path_EGREP"
5454 ac_path_EGREP_max=$ac_count
5455 fi
5456 # 10*(2^10) chars as input seems more than enough
5457 test $ac_count -gt 10 && break
5458 done
5459 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5460esac
5461
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 $ac_path_EGREP_found && break 3
5463 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005464 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005466IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005468 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 +00005469 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005470else
5471 ac_cv_path_EGREP=$EGREP
5472fi
5473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005474 fi
5475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5477$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005478 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005479
5480
Matthias Kloseb9621712010-04-24 17:59:49 +00005481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5482$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005483if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005484 $as_echo_n "(cached) " >&6
5485else
5486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005487/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005488#include <stdlib.h>
5489#include <stdarg.h>
5490#include <string.h>
5491#include <float.h>
5492
5493int
5494main ()
5495{
5496
5497 ;
5498 return 0;
5499}
5500_ACEOF
5501if ac_fn_c_try_compile "$LINENO"; then :
5502 ac_cv_header_stdc=yes
5503else
5504 ac_cv_header_stdc=no
5505fi
5506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5507
5508if test $ac_cv_header_stdc = yes; then
5509 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5511/* end confdefs.h. */
5512#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005513
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005514_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005515if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005516 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005518else
Matthias Kloseb9621712010-04-24 17:59:49 +00005519 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005520fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005521rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522
Matthias Kloseb9621712010-04-24 17:59:49 +00005523fi
5524
5525if test $ac_cv_header_stdc = yes; then
5526 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528/* end confdefs.h. */
5529#include <stdlib.h>
5530
5531_ACEOF
5532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5533 $EGREP "free" >/dev/null 2>&1; then :
5534
5535else
5536 ac_cv_header_stdc=no
5537fi
5538rm -f conftest*
5539
5540fi
5541
5542if test $ac_cv_header_stdc = yes; then
5543 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5544 if test "$cross_compiling" = yes; then :
5545 :
5546else
5547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5548/* end confdefs.h. */
5549#include <ctype.h>
5550#include <stdlib.h>
5551#if ((' ' & 0x0FF) == 0x020)
5552# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5553# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5554#else
5555# define ISLOWER(c) \
5556 (('a' <= (c) && (c) <= 'i') \
5557 || ('j' <= (c) && (c) <= 'r') \
5558 || ('s' <= (c) && (c) <= 'z'))
5559# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5560#endif
5561
5562#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5563int
5564main ()
5565{
5566 int i;
5567 for (i = 0; i < 256; i++)
5568 if (XOR (islower (i), ISLOWER (i))
5569 || toupper (i) != TOUPPER (i))
5570 return 2;
5571 return 0;
5572}
5573_ACEOF
5574if ac_fn_c_try_run "$LINENO"; then :
5575
5576else
5577 ac_cv_header_stdc=no
5578fi
5579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5580 conftest.$ac_objext conftest.beam conftest.$ac_ext
5581fi
5582
5583fi
5584fi
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5586$as_echo "$ac_cv_header_stdc" >&6; }
5587if test $ac_cv_header_stdc = yes; then
5588
5589$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5590
5591fi
5592
5593# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5594for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5595 inttypes.h stdint.h unistd.h
5596do :
5597 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5598ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5599"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005600if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005601 cat >>confdefs.h <<_ACEOF
5602#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5603_ACEOF
5604
5605fi
5606
5607done
5608
5609
5610
5611 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 +02005612if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005613 MINIX=yes
5614else
5615 MINIX=
5616fi
5617
5618
5619 if test "$MINIX" = yes; then
5620
5621$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5622
5623
5624$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5625
5626
5627$as_echo "#define _MINIX 1" >>confdefs.h
5628
5629 fi
5630
5631
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5633$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005634if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005635 $as_echo_n "(cached) " >&6
5636else
5637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5638/* end confdefs.h. */
5639
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005640# define __EXTENSIONS__ 1
5641 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005642int
5643main ()
5644{
5645
5646 ;
5647 return 0;
5648}
5649_ACEOF
5650if ac_fn_c_try_compile "$LINENO"; then :
5651 ac_cv_safe_to_define___extensions__=yes
5652else
5653 ac_cv_safe_to_define___extensions__=no
5654fi
5655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5656fi
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5658$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5659 test $ac_cv_safe_to_define___extensions__ = yes &&
5660 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5661
5662 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5663
5664 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5665
5666 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5667
5668 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5669
5670
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
Xavier de Gaye95750b12016-07-09 11:05:42 +02005672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5673$as_echo_n "checking for the Android API level... " >&6; }
5674cat >> conftest.c <<EOF
5675#ifdef __ANDROID__
5676#include <android/api-level.h>
5677__ANDROID_API__
5678#else
5679#error not Android
5680#endif
5681EOF
5682
5683if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5684 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5686$as_echo "$ANDROID_API_LEVEL" >&6; }
5687
5688cat >>confdefs.h <<_ACEOF
5689#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5690_ACEOF
5691
5692else
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5694$as_echo "not Android" >&6; }
5695fi
5696rm -f conftest.c conftest.out
5697
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698# Check for unsupported systems
5699case $ac_sys_system/$ac_sys_release in
5700atheos*|Linux*/1*)
5701 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5702 echo See README for details.
5703 exit 1;;
5704esac
5705
5706
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5708$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709
5710# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005711if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 withval=$with_suffix;
5713 case $withval in
5714 no) EXEEXT=;;
5715 yes) EXEEXT=.exe;;
5716 *) EXEEXT=$withval;;
5717 esac
5718fi
5719
Matthias Kloseb9621712010-04-24 17:59:49 +00005720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5721$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722
5723# Test whether we're running on a non-case-sensitive system, in which
5724# case we give a warning if no ext is given
5725
Matthias Kloseb9621712010-04-24 17:59:49 +00005726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5727$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728if test ! -d CaseSensitiveTestDir; then
5729mkdir CaseSensitiveTestDir
5730fi
5731
5732if test -d casesensitivetestdir
5733then
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5735$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 BUILDEXEEXT=.exe
5737else
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740 BUILDEXEEXT=$EXEEXT
5741fi
5742rmdir CaseSensitiveTestDir
5743
5744case $MACHDEP in
5745bsdos*)
5746 case $CC in
5747 gcc) CC="$CC -D_HAVE_BSDI";;
5748 esac;;
5749esac
5750
5751case $ac_sys_system in
5752hp*|HP*)
5753 case $CC in
5754 cc|*/cc) CC="$CC -Ae";;
5755 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756esac
5757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5760$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761if test -z "$LIBRARY"
5762then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005763 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5766$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767
5768# LDLIBRARY is the name of the library to link against (as opposed to the
5769# name of the library into which to insert object files). BLDLIBRARY is also
5770# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5771# is blank as the main program is not linked directly against LDLIBRARY.
5772# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5773# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5774# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5775# DLLLIBRARY is the shared (i.e., DLL) library.
5776#
5777# RUNSHARED is used to run shared python without installed libraries
5778#
5779# INSTSONAME is the name of the shared library that will be use to install
5780# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005781#
5782# LDVERSION is the shared library version number, normally the Python version
5783# with the ABI build flags appended.
5784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785
5786
5787
5788
5789
5790
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792LDLIBRARY="$LIBRARY"
5793BLDLIBRARY='$(LDLIBRARY)'
5794INSTSONAME='$(LDLIBRARY)'
5795DLLLIBRARY=''
5796LDLIBRARYDIR=''
5797RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005798LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799
5800# LINKCC is the command that links the python executable -- default is $(CC).
5801# If CXX is set, and if it is needed to link a main function that was
5802# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5803# python might then depend on the C++ runtime
5804# This is altered for AIX in order to build the export list before
5805# linking.
5806
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5808$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809if test -z "$LINKCC"
5810then
5811 LINKCC='$(PURIFY) $(MAINCC)'
5812 case $ac_sys_system in
5813 AIX*)
5814 exp_extra="\"\""
5815 if test $ac_sys_release -ge 5 -o \
5816 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5817 exp_extra="."
5818 fi
5819 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820 QNX*)
5821 # qcc must be used because the other compilers do not
5822 # support -N.
5823 LINKCC=qcc;;
5824 esac
5825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5827$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828
5829# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5830# make sure we default having it set to "no": this is used by
5831# distutils.unixccompiler to know if it should add --enable-new-dtags
5832# to linker command lines, and failing to detect GNU ld simply results
5833# in the same bahaviour as before.
5834
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5836$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837ac_prog=ld
5838if test "$GCC" = yes; then
5839 ac_prog=`$CC -print-prog-name=ld`
5840fi
5841case `"$ac_prog" -V 2>&1 < /dev/null` in
5842 *GNU*)
5843 GNULD=yes;;
5844 *)
5845 GNULD=no;;
5846esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5848$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5851$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005852if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005853 $as_echo_n "(cached) " >&6
5854else
5855 ac_cv_c_inline=no
5856for ac_kw in inline __inline__ __inline; do
5857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5858/* end confdefs.h. */
5859#ifndef __cplusplus
5860typedef int foo_t;
5861static $ac_kw foo_t static_foo () {return 0; }
5862$ac_kw foo_t foo () {return 0; }
5863#endif
5864
5865_ACEOF
5866if ac_fn_c_try_compile "$LINENO"; then :
5867 ac_cv_c_inline=$ac_kw
5868fi
5869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5870 test "$ac_cv_c_inline" != no && break
5871done
5872
5873fi
5874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5875$as_echo "$ac_cv_c_inline" >&6; }
5876
5877case $ac_cv_c_inline in
5878 inline | yes) ;;
5879 *)
5880 case $ac_cv_c_inline in
5881 no) ac_val=;;
5882 *) ac_val=$ac_cv_c_inline;;
5883 esac
5884 cat >>confdefs.h <<_ACEOF
5885#ifndef __cplusplus
5886#define inline $ac_val
5887#endif
5888_ACEOF
5889 ;;
5890esac
5891
5892if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005893
5894$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005895
5896
5897fi
5898
5899
Matthias Kloseb9621712010-04-24 17:59:49 +00005900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5901$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005903if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 enableval=$enable_shared;
5905fi
5906
5907
5908if test -z "$enable_shared"
5909then
5910 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005911 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 enable_shared="yes";;
5913 *)
5914 enable_shared="no";;
5915 esac
5916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5918$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
Matthias Kloseb9621712010-04-24 17:59:49 +00005920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5921$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005923if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005924 enableval=$enable_profiling;
5925fi
5926
5927if test "x$enable_profiling" = xyes; then
5928 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005929 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931/* end confdefs.h. */
5932int main() { return 0; }
5933_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005934if ac_fn_c_try_link "$LINENO"; then :
5935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005937 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005939rm -f core conftest.err conftest.$ac_objext \
5940 conftest$ac_exeext conftest.$ac_ext
5941 CC="$ac_save_cc"
5942else
5943 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5946$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947
doko@ubuntu.comba015832012-06-30 16:52:05 +02005948if test "x$enable_profiling" = xyes; then
5949 BASECFLAGS="-pg $BASECFLAGS"
5950 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951fi
5952
Matthias Kloseb9621712010-04-24 17:59:49 +00005953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5954$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955
5956# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5957# library that we build, but we do not want to link against it (we
5958# will find it with a -framework option). For this reason there is an
5959# extra variable BLDLIBRARY against which Python and the extension
5960# modules are linked, BLDLIBRARY. This is normally the same as
5961# LDLIBRARY, but empty for MacOSX framework builds.
5962if test "$enable_framework"
5963then
5964 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 BLDLIBRARY=''
5967else
5968 BLDLIBRARY='$(LDLIBRARY)'
5969fi
5970
5971# Other platforms follow
5972if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005973 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974
Matthias Kloseb9621712010-04-24 17:59:49 +00005975$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
5977 case $ac_sys_system in
5978 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005979 LDLIBRARY='libpython$(LDVERSION).dll.a'
5980 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ;;
5982 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005983 LDLIBRARY='libpython$(LDVERSION).so'
5984 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005985 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005987 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005988 then
5989 PY3LIBRARY=libpython3.so
5990 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005992 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005993 LDLIBRARY='libpython$(LDVERSION).so'
5994 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005995 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005997 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005998 then
5999 PY3LIBRARY=libpython3.so
6000 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ;;
6002 hp*|HP*)
6003 case `uname -m` in
6004 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006005 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006 ;;
6007 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006008 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009 ;;
6010 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006011 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006012 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006015 LDLIBRARY='libpython$(LDVERSION).dylib'
6016 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006017 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006019 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006020 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006021 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006022 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023
6024 esac
6025else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006026 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027 case $ac_sys_system in
6028 CYGWIN*)
6029 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006030 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ;;
6032 esac
6033fi
6034
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006035if test "$cross_compiling" = yes; then
6036 RUNSHARED=
6037fi
6038
Matthias Kloseb9621712010-04-24 17:59:49 +00006039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6040$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041
6042if test -n "$ac_tool_prefix"; then
6043 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6044set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6046$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006047if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006048 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049else
6050 if test -n "$RANLIB"; then
6051 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6052else
6053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054for as_dir in $PATH
6055do
6056 IFS=$as_save_IFS
6057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006058 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 break 2
6063 fi
6064done
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066IFS=$as_save_IFS
6067
6068fi
6069fi
6070RANLIB=$ac_cv_prog_RANLIB
6071if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6073$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074else
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077fi
6078
6079
6080fi
6081if test -z "$ac_cv_prog_RANLIB"; then
6082 ac_ct_RANLIB=$RANLIB
6083 # Extract the first word of "ranlib", so it can be a program name with args.
6084set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6086$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006087if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089else
6090 if test -n "$ac_ct_RANLIB"; then
6091 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6092else
6093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6094for as_dir in $PATH
6095do
6096 IFS=$as_save_IFS
6097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006100 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102 break 2
6103 fi
6104done
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106IFS=$as_save_IFS
6107
6108fi
6109fi
6110ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6111if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6113$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114else
Matthias Kloseb9621712010-04-24 17:59:49 +00006115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6116$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117fi
6118
6119 if test "x$ac_ct_RANLIB" = x; then
6120 RANLIB=":"
6121 else
6122 case $cross_compiling:$ac_tool_warned in
6123yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006124{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6125$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126ac_tool_warned=yes ;;
6127esac
6128 RANLIB=$ac_ct_RANLIB
6129 fi
6130else
6131 RANLIB="$ac_cv_prog_RANLIB"
6132fi
6133
6134
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006135if test -n "$ac_tool_prefix"; then
6136 for ac_prog in ar aal
6137 do
6138 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6139set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6141$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006142if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144else
6145 if test -n "$AR"; then
6146 ac_cv_prog_AR="$AR" # Let the user override the test.
6147else
6148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6149for as_dir in $PATH
6150do
6151 IFS=$as_save_IFS
6152 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006153 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006154 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006155 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157 break 2
6158 fi
6159done
Matthias Kloseb9621712010-04-24 17:59:49 +00006160 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161IFS=$as_save_IFS
6162
6163fi
6164fi
6165AR=$ac_cv_prog_AR
6166if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6168$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169else
Matthias Kloseb9621712010-04-24 17:59:49 +00006170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6171$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172fi
6173
6174
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006175 test -n "$AR" && break
6176 done
6177fi
6178if test -z "$AR"; then
6179 ac_ct_AR=$AR
6180 for ac_prog in ar aal
6181do
6182 # Extract the first word of "$ac_prog", so it can be a program name with args.
6183set dummy $ac_prog; ac_word=$2
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185$as_echo_n "checking for $ac_word... " >&6; }
6186if ${ac_cv_prog_ac_ct_AR+:} false; then :
6187 $as_echo_n "(cached) " >&6
6188else
6189 if test -n "$ac_ct_AR"; then
6190 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6191else
6192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6193for as_dir in $PATH
6194do
6195 IFS=$as_save_IFS
6196 test -z "$as_dir" && as_dir=.
6197 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006199 ac_cv_prog_ac_ct_AR="$ac_prog"
6200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6201 break 2
6202 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006204 done
6205IFS=$as_save_IFS
6206
6207fi
6208fi
6209ac_ct_AR=$ac_cv_prog_ac_ct_AR
6210if test -n "$ac_ct_AR"; then
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6212$as_echo "$ac_ct_AR" >&6; }
6213else
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6215$as_echo "no" >&6; }
6216fi
6217
6218
6219 test -n "$ac_ct_AR" && break
6220done
6221
6222 if test "x$ac_ct_AR" = x; then
6223 AR="ar"
6224 else
6225 case $cross_compiling:$ac_tool_warned in
6226yes:)
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6229ac_tool_warned=yes ;;
6230esac
6231 AR=$ac_ct_AR
6232 fi
6233fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234
6235
6236# tweak ARFLAGS only if the user didn't set it on the command line
6237
6238if test -z "$ARFLAGS"
6239then
6240 ARFLAGS="rc"
6241fi
6242
doko@ubuntu.com58844492012-06-30 18:25:32 +02006243if test -n "$ac_tool_prefix"; then
6244 for ac_prog in readelf
6245 do
6246 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6247set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6249$as_echo_n "checking for $ac_word... " >&6; }
6250if ${ac_cv_prog_READELF+:} false; then :
6251 $as_echo_n "(cached) " >&6
6252else
6253 if test -n "$READELF"; then
6254 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6255else
6256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259 IFS=$as_save_IFS
6260 test -z "$as_dir" && as_dir=.
6261 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006262 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006263 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265 break 2
6266 fi
6267done
6268 done
6269IFS=$as_save_IFS
6270
6271fi
6272fi
6273READELF=$ac_cv_prog_READELF
6274if test -n "$READELF"; then
6275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6276$as_echo "$READELF" >&6; }
6277else
6278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283 test -n "$READELF" && break
6284 done
6285fi
6286if test -z "$READELF"; then
6287 ac_ct_READELF=$READELF
6288 for ac_prog in readelf
6289do
6290 # Extract the first word of "$ac_prog", so it can be a program name with args.
6291set dummy $ac_prog; ac_word=$2
6292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6293$as_echo_n "checking for $ac_word... " >&6; }
6294if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6295 $as_echo_n "(cached) " >&6
6296else
6297 if test -n "$ac_ct_READELF"; then
6298 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6299else
6300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH
6302do
6303 IFS=$as_save_IFS
6304 test -z "$as_dir" && as_dir=.
6305 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006306 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006307 ac_cv_prog_ac_ct_READELF="$ac_prog"
6308 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6309 break 2
6310 fi
6311done
6312 done
6313IFS=$as_save_IFS
6314
6315fi
6316fi
6317ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6318if test -n "$ac_ct_READELF"; then
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6320$as_echo "$ac_ct_READELF" >&6; }
6321else
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
6324fi
6325
6326
6327 test -n "$ac_ct_READELF" && break
6328done
6329
6330 if test "x$ac_ct_READELF" = x; then
6331 READELF=":"
6332 else
6333 case $cross_compiling:$ac_tool_warned in
6334yes:)
6335{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6336$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6337ac_tool_warned=yes ;;
6338esac
6339 READELF=$ac_ct_READELF
6340 fi
6341fi
6342
6343if test "$cross_compiling" = yes; then
6344 case "$READELF" in
6345 readelf|:)
6346 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6347 ;;
6348 esac
6349fi
6350
6351
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353case $MACHDEP in
6354bsdos*|hp*|HP*)
6355 # install -d does not work on BSDI or HP-UX
6356 if test -z "$INSTALL"
6357 then
6358 INSTALL="${srcdir}/install-sh -c"
6359 fi
6360esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361# Find a good install program. We prefer a C program (faster),
6362# so one script is as good as another. But avoid the broken or
6363# incompatible versions:
6364# SysV /etc/install, /usr/sbin/install
6365# SunOS /usr/etc/install
6366# IRIX /sbin/install
6367# AIX /bin/install
6368# AmigaOS /C/install, which installs bootblocks on floppy discs
6369# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6370# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6371# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6372# OS/2's system install, which has a completely different semantic
6373# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006374# Reject install programs that cannot install multiple files.
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6376$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006377if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006378if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006379 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380else
6381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6382for as_dir in $PATH
6383do
6384 IFS=$as_save_IFS
6385 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 # Account for people who put trailing slashes in PATH elements.
6387case $as_dir/ in #((
6388 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006389 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006390 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006391 /usr/ucb/* ) ;;
6392 *)
6393 # OSF1 and SCO ODT 3.0 have their own names for install.
6394 # Don't use installbsd from OSF since it installs stuff as root
6395 # by default.
6396 for ac_prog in ginstall scoinst install; do
6397 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006398 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399 if test $ac_prog = install &&
6400 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6401 # AIX install. It has an incompatible calling convention.
6402 :
6403 elif test $ac_prog = install &&
6404 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6405 # program-specific install script used by HP pwplus--don't use.
6406 :
6407 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006408 rm -rf conftest.one conftest.two conftest.dir
6409 echo one > conftest.one
6410 echo two > conftest.two
6411 mkdir conftest.dir
6412 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6413 test -s conftest.one && test -s conftest.two &&
6414 test -s conftest.dir/conftest.one &&
6415 test -s conftest.dir/conftest.two
6416 then
6417 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6418 break 3
6419 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420 fi
6421 fi
6422 done
6423 done
6424 ;;
6425esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006426
6427 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428IFS=$as_save_IFS
6429
Matthias Kloseb9621712010-04-24 17:59:49 +00006430rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431
6432fi
6433 if test "${ac_cv_path_install+set}" = set; then
6434 INSTALL=$ac_cv_path_install
6435 else
6436 # As a last resort, use the slow shell script. Don't cache a
6437 # value for INSTALL within a source directory, because that will
6438 # break other packages using the cache if that directory is
6439 # removed, or if the value is a relative name.
6440 INSTALL=$ac_install_sh
6441 fi
6442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6444$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445
6446# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6447# It thinks the first close brace ends the variable substitution.
6448test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6449
6450test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6451
6452test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6453
Matthias Klose93a0ef12012-03-15 18:08:34 +01006454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6455$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6456if test -z "$MKDIR_P"; then
6457 if ${ac_cv_path_mkdir+:} false; then :
6458 $as_echo_n "(cached) " >&6
6459else
6460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6461for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6462do
6463 IFS=$as_save_IFS
6464 test -z "$as_dir" && as_dir=.
6465 for ac_prog in mkdir gmkdir; do
6466 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006467 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006468 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6469 'mkdir (GNU coreutils) '* | \
6470 'mkdir (coreutils) '* | \
6471 'mkdir (fileutils) '4.1*)
6472 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6473 break 3;;
6474 esac
6475 done
6476 done
6477 done
6478IFS=$as_save_IFS
6479
6480fi
6481
6482 test -d ./--version && rmdir ./--version
6483 if test "${ac_cv_path_mkdir+set}" = set; then
6484 MKDIR_P="$ac_cv_path_mkdir -p"
6485 else
6486 # As a last resort, use the slow shell script. Don't cache a
6487 # value for MKDIR_P within a source directory, because that will
6488 # break other packages using the cache if that directory is
6489 # removed, or if the value is a relative name.
6490 MKDIR_P="$ac_install_sh -d"
6491 fi
6492fi
6493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6494$as_echo "$MKDIR_P" >&6; }
6495
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006496
6497# Not every filesystem supports hard links
6498
6499if test -z "$LN" ; then
6500 case $ac_sys_system in
6501 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006502 *) LN=ln;;
6503 esac
6504fi
6505
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006506# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006507
6508ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006509
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006510# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6512$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513
6514# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006515if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516 withval=$with_pydebug;
6517if test "$withval" != no
6518then
6519
Matthias Kloseb9621712010-04-24 17:59:49 +00006520$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6523$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006525 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006526else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6527$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528fi
6529else
Matthias Kloseb9621712010-04-24 17:59:49 +00006530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532fi
6533
6534
Brett Cannon63d98bc2016-09-06 17:12:40 -07006535# Enable optimization flags
6536
6537
6538Py_OPT='false'
6539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6540$as_echo_n "checking for --with-optimizations... " >&6; }
6541
6542# Check whether --with-optimizations was given.
6543if test "${with_optimizations+set}" = set; then :
6544 withval=$with_optimizations;
6545if test "$withval" != no
6546then
6547 Py_OPT='true'
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6549$as_echo "yes" >&6; };
6550else
6551 Py_OPT='false'
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6553$as_echo "no" >&6; };
6554fi
6555else
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557$as_echo "no" >&6; }
6558fi
6559
6560if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006561 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6562 # compile working code using it and both test_distutils and test_gdb are
6563 # broken when you do managed to get a toolchain that works with it. People
6564 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006565 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006566 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006567 DEF_MAKE_RULE="build_all"
6568else
6569 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006570 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006571 DEF_MAKE_RULE="all"
6572fi
6573
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006574# Enable LTO flags
6575
6576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6577$as_echo_n "checking for --with-lto... " >&6; }
6578
6579# Check whether --with-lto was given.
6580if test "${with_lto+set}" = set; then :
6581 withval=$with_lto;
6582if test "$withval" != no
6583then
6584 Py_LTO='true'
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6586$as_echo "yes" >&6; };
6587else
6588 Py_LTO='false'
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6590$as_echo "no" >&6; };
6591fi
6592else
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595fi
6596
6597if test "$Py_LTO" = 'true' ; then
6598 case $CC in
6599 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006600 case $ac_sys_system in
6601 Darwin*)
6602 # Any changes made here should be reflected in the GCC+Darwin case below
6603 LTOFLAGS="-flto -Wl,-export_dynamic"
6604 ;;
6605 *)
6606 LTOFLAGS="-flto"
6607 ;;
6608 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006609 ;;
6610 *gcc*)
6611 case $ac_sys_system in
6612 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006613 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006614 ;;
6615 *)
6616 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6617 ;;
6618 esac
6619 ;;
6620 esac
6621fi
6622
Brett Cannon7188a3e2015-09-18 15:13:44 -07006623# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006624
6625
6626
6627
6628
Gregory P. Smith799520c2016-09-07 16:10:00 -07006629# Make this work on systems where llvm tools are not installed with their
6630# normal names in the default $PATH (ie: Ubuntu). They exist under the
6631# non-suffixed name in their versioned llvm directory.
6632llvm_bin_dir=''
6633llvm_path="${PATH}"
6634if test "${CC}" = "clang"
6635then
6636 clang_bin=`which clang`
6637 # Some systems install clang elsewhere as a symlink to the real path
6638 # which is where the related llvm tools are located.
6639 if test -L "${clang_bin}"
6640 then
6641 clang_dir=`dirname "${clang_bin}"`
6642 clang_bin=`readlink "${clang_bin}"`
6643 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6644 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6645 fi
6646fi
Zachary Ware5af85642015-12-21 12:09:17 -06006647
Gregory P. Smith799520c2016-09-07 16:10:00 -07006648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6649$as_echo_n "checking target system type... " >&6; }
6650if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006651 $as_echo_n "(cached) " >&6
6652else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006653 if test "x$target_alias" = x; then
6654 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006656 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6657 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6658fi
6659
6660fi
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6662$as_echo "$ac_cv_target" >&6; }
6663case $ac_cv_target in
6664*-*-*) ;;
6665*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6666esac
6667target=$ac_cv_target
6668ac_save_IFS=$IFS; IFS='-'
6669set x $ac_cv_target
6670shift
6671target_cpu=$1
6672target_vendor=$2
6673shift; shift
6674# Remember, the first character of IFS is used to create $*,
6675# except with old shells:
6676target_os=$*
6677IFS=$ac_save_IFS
6678case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6679
6680
6681# The aliases save the names the user supplied, while $host etc.
6682# will get canonicalized.
6683test -n "$target_alias" &&
6684 test "$program_prefix$program_suffix$program_transform_name" = \
6685 NONENONEs,x,x, &&
6686 program_prefix=${target_alias}-
6687# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6688set dummy $target_alias-llvm-profdata; ac_word=$2
6689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6690$as_echo_n "checking for $ac_word... " >&6; }
6691if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6692 $as_echo_n "(cached) " >&6
6693else
6694 case $LLVM_PROFDATA in
6695 [\\/]* | ?:[\\/]*)
6696 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6697 ;;
6698 *)
6699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6700for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006701do
6702 IFS=$as_save_IFS
6703 test -z "$as_dir" && as_dir=.
6704 for ac_exec_ext in '' $ac_executable_extensions; do
6705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006706 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6708 break 2
6709 fi
6710done
6711 done
6712IFS=$as_save_IFS
6713
Gregory P. Smith799520c2016-09-07 16:10:00 -07006714 ;;
6715esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006716fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006717LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6718if test -n "$LLVM_PROFDATA"; then
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6720$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006721else
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6723$as_echo "no" >&6; }
6724fi
6725
6726
Gregory P. Smith799520c2016-09-07 16:10:00 -07006727if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6728 if test "$build" = "$target"; then
6729 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6730 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6731set dummy llvm-profdata; ac_word=$2
6732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6733$as_echo_n "checking for $ac_word... " >&6; }
6734if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6735 $as_echo_n "(cached) " >&6
6736else
6737 case $ac_pt_LLVM_PROFDATA in
6738 [\\/]* | ?:[\\/]*)
6739 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6740 ;;
6741 *)
6742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6743for as_dir in ${llvm_path}
6744do
6745 IFS=$as_save_IFS
6746 test -z "$as_dir" && as_dir=.
6747 for ac_exec_ext in '' $ac_executable_extensions; do
6748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6749 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6751 break 2
6752 fi
6753done
6754 done
6755IFS=$as_save_IFS
6756
6757 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6758 ;;
6759esac
6760fi
6761ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6762if test -n "$ac_pt_LLVM_PROFDATA"; then
6763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6764$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6765else
6766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6767$as_echo "no" >&6; }
6768fi
6769
6770 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6771 else
6772 LLVM_PROFDATA="''"
6773 fi
6774else
6775 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6776fi
6777
6778
6779if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6780then
6781 LLVM_PROF_FOUND="found"
6782else
6783 LLVM_PROF_FOUND="not-found"
6784fi
6785if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6786then
6787 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6788 if test -n "${found_llvm_profdata}"
6789 then
6790 # llvm-profdata isn't directly in $PATH in some cases.
6791 # https://apple.stackexchange.com/questions/197053/
6792 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6793 LLVM_PROF_FOUND=found
6794 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6795$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6796 fi
6797fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006798LLVM_PROF_ERR=no
6799case $CC in
6800 *clang*)
6801 # Any changes made here should be reflected in the GCC+Darwin case below
6802 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6803 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006805 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6806 if test $LLVM_PROF_FOUND = not-found
6807 then
6808 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006809 if test "${REQUIRE_PGO}" = "yes"
6810 then
6811 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6812 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813 fi
6814 ;;
6815 *gcc*)
6816 case $ac_sys_system in
6817 Darwin*)
6818 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6819 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006820 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006821 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006822 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006823 then
6824 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006825 if test "${REQUIRE_PGO}" = "yes"
6826 then
6827 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6828 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006829 fi
6830 ;;
6831 *)
6832 PGO_PROF_GEN_FLAG="-fprofile-generate"
6833 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6834 LLVM_PROF_MERGER="true"
6835 LLVM_PROF_FILE=""
6836 ;;
6837 esac
6838 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006839 *icc*)
6840 PGO_PROF_GEN_FLAG="-prof-gen"
6841 PGO_PROF_USE_FLAG="-prof-use"
6842 LLVM_PROF_MERGER="true"
6843 LLVM_PROF_FILE=""
6844 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006845esac
6846
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6848# merged with this chunk of code?
6849
6850# Optimizer/debugger flags
6851# ------------------------
6852# (The following bit of code is complicated enough - please keep things
6853# indented properly. Just pretend you're editing Python code. ;-)
6854
6855# There are two parallel sets of case statements below, one that checks to
6856# see if OPT was set and one that does BASECFLAGS setting based upon
6857# compiler and platform. BASECFLAGS tweaks need to be made even if the
6858# user set OPT.
6859
6860# tweak OPT based on compiler and platform, only if the user didn't set
6861# it on the command line
6862
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006863if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864then
6865 case $GCC in
6866 yes)
6867 if test "$CC" != 'g++' ; then
6868 STRICT_PROTO="-Wstrict-prototypes"
6869 fi
6870 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6871 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6872 WRAP="-fwrapv"
6873 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006874
6875 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006876 case $CC in
6877 *clang*) WRAP="-fwrapv"
6878 ;;
6879 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881 case $ac_cv_prog_cc_g in
6882 yes)
6883 if test "$Py_DEBUG" = 'true' ; then
6884 # Optimization messes up debuggers, so turn it off for
6885 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006886 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6887 OPT="-g -Og -Wall $STRICT_PROTO"
6888 else
6889 OPT="-g -O0 -Wall $STRICT_PROTO"
6890 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 else
6892 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6893 fi
6894 ;;
6895 *)
6896 OPT="-O3 -Wall $STRICT_PROTO"
6897 ;;
6898 esac
6899 case $ac_sys_system in
6900 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6901 ;;
6902 esac
6903 ;;
6904
6905 *)
6906 OPT="-O"
6907 ;;
6908 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909fi
6910
6911
6912
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914# The -arch flags for universal builds on OSX
6915UNIVERSAL_ARCH_FLAGS=
6916
6917
6918# tweak BASECFLAGS based on compiler and platform
6919case $GCC in
6920yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006921 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006922
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6924$as_echo_n "checking for -Wextra... " >&6; }
6925 ac_save_cc="$CC"
6926 CC="$CC -Wextra -Werror"
6927 if ${ac_cv_extra_warnings+:} false; then :
6928 $as_echo_n "(cached) " >&6
6929else
6930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6931/* end confdefs.h. */
6932
6933
6934int
6935main ()
6936{
6937
6938 ;
6939 return 0;
6940}
6941
6942_ACEOF
6943if ac_fn_c_try_compile "$LINENO"; then :
6944
6945 ac_cv_extra_warnings=yes
6946
6947else
6948
6949 ac_cv_extra_warnings=no
6950
6951fi
6952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6953fi
6954
6955 CC="$ac_save_cc"
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6957$as_echo "$ac_cv_extra_warnings" >&6; }
6958
6959 if test $ac_cv_extra_warnings = yes
6960 then
6961 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6962 fi
6963
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964 # Python doesn't violate C99 aliasing rules, but older versions of
6965 # GCC produce warnings for legal Python code. Enable
6966 # -fno-strict-aliasing on versions of GCC that support but produce
6967 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6969$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970 ac_save_cc="$CC"
6971 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006972 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006973 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006975else
Matthias Kloseb9621712010-04-24 17:59:49 +00006976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006978
Matthias Kloseb159a552010-04-25 21:00:44 +00006979
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006980int
6981main ()
6982{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006983
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006984 ;
6985 return 0;
6986}
Matthias Kloseb159a552010-04-25 21:00:44 +00006987
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006989if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006990
6991 CC="$ac_save_cc -fstrict-aliasing"
6992 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006994/* end confdefs.h. */
6995
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006996 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997int
6998main ()
6999{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007000double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001 ;
7002 return 0;
7003}
Matthias Kloseb159a552010-04-25 21:00:44 +00007004
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007006if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
7008 ac_cv_no_strict_aliasing=no
7009
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010else
Matthias Kloseb159a552010-04-25 21:00:44 +00007011
7012 ac_cv_no_strict_aliasing=yes
7013
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007014fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007016
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007017else
Matthias Kloseb159a552010-04-25 21:00:44 +00007018
7019 ac_cv_no_strict_aliasing=no
7020
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007023fi
7024
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007026 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7028$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007030 then
7031 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7032 fi
7033
Zachary Ware5af85642015-12-21 12:09:17 -06007034 # ICC doesn't recognize the option, but only emits a warning
7035 ## XXX does it emit an unused result warning and can it be disabled?
7036 case "$CC" in
7037 *icc*)
7038 ac_cv_disable_unused_result_warning=no
7039 ;;
7040 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7042$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7043 ac_save_cc="$CC"
7044 CC="$CC -Wunused-result -Werror"
7045 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007046 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007047 $as_echo_n "(cached) " >&6
7048else
7049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7050/* end confdefs.h. */
7051
7052
7053int
7054main ()
7055{
7056
7057 ;
7058 return 0;
7059}
7060
7061_ACEOF
7062if ac_fn_c_try_compile "$LINENO"; then :
7063
7064 ac_cv_disable_unused_result_warning=yes
7065
7066else
7067
7068 ac_cv_disable_unused_result_warning=no
7069
7070fi
7071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7072fi
7073
7074 CFLAGS="$save_CFLAGS"
7075 CC="$ac_save_cc"
7076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7077$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007078 ;;
7079 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007080
7081 if test $ac_cv_disable_unused_result_warning = yes
7082 then
7083 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007084 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7085 fi
7086
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7088$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7089 ac_save_cc="$CC"
7090 CC="$CC -Wunused-parameter -Werror"
7091 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7092 $as_echo_n "(cached) " >&6
7093else
7094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7095/* end confdefs.h. */
7096
7097
7098int
7099main ()
7100{
7101
7102 ;
7103 return 0;
7104}
7105
7106_ACEOF
7107if ac_fn_c_try_compile "$LINENO"; then :
7108
7109 ac_cv_disable_unused_parameter_warning=yes
7110
7111else
7112
7113 ac_cv_disable_unused_parameter_warning=no
7114
7115fi
7116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117fi
7118
7119 CC="$ac_save_cc"
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7121$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7122
7123 if test $ac_cv_disable_unused_parameter_warning = yes
7124 then
7125 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7126 fi
7127
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7129$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7130 ac_save_cc="$CC"
7131 CC="$CC -Wmissing-field-initializers -Werror"
7132 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7133 $as_echo_n "(cached) " >&6
7134else
7135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7136/* end confdefs.h. */
7137
7138
7139int
7140main ()
7141{
7142
7143 ;
7144 return 0;
7145}
7146
7147_ACEOF
7148if ac_fn_c_try_compile "$LINENO"; then :
7149
7150 ac_cv_disable_missing_field_initializers=yes
7151
7152else
7153
7154 ac_cv_disable_missing_field_initializers=no
7155
7156fi
7157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7158fi
7159
7160 CC="$ac_save_cc"
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7162$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7163
7164 if test $ac_cv_disable_missing_field_initializers = yes
7165 then
7166 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007167 fi
7168
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7170$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7171 ac_save_cc="$CC"
7172 CC="$CC -Wsign-compare"
7173 save_CFLAGS="$CFLAGS"
7174 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7175 $as_echo_n "(cached) " >&6
7176else
7177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7178/* end confdefs.h. */
7179
7180
7181int
7182main ()
7183{
7184
7185 ;
7186 return 0;
7187}
7188
7189_ACEOF
7190if ac_fn_c_try_compile "$LINENO"; then :
7191
7192 ac_cv_enable_sign_compare_warning=yes
7193
7194else
7195
7196 ac_cv_enable_sign_compare_warning=no
7197
7198fi
7199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7200fi
7201
7202 CFLAGS="$save_CFLAGS"
7203 CC="$ac_save_cc"
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7205$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7206
7207 if test $ac_cv_enable_sign_compare_warning = yes
7208 then
7209 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7210 fi
7211
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7213$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7214 ac_save_cc="$CC"
7215 CC="$CC -Wunreachable-code"
7216 save_CFLAGS="$CFLAGS"
7217 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7218 $as_echo_n "(cached) " >&6
7219else
7220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7221/* end confdefs.h. */
7222
7223
7224int
7225main ()
7226{
7227
7228 ;
7229 return 0;
7230}
7231
7232_ACEOF
7233if ac_fn_c_try_compile "$LINENO"; then :
7234
7235 ac_cv_enable_unreachable_code_warning=yes
7236
7237else
7238
7239 ac_cv_enable_unreachable_code_warning=no
7240
7241fi
7242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7243fi
7244
7245 CFLAGS="$save_CFLAGS"
7246 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007247
7248 # Don't enable unreachable code warning in debug mode, since it usually
7249 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007250 # Issue #24324: Unfortunately, the unreachable code warning does not work
7251 # correctly on gcc and has been silently removed from the compiler.
7252 # It is supported on clang but on OS X systems gcc may be an alias
7253 # for clang. Try to determine if the compiler is not really gcc and,
7254 # if so, only then enable the warning.
7255 if test $ac_cv_enable_unreachable_code_warning = yes && \
7256 test "$Py_DEBUG" != "true" && \
7257 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007258 then
7259 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007260 else
7261 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007262 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7264$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007265
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7267 # support. Without this, treatment of subnormals doesn't follow
7268 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007269 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007270 alpha*)
7271 BASECFLAGS="$BASECFLAGS -mieee"
7272 ;;
7273 esac
7274
7275 case $ac_sys_system in
7276 SCO_SV*)
7277 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7278 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007279
7280 # is there any other compiler on Darwin besides gcc?
7281 Darwin*)
7282 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7283 # used to be here, but non-Apple gcc doesn't accept them.
7284 if test "${CC}" = gcc
7285 then
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007287$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007288 case "${UNIVERSALSDK}" in
7289 */MacOSX10.4u.sdk)
7290 # Build using 10.4 SDK, force usage of gcc when the
7291 # compiler is gcc, otherwise the user will get very
7292 # confusing error messages when building on OSX 10.6
7293 CC=gcc-4.0
7294 CPP=cpp-4.0
7295 ;;
7296 esac
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007298$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007299 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007300
Ned Deily87adb6e2013-10-18 21:09:56 -07007301 if test "${enable_universalsdk}"
7302 then
7303 case "$UNIVERSAL_ARCHS" in
7304 32-bit)
7305 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7306 LIPO_32BIT_FLAGS=""
7307 ARCH_RUN_32BIT=""
7308 ;;
7309 64-bit)
7310 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7311 LIPO_32BIT_FLAGS=""
7312 ARCH_RUN_32BIT="true"
7313 ;;
7314 all)
7315 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7316 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7317 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7318 ;;
7319 intel)
7320 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7321 LIPO_32BIT_FLAGS="-extract i386"
7322 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7323 ;;
7324 intel-32)
7325 UNIVERSAL_ARCH_FLAGS="-arch i386"
7326 LIPO_32BIT_FLAGS=""
7327 ARCH_RUN_32BIT=""
7328 ;;
7329 3-way)
7330 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7331 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7332 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7333 ;;
7334 *)
7335 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7336 ;;
7337 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338
Ned Deily87adb6e2013-10-18 21:09:56 -07007339 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7340 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7341 if test "${UNIVERSALSDK}" != "/"
7342 then
7343 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7344 fi
7345 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346
Ned Deily87adb6e2013-10-18 21:09:56 -07007347 # Calculate an appropriate deployment target for this build:
7348 # The deployment target value is used explicitly to enable certain
7349 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007350 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007351 # component of the string returned by distutils.get_platform().
7352 #
7353 # Use the value from:
7354 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7355 # 2. the operating system version of the build machine if >= 10.6
7356 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7357 # below to pick either 10.3, 10.4, or 10.5 as the target.
7358 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007359
Ned Deily87adb6e2013-10-18 21:09:56 -07007360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7361$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007362 cur_target_major=`sw_vers -productVersion | \
7363 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7364 cur_target_minor=`sw_vers -productVersion | \
7365 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7366 cur_target="${cur_target_major}.${cur_target_minor}"
7367 if test ${cur_target_major} -eq 10 && \
7368 test ${cur_target_minor} -ge 3 && \
7369 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007370 then
Ned Deily36820b62014-06-25 13:44:22 -07007371 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007372 cur_target=10.3
7373 if test ${enable_universalsdk}
7374 then
7375 case "$UNIVERSAL_ARCHS" in
7376 all|3-way|intel|64-bit)
7377 # These configurations were first supported in 10.5
7378 cur_target='10.5'
7379 ;;
7380 esac
7381 else
7382 if test `/usr/bin/arch` = "i386"
7383 then
7384 # 10.4 was the first release to support Intel archs
7385 cur_target="10.4"
7386 fi
7387 fi
7388 fi
7389 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007390
Ned Deily87adb6e2013-10-18 21:09:56 -07007391 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7392 # environment with a value that is the same as what we'll use
7393 # in the Makefile to ensure that we'll get the same compiler
7394 # environment during configure and build time.
7395 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7396 export MACOSX_DEPLOYMENT_TARGET
7397 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7399$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007400
Ned Deily87adb6e2013-10-18 21:09:56 -07007401 # end of Darwin* tests
7402 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403 esac
7404 ;;
7405
7406*)
7407 case $ac_sys_system in
7408 OpenUNIX*|UnixWare*)
7409 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7410 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411 SCO_SV*)
7412 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7413 ;;
7414 esac
7415 ;;
7416esac
7417
Zachary Ware5af85642015-12-21 12:09:17 -06007418# ICC needs -fp-model strict or floats behave badly
7419case "$CC" in
7420*icc*)
7421 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7422 ;;
7423esac
7424
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007425if test "$Py_DEBUG" = 'true'; then
7426 :
7427else
7428 OPT="-DNDEBUG $OPT"
7429fi
7430
7431if test "$ac_arch_flags"
7432then
7433 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7434fi
7435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436# On some compilers, pthreads are available without further options
7437# (e.g. MacOS X). On some of these systems, the compiler will not
7438# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7439# So we have to see first whether pthreads are available without
7440# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7442$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007443if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445else
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447 ac_cv_pthread_is_default=no
7448else
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450/* end confdefs.h. */
7451
Stefan Krah7dba5942012-11-22 22:49:11 +01007452#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453#include <pthread.h>
7454
7455void* routine(void* p){return NULL;}
7456
7457int main(){
7458 pthread_t p;
7459 if(pthread_create(&p,NULL,routine,NULL)!=0)
7460 return 1;
7461 (void)pthread_detach(p);
7462 return 0;
7463}
7464
7465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007466if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467
7468 ac_cv_pthread_is_default=yes
7469 ac_cv_kthread=no
7470 ac_cv_pthread=no
7471
7472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477fi
7478
7479
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480fi
7481
Matthias Kloseb9621712010-04-24 17:59:49 +00007482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7483$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484
7485
7486if test $ac_cv_pthread_is_default = yes
7487then
7488 ac_cv_kpthread=no
7489else
7490# -Kpthread, if available, provides the right #defines
7491# and linker options to make pthread_create available
7492# Some compilers won't report that they do not support -Kpthread,
7493# so we need to run a program to see whether it really made the
7494# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7496$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007497if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499else
7500 ac_save_cc="$CC"
7501CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007502if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503 ac_cv_kpthread=no
7504else
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506/* end confdefs.h. */
7507
Stefan Krah7dba5942012-11-22 22:49:11 +01007508#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509#include <pthread.h>
7510
7511void* routine(void* p){return NULL;}
7512
7513int main(){
7514 pthread_t p;
7515 if(pthread_create(&p,NULL,routine,NULL)!=0)
7516 return 1;
7517 (void)pthread_detach(p);
7518 return 0;
7519}
7520
7521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007522if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523 ac_cv_kpthread=yes
7524else
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7528 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529fi
7530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531CC="$ac_save_cc"
7532fi
7533
Matthias Kloseb9621712010-04-24 17:59:49 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7535$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536fi
7537
7538if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7539then
7540# -Kthread, if available, provides the right #defines
7541# and linker options to make pthread_create available
7542# Some compilers won't report that they do not support -Kthread,
7543# so we need to run a program to see whether it really made the
7544# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7546$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007547if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007548 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549else
7550 ac_save_cc="$CC"
7551CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007552if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553 ac_cv_kthread=no
7554else
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556/* end confdefs.h. */
7557
Stefan Krah7dba5942012-11-22 22:49:11 +01007558#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559#include <pthread.h>
7560
7561void* routine(void* p){return NULL;}
7562
7563int main(){
7564 pthread_t p;
7565 if(pthread_create(&p,NULL,routine,NULL)!=0)
7566 return 1;
7567 (void)pthread_detach(p);
7568 return 0;
7569}
7570
7571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007572if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573 ac_cv_kthread=yes
7574else
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579fi
7580
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581CC="$ac_save_cc"
7582fi
7583
Matthias Kloseb9621712010-04-24 17:59:49 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7585$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586fi
7587
7588if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7589then
7590# -pthread, if available, provides the right #defines
7591# and linker options to make pthread_create available
7592# Some compilers won't report that they do not support -pthread,
7593# so we need to run a program to see whether it really made the
7594# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7596$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007597if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599else
7600 ac_save_cc="$CC"
7601CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007602if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603 ac_cv_pthread=no
7604else
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606/* end confdefs.h. */
7607
Stefan Krah7dba5942012-11-22 22:49:11 +01007608#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609#include <pthread.h>
7610
7611void* routine(void* p){return NULL;}
7612
7613int main(){
7614 pthread_t p;
7615 if(pthread_create(&p,NULL,routine,NULL)!=0)
7616 return 1;
7617 (void)pthread_detach(p);
7618 return 0;
7619}
7620
7621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007622if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623 ac_cv_pthread=yes
7624else
Matthias Kloseb9621712010-04-24 17:59:49 +00007625 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629fi
7630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631CC="$ac_save_cc"
7632fi
7633
Matthias Kloseb9621712010-04-24 17:59:49 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7635$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
7637
7638# If we have set a CC compiler flag for thread support then
7639# check if it works for CXX, too.
7640ac_cv_cxx_thread=no
7641if test ! -z "$CXX"
7642then
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7644$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645ac_save_cxx="$CXX"
7646
7647if test "$ac_cv_kpthread" = "yes"
7648then
7649 CXX="$CXX -Kpthread"
7650 ac_cv_cxx_thread=yes
7651elif test "$ac_cv_kthread" = "yes"
7652then
7653 CXX="$CXX -Kthread"
7654 ac_cv_cxx_thread=yes
7655elif test "$ac_cv_pthread" = "yes"
7656then
7657 CXX="$CXX -pthread"
7658 ac_cv_cxx_thread=yes
7659fi
7660
7661if test $ac_cv_cxx_thread = yes
7662then
7663 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7664 $CXX -c conftest.$ac_ext 2>&5
7665 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7666 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7667 then
7668 ac_cv_cxx_thread=yes
7669 else
7670 ac_cv_cxx_thread=no
7671 fi
7672 rm -fr conftest*
7673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7675$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676fi
7677CXX="$ac_save_cxx"
7678
7679
7680# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7682$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007683if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685else
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687/* end confdefs.h. */
7688#include <stdlib.h>
7689#include <stdarg.h>
7690#include <string.h>
7691#include <float.h>
7692
7693int
7694main ()
7695{
7696
7697 ;
7698 return 0;
7699}
7700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007701if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702 ac_cv_header_stdc=yes
7703else
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7707
7708if test $ac_cv_header_stdc = yes; then
7709 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711/* end confdefs.h. */
7712#include <string.h>
7713
7714_ACEOF
7715if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007716 $EGREP "memchr" >/dev/null 2>&1; then :
7717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718else
7719 ac_cv_header_stdc=no
7720fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007721rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722
7723fi
7724
7725if test $ac_cv_header_stdc = yes; then
7726 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728/* end confdefs.h. */
7729#include <stdlib.h>
7730
7731_ACEOF
7732if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007733 $EGREP "free" >/dev/null 2>&1; then :
7734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735else
7736 ac_cv_header_stdc=no
7737fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007738rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739
7740fi
7741
7742if test $ac_cv_header_stdc = yes; then
7743 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745 :
7746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748/* end confdefs.h. */
7749#include <ctype.h>
7750#include <stdlib.h>
7751#if ((' ' & 0x0FF) == 0x020)
7752# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7753# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7754#else
7755# define ISLOWER(c) \
7756 (('a' <= (c) && (c) <= 'i') \
7757 || ('j' <= (c) && (c) <= 'r') \
7758 || ('s' <= (c) && (c) <= 'z'))
7759# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7760#endif
7761
7762#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7763int
7764main ()
7765{
7766 int i;
7767 for (i = 0; i < 256; i++)
7768 if (XOR (islower (i), ISLOWER (i))
7769 || toupper (i) != TOUPPER (i))
7770 return 2;
7771 return 0;
7772}
7773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007774if ac_fn_c_try_run "$LINENO"; then :
7775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776else
Matthias Kloseb9621712010-04-24 17:59:49 +00007777 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781fi
7782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783fi
7784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7786$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787if test $ac_cv_header_stdc = yes; then
7788
Matthias Kloseb9621712010-04-24 17:59:49 +00007789$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790
7791fi
7792
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007793for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007794fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007795ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007796sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007797unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007798poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007799sys/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 +01007800sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007801sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007802sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007803sys/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 -07007804libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007805linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007806sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007807do :
7808 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7809ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007810if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007812#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007813_ACEOF
7814
7815fi
7816
Guido van Rossum627b2d71993-12-24 10:39:16 +00007817done
7818
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007819ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007820for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7823$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007824if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007826else
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007828/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007829#include <sys/types.h>
7830#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832int
7833main ()
7834{
7835if ((DIR *) 0)
7836return 0;
7837 ;
7838 return 0;
7839}
7840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007843else
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848eval ac_res=\$$as_ac_Header
7849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7850$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007851if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007852 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007853#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007854_ACEOF
7855
7856ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007857fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859done
7860# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7861if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7863$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007864if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007866else
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871/* Override any GCC internal prototype to avoid an error.
7872 Use char because int might match the return type of a GCC
7873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007874#ifdef __cplusplus
7875extern "C"
7876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007877char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007878int
7879main ()
7880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ;
7883 return 0;
7884}
7885_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886for ac_lib in '' dir; do
7887 if test -z "$ac_lib"; then
7888 ac_res="none required"
7889 else
7890 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007891 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007896rm -f core conftest.err conftest.$ac_objext \
7897 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007898 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901done
Victor Stinnere0be4232011-10-25 13:06:09 +02007902if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007904else
7905 ac_cv_search_opendir=no
7906fi
7907rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007908LIBS=$ac_func_search_save_LIBS
7909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7911$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007913if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007915
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007916fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007917
Michael W. Hudson54241132001-12-07 15:38:26 +00007918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7920$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007921if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007923else
7924 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928/* Override any GCC internal prototype to avoid an error.
7929 Use char because int might match the return type of a GCC
7930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931#ifdef __cplusplus
7932extern "C"
7933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007934char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 ;
7940 return 0;
7941}
7942_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943for ac_lib in '' x; do
7944 if test -z "$ac_lib"; then
7945 ac_res="none required"
7946 else
7947 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953rm -f core conftest.err conftest.$ac_objext \
7954 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007955 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958done
Victor Stinnere0be4232011-10-25 13:06:09 +02007959if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961else
7962 ac_cv_search_opendir=no
7963fi
7964rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007965LIBS=$ac_func_search_save_LIBS
7966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7968$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007970if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973fi
7974
7975fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007976
Matthias Kloseb9621712010-04-24 17:59:49 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7978$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007979if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007980 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007983/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007984#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007985int
7986main ()
7987{
7988return makedev(0, 0);
7989 ;
7990 return 0;
7991}
7992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007993if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007994 ac_cv_header_sys_types_h_makedev=yes
7995else
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998rm -f core conftest.err conftest.$ac_objext \
7999 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008000
8001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8003$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008004
8005if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008006ac_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 +02008007if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008008
Matthias Kloseb9621712010-04-24 17:59:49 +00008009$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008010
8011fi
8012
8013
8014
8015 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 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 +02008017if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008018
Matthias Kloseb9621712010-04-24 17:59:49 +00008019$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008020
8021fi
8022
8023
8024 fi
8025fi
8026
Michael W. Hudson54241132001-12-07 15:38:26 +00008027
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008028# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8029# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8030SAVE_CFLAGS=$CFLAGS
8031CFLAGS="-std=c99 $CFLAGS"
8032for ac_header in bluetooth/bluetooth.h
8033do :
8034 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8035if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8036 cat >>confdefs.h <<_ACEOF
8037#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8038_ACEOF
8039
8040fi
8041
8042done
8043
8044CFLAGS=$SAVE_CFLAGS
8045
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008046# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8047for ac_header in net/if.h
8048do :
8049 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8050#ifdef STDC_HEADERS
8051# include <stdlib.h>
8052# include <stddef.h>
8053#else
8054# ifdef HAVE_STDLIB_H
8055# include <stdlib.h>
8056# endif
8057#endif
8058#ifdef HAVE_SYS_SOCKET_H
8059# include <sys/socket.h>
8060#endif
8061
8062"
Victor Stinnere0be4232011-10-25 13:06:09 +02008063if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008064 cat >>confdefs.h <<_ACEOF
8065#define HAVE_NET_IF_H 1
8066_ACEOF
8067
8068fi
8069
8070done
8071
8072
Martin v. Löwis11017b12006-01-14 18:12:57 +00008073# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008074for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008075do :
8076 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 +00008077#ifdef HAVE_ASM_TYPES_H
8078#include <asm/types.h>
8079#endif
8080#ifdef HAVE_SYS_SOCKET_H
8081#include <sys/socket.h>
8082#endif
8083
Matthias Kloseb9621712010-04-24 17:59:49 +00008084"
Victor Stinnere0be4232011-10-25 13:06:09 +02008085if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008086 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008087#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008088_ACEOF
8089
8090fi
8091
8092done
8093
8094
Charles-François Natali47413c12011-10-06 19:47:44 +02008095# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008096for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008097do :
8098 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8099ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8100#ifdef HAVE_SYS_SOCKET_H
8101#include <sys/socket.h>
8102#endif
8103
8104"
8105if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8106 cat >>confdefs.h <<_ACEOF
8107#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8108_ACEOF
8109
8110fi
8111
8112done
8113
8114
Guido van Rossum627b2d71993-12-24 10:39:16 +00008115# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008116was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8118$as_echo_n "checking for clock_t in time.h... " >&6; }
8119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008120/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008121#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008122
8123_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008126 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008127else
Martin v. Löwis11437992002-04-12 09:54:03 +00008128
8129
Matthias Kloseb9621712010-04-24 17:59:49 +00008130$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008131
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008132
Guido van Rossum627b2d71993-12-24 10:39:16 +00008133fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008134rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008135
Matthias Kloseb9621712010-04-24 17:59:49 +00008136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8137$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008138
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8140$as_echo_n "checking for makedev... " >&6; }
8141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008142/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008143
Jesus Cea740f53a2010-04-28 11:35:30 +00008144#if defined(MAJOR_IN_MKDEV)
8145#include <sys/mkdev.h>
8146#elif defined(MAJOR_IN_SYSMACROS)
8147#include <sys/sysmacros.h>
8148#else
8149#include <sys/types.h>
8150#endif
8151
Neal Norwitz11690112002-07-30 01:08:28 +00008152int
8153main ()
8154{
Jesus Cea740f53a2010-04-28 11:35:30 +00008155
8156 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008157 ;
8158 return 0;
8159}
Matthias Kloseb159a552010-04-25 21:00:44 +00008160
Neal Norwitz11690112002-07-30 01:08:28 +00008161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008162if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008163 ac_cv_has_makedev=yes
8164else
Matthias Kloseb9621712010-04-24 17:59:49 +00008165 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008167rm -f core conftest.err conftest.$ac_objext \
8168 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8170$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008171if test "$ac_cv_has_makedev" = "yes"; then
8172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008174
8175fi
8176
Christian Heimes985ecdc2013-11-20 11:46:18 +01008177# byte swapping
8178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8179$as_echo_n "checking for le64toh... " >&6; }
8180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8181/* end confdefs.h. */
8182
8183#ifdef HAVE_ENDIAN_H
8184#include <endian.h>
8185#elif defined(HAVE_SYS_ENDIAN_H)
8186#include <sys/endian.h>
8187#endif
8188
8189int
8190main ()
8191{
8192
8193 le64toh(1)
8194 ;
8195 return 0;
8196}
8197
8198_ACEOF
8199if ac_fn_c_try_link "$LINENO"; then :
8200 ac_cv_has_le64toh=yes
8201else
8202 ac_cv_has_le64toh=no
8203fi
8204rm -f core conftest.err conftest.$ac_objext \
8205 conftest$ac_exeext conftest.$ac_ext
8206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8207$as_echo "$ac_cv_has_le64toh" >&6; }
8208if test "$ac_cv_has_le64toh" = "yes"; then
8209
8210$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8211
8212fi
8213
Martin v. Löwis399a6892002-10-04 10:22:02 +00008214# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8215# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8216# defined, but the compiler does not support pragma redefine_extname,
8217# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8218# structures (such as rlimit64) without declaring them. As a
8219# work-around, disable LFS on such configurations
8220
8221use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8223$as_echo_n "checking Solaris LFS bug... " >&6; }
8224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008225/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008226
8227#define _LARGEFILE_SOURCE 1
8228#define _FILE_OFFSET_BITS 64
8229#include <sys/resource.h>
8230
Martin v. Löwis399a6892002-10-04 10:22:02 +00008231int
8232main ()
8233{
8234struct rlimit foo;
8235 ;
8236 return 0;
8237}
8238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008239if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008240 sol_lfs_bug=no
8241else
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8246$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008247if test "$sol_lfs_bug" = "yes"; then
8248 use_lfs=no
8249fi
8250
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008251# Don't use largefile support for GNU/Hurd
8252case $ac_sys_system in GNU*)
8253 use_lfs=no
8254esac
8255
Martin v. Löwis399a6892002-10-04 10:22:02 +00008256if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008257# Two defines needed to enable largefile support on various platforms
8258# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008259case $ac_sys_system/$ac_sys_release in
8260AIX*)
8261
8262$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8263
8264 ;;
8265esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008266
Matthias Kloseb9621712010-04-24 17:59:49 +00008267$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
8269
Matthias Kloseb9621712010-04-24 17:59:49 +00008270$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008271
Martin v. Löwis399a6892002-10-04 10:22:02 +00008272fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008273
Guido van Rossum84e7b241996-08-19 21:59:00 +00008274# Add some code to confdefs.h so that the test for off_t works on SCO
8275cat >> confdefs.h <<\EOF
8276#if defined(SCO_DS)
8277#undef _OFF_T
8278#endif
8279EOF
8280
Guido van Rossumef2255b2000-03-10 22:30:29 +00008281# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008282ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008283if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008284
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008285else
Martin v. Löwis11437992002-04-12 09:54:03 +00008286
8287cat >>confdefs.h <<_ACEOF
8288#define mode_t int
8289_ACEOF
8290
8291fi
8292
Matthias Kloseb9621712010-04-24 17:59:49 +00008293ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008294if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008295
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008296else
Martin v. Löwis11437992002-04-12 09:54:03 +00008297
8298cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008300_ACEOF
8301
8302fi
8303
Matthias Kloseb9621712010-04-24 17:59:49 +00008304ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008305if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008306
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008307else
Martin v. Löwis11437992002-04-12 09:54:03 +00008308
8309cat >>confdefs.h <<_ACEOF
8310#define pid_t int
8311_ACEOF
8312
8313fi
8314
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008315
Martin v. Löwis11437992002-04-12 09:54:03 +00008316cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008317#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008318_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008321if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008322
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008323else
Martin v. Löwis11437992002-04-12 09:54:03 +00008324
8325cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008326#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008327_ACEOF
8328
8329fi
8330
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8332$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008333if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008335else
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008337/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008338#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008339
8340_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008343 ac_cv_type_uid_t=yes
8344else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008345 ac_cv_type_uid_t=no
8346fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008347rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008348
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8351$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008352if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008353
Matthias Kloseb9621712010-04-24 17:59:49 +00008354$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
8356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008358
8359fi
8360
Mark Dickinson983bc162012-12-02 12:11:38 +00008361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008363if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364
Matthias Kloseb9621712010-04-24 17:59:49 +00008365$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008366
8367fi
8368
Stefan Krah1919b7e2012-03-21 18:25:23 +01008369ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8370if test "x$ac_cv_type___uint128_t" = xyes; then :
8371
8372$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8373
8374fi
8375
Jack Jansendd19cf82001-12-06 22:36:17 +00008376
Michael W. Hudson54241132001-12-07 15:38:26 +00008377# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008378# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379# The cast to long int works around a bug in the HP C Compiler
8380# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8381# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8382# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8384$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008385if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008387else
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 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 +00008389
Martin v. Löwis11437992002-04-12 09:54:03 +00008390else
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 if test "$ac_cv_type_int" = yes; then
8392 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8393$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008394as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008395See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396 else
8397 ac_cv_sizeof_int=0
8398 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008400
Martin v. Löwis11437992002-04-12 09:54:03 +00008401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8403$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404
8405
8406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008408#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008409_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008410
8411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412# The cast to long int works around a bug in the HP C Compiler
8413# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8414# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8415# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8417$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008418if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008420else
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 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 +00008422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423else
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 if test "$ac_cv_type_long" = yes; then
8425 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008427as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008428See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429 else
8430 ac_cv_sizeof_long=0
8431 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008433
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8436$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437
8438
8439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008441#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008442_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008443
8444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445# The cast to long int works around a bug in the HP C Compiler
8446# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8447# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8448# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8450$as_echo_n "checking size of long long... " >&6; }
8451if ${ac_cv_sizeof_long_long+:} false; then :
8452 $as_echo_n "(cached) " >&6
8453else
8454 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8455
8456else
8457 if test "$ac_cv_type_long_long" = yes; then
8458 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8459$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8460as_fn_error 77 "cannot compute sizeof (long long)
8461See \`config.log' for more details" "$LINENO" 5; }
8462 else
8463 ac_cv_sizeof_long_long=0
8464 fi
8465fi
8466
8467fi
8468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8469$as_echo "$ac_cv_sizeof_long_long" >&6; }
8470
8471
8472
8473cat >>confdefs.h <<_ACEOF
8474#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8475_ACEOF
8476
8477
8478# The cast to long int works around a bug in the HP C Compiler
8479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8481# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8483$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008484if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 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 +00008488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489else
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 if test "$ac_cv_type_void_p" = yes; then
8491 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008493as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008494See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495 else
8496 ac_cv_sizeof_void_p=0
8497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8502$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503
8504
8505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008507#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008508_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008509
8510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511# The cast to long int works around a bug in the HP C Compiler
8512# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8513# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8514# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8516$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008517if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008519else
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 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 +00008521
Martin v. Löwis11437992002-04-12 09:54:03 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 if test "$ac_cv_type_short" = yes; then
8524 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008526as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008527See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528 else
8529 ac_cv_sizeof_short=0
8530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532
Martin v. Löwis11437992002-04-12 09:54:03 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8535$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536
8537
8538
Martin v. Löwis11437992002-04-12 09:54:03 +00008539cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008540#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008541_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008542
8543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544# The cast to long int works around a bug in the HP C Compiler
8545# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8546# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8547# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8549$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008550if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 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 +00008554
Martin v. Löwis11437992002-04-12 09:54:03 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 if test "$ac_cv_type_float" = yes; then
8557 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8558$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008559as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008560See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561 else
8562 ac_cv_sizeof_float=0
8563 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8568$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569
8570
8571
Martin v. Löwis11437992002-04-12 09:54:03 +00008572cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008573#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008574_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575
8576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577# The cast to long int works around a bug in the HP C Compiler
8578# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8579# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8580# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8582$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008583if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 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 +00008587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 if test "$ac_cv_type_double" = yes; then
8590 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008592as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008593See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594 else
8595 ac_cv_sizeof_double=0
8596 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8601$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602
8603
8604
Martin v. Löwis11437992002-04-12 09:54:03 +00008605cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008606#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008607_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008608
8609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610# The cast to long int works around a bug in the HP C Compiler
8611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8613# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8615$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008616if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008618else
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 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 +00008620
Martin v. Löwis11437992002-04-12 09:54:03 +00008621else
Matthias Kloseb9621712010-04-24 17:59:49 +00008622 if test "$ac_cv_type_fpos_t" = yes; then
8623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008625as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008626See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 else
8628 ac_cv_sizeof_fpos_t=0
8629 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631
Martin v. Löwis11437992002-04-12 09:54:03 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8634$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635
8636
8637
Martin v. Löwis11437992002-04-12 09:54:03 +00008638cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008639#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008640_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008641
Michael W. Hudson54241132001-12-07 15:38:26 +00008642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643# The cast to long int works around a bug in the HP C Compiler
8644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8646# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8648$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008649if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 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 +00008653
Martin v. Löwis18e16552006-02-15 17:27:45 +00008654else
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 if test "$ac_cv_type_size_t" = yes; then
8656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008658as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008659See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660 else
8661 ac_cv_sizeof_size_t=0
8662 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664
Martin v. Löwis18e16552006-02-15 17:27:45 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8667$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668
8669
8670
Martin v. Löwis18e16552006-02-15 17:27:45 +00008671cat >>confdefs.h <<_ACEOF
8672#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8673_ACEOF
8674
8675
Christian Heimes400adb02008-02-01 08:12:03 +00008676# The cast to long int works around a bug in the HP C Compiler
8677# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8678# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8679# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8681$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008682if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 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 +00008686
Christian Heimes400adb02008-02-01 08:12:03 +00008687else
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 if test "$ac_cv_type_pid_t" = yes; then
8689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008691as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008692See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008693 else
8694 ac_cv_sizeof_pid_t=0
8695 fi
8696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697
Christian Heimes400adb02008-02-01 08:12:03 +00008698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8700$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008701
8702
8703
8704cat >>confdefs.h <<_ACEOF
8705#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8706_ACEOF
8707
8708
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008709# The cast to long int works around a bug in the HP C Compiler
8710# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8711# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8712# This bug is HP SR number 8606223364.
8713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8714$as_echo_n "checking size of uintptr_t... " >&6; }
8715if ${ac_cv_sizeof_uintptr_t+:} false; then :
8716 $as_echo_n "(cached) " >&6
8717else
8718 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8719
8720else
8721 if test "$ac_cv_type_uintptr_t" = yes; then
8722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8724as_fn_error 77 "cannot compute sizeof (uintptr_t)
8725See \`config.log' for more details" "$LINENO" 5; }
8726 else
8727 ac_cv_sizeof_uintptr_t=0
8728 fi
8729fi
8730
8731fi
8732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8733$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8734
8735
8736
8737cat >>confdefs.h <<_ACEOF
8738#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8739_ACEOF
8740
8741
Michael W. Hudson54241132001-12-07 15:38:26 +00008742
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8744$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008745have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008747/* end confdefs.h. */
8748
8749int
8750main ()
8751{
8752long double x; x = (long double)0;
8753 ;
8754 return 0;
8755}
8756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008757if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008758
8759
Matthias Kloseb9621712010-04-24 17:59:49 +00008760$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008761
8762 have_long_double=yes
8763
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008764fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8767$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008768if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008769# The cast to long int works around a bug in the HP C Compiler
8770# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8771# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8772# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8774$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008775if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008777else
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 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 +00008779
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 if test "$ac_cv_type_long_double" = yes; then
8782 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008784as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008785See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008786 else
8787 ac_cv_sizeof_long_double=0
8788 fi
8789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8793$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008794
8795
8796
8797cat >>confdefs.h <<_ACEOF
8798#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8799_ACEOF
8800
8801
8802fi
8803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008804# The cast to long int works around a bug in the HP C Compiler
8805# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8806# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8807# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8809$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008810if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008812else
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 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 +00008814
Thomas Woutersb2137042007-02-01 18:02:27 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 if test "$ac_cv_type__Bool" = yes; then
8817 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008819as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008820See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821 else
8822 ac_cv_sizeof__Bool=0
8823 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008825
Thomas Woutersb2137042007-02-01 18:02:27 +00008826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8828$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829
8830
8831
Thomas Woutersb2137042007-02-01 18:02:27 +00008832cat >>confdefs.h <<_ACEOF
8833#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8834_ACEOF
8835
8836
Thomas Woutersb2137042007-02-01 18:02:27 +00008837
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008838# The cast to long int works around a bug in the HP C Compiler
8839# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8840# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8841# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8843$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008844if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848#ifdef HAVE_SYS_TYPES_H
8849#include <sys/types.h>
8850#endif
8851
Matthias Kloseb9621712010-04-24 17:59:49 +00008852"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008853
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854else
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 if test "$ac_cv_type_off_t" = yes; then
8856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008858as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008859See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008860 else
8861 ac_cv_sizeof_off_t=0
8862 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008864
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8867$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008868
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008869
8870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008872#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008873_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008874
Michael W. Hudson54241132001-12-07 15:38:26 +00008875
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008876
Matthias Kloseb9621712010-04-24 17:59:49 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8878$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008879if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008880 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008881
Matthias Kloseb9621712010-04-24 17:59:49 +00008882$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008883
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8885$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008886else
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8888$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008889fi
8890
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008891# The cast to long int works around a bug in the HP C Compiler
8892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8894# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8896$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008897if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008899else
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901#ifdef HAVE_SYS_TYPES_H
8902#include <sys/types.h>
8903#endif
8904#ifdef HAVE_TIME_H
8905#include <time.h>
8906#endif
8907
Matthias Kloseb9621712010-04-24 17:59:49 +00008908"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 if test "$ac_cv_type_time_t" = yes; then
8912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008914as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008915See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008916 else
8917 ac_cv_sizeof_time_t=0
8918 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8923$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008924
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008925
8926
Martin v. Löwis11437992002-04-12 09:54:03 +00008927cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008928#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008929_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008930
Michael W. Hudson54241132001-12-07 15:38:26 +00008931
8932
Trent Mick635f6fb2000-08-23 21:33:05 +00008933# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008934ac_save_cc="$CC"
8935if test "$ac_cv_kpthread" = "yes"
8936then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008937elif test "$ac_cv_kthread" = "yes"
8938then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008939elif test "$ac_cv_pthread" = "yes"
8940then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008941fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8944$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008945have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008947/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008948
8949 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008950int
8951main ()
8952{
Guido van Rossum12580492000-09-24 16:47:19 +00008953pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008954 ;
8955 return 0;
8956}
Matthias Kloseb159a552010-04-25 21:00:44 +00008957
Martin v. Löwis11437992002-04-12 09:54:03 +00008958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008959if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008960 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8964$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008965if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008967# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8968# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8969# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8971$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008972if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976#ifdef HAVE_PTHREAD_H
8977#include <pthread.h>
8978#endif
8979
Matthias Kloseb9621712010-04-24 17:59:49 +00008980"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008982else
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 if test "$ac_cv_type_pthread_t" = yes; then
8984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008986as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008987See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008988 else
8989 ac_cv_sizeof_pthread_t=0
8990 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008992
Trent Mick635f6fb2000-08-23 21:33:05 +00008993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8995$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008997
8998
Martin v. Löwis11437992002-04-12 09:54:03 +00008999cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009000#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009001_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003
Trent Mick635f6fb2000-08-23 21:33:05 +00009004fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009005CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009006
Michael W. Hudson54241132001-12-07 15:38:26 +00009007
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009008case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009009 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009010 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9011 ;;
9012 Darwin/*)
9013 OTHER_LIBTOOL_OPT=""
9014 ;;
9015esac
9016
9017
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009019case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009020 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009021 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9022 if test "${enable_universalsdk}"; then
9023 :
9024 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009025 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009026 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009027 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009028 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009029 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009030 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009031 if test ${gcc_version} '<' 4.0
9032 then
9033 LIBTOOL_CRUFT="-lcc_dynamic"
9034 else
9035 LIBTOOL_CRUFT=""
9036 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009038 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009039else
Matthias Kloseb9621712010-04-24 17:59:49 +00009040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009041/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009042
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043 #include <unistd.h>
9044 int main(int argc, char*argv[])
9045 {
9046 if (sizeof(long) == 4) {
9047 return 0;
9048 } else {
9049 return 1;
9050 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009051 }
9052
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009054if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009055 ac_osx_32bit=yes
9056else
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009061fi
9062
9063
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009064 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009065 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009066 i386)
9067 MACOSX_DEFAULT_ARCH="i386"
9068 ;;
9069 ppc)
9070 MACOSX_DEFAULT_ARCH="ppc"
9071 ;;
9072 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009073 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009074 ;;
9075 esac
9076 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009077 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009078 i386)
9079 MACOSX_DEFAULT_ARCH="x86_64"
9080 ;;
9081 ppc)
9082 MACOSX_DEFAULT_ARCH="ppc64"
9083 ;;
9084 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009085 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009086 ;;
9087 esac
9088
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009089 fi
9090
9091 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009092 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009093 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009094esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9096$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009097if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009098then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009099 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009101 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009102
Matthias Kloseb9621712010-04-24 17:59:49 +00009103$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9106$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009107 if test $enable_shared = "yes"
9108 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009109 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 +00009110 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009111else
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9113$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009114fi
9115
Matthias Kloseb9621712010-04-24 17:59:49 +00009116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9117$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009118case $ac_sys_system/$ac_sys_release in
9119 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009120
Matthias Kloseb9621712010-04-24 17:59:49 +00009121$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9124$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009125 ;;
9126 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9128$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009129 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009130esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009131
Guido van Rossum0a516c91994-09-12 10:58:40 +00009132# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009133
Michael W. Hudson54241132001-12-07 15:38:26 +00009134
9135
9136
9137
Benjamin Peterson99f03762010-04-11 22:15:28 +00009138
Thomas Wouters477c8d52006-05-27 19:21:47 +00009139
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009140# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9141# -- usually .so, .sl on HP-UX, .dll on Cygwin
9142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9143$as_echo_n "checking the extension of shared libraries... " >&6; }
9144if test -z "$SHLIB_SUFFIX"; then
9145 case $ac_sys_system in
9146 hp*|HP*)
9147 case `uname -m` in
9148 ia64) SHLIB_SUFFIX=.so;;
9149 *) SHLIB_SUFFIX=.sl;;
9150 esac
9151 ;;
9152 CYGWIN*) SHLIB_SUFFIX=.dll;;
9153 *) SHLIB_SUFFIX=.so;;
9154 esac
9155fi
9156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9157$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009158
Guido van Rossum0a516c91994-09-12 10:58:40 +00009159# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009160# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009161# (Shared libraries in this instance are shared modules to be loaded into
9162# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9164$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009165if test -z "$LDSHARED"
9166then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009167 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009168 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009169 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009170 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009171 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009172 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009173 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009174 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009175 if test "$GCC" = "yes" ; then
9176 LDSHARED='$(CC) -shared'
9177 LDCXXSHARED='$(CXX) -shared'
9178 else
9179 LDSHARED='$(CC) -G'
9180 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009181 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009182 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009183 if test "$GCC" = "yes" ; then
9184 LDSHARED='$(CC) -shared'
9185 LDCXXSHARED='$(CXX) -shared'
9186 else
9187 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009188 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009189 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009190 LDSHARED='$(CC) -bundle'
9191 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009192 if test "$enable_framework" ; then
9193 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009194 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9195 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009196 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009197 else
9198 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009199 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009200 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009201 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009202 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009203 LDSHARED='$(CC) -bundle'
9204 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009205 if test "$enable_framework" ; then
9206 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009207 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9208 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009209 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009210 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009211 # No framework, use the Python app as bundle-loader
9212 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009213 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009214 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009215 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009216 Darwin/*)
9217 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9218 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009219
Ned Deily36820b62014-06-25 13:44:22 -07009220 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9221 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9222 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9223 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9224 if test ${dep_target_major} -eq 10 && \
9225 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009226 then
Ned Deily36820b62014-06-25 13:44:22 -07009227 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009228 LDSHARED='$(CC) -bundle'
9229 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009230 if test "$enable_framework" ; then
9231 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009232 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9233 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009234 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009235 else
9236 # No framework, use the Python app as bundle-loader
9237 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9238 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009239 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009240 fi
Ned Deily36820b62014-06-25 13:44:22 -07009241 else
9242 # building for OS X 10.3 and later
9243 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9244 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9245 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009246 fi
9247 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009248 Linux*|GNU*|QNX*)
9249 LDSHARED='$(CC) -shared'
9250 LDCXXSHARED='$(CXX) -shared';;
9251 BSD/OS*/4*)
9252 LDSHARED="gcc -shared"
9253 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009254 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009255 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009256 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009257 LDSHARED='$(CC) -shared'
9258 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009259 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009260 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009261 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009262 OpenBSD*)
9263 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9264 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009265 LDSHARED='$(CC) -shared $(CCSHARED)'
9266 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009267 else
9268 case `uname -r` in
9269 [01].* | 2.[0-7] | 2.[0-7].*)
9270 LDSHARED="ld -Bshareable ${LDFLAGS}"
9271 ;;
9272 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009273 LDSHARED='$(CC) -shared $(CCSHARED)'
9274 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009275 ;;
9276 esac
9277 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009278 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009279 LDSHARED='$(CC) -shared'
9280 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009281 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009282 if test "$GCC" = "yes" ; then
9283 LDSHARED='$(CC) -shared'
9284 LDCXXSHARED='$(CXX) -shared'
9285 else
9286 LDSHARED='$(CC) -G'
9287 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009288 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009289 SCO_SV*)
9290 LDSHARED='$(CC) -Wl,-G,-Bexport'
9291 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9292 CYGWIN*)
9293 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9294 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009295 *) LDSHARED="ld";;
9296 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9299$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009300LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009301BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009302# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009303# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9305$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306if test -z "$CCSHARED"
9307then
Guido van Rossum07397971997-04-29 21:49:50 +00009308 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009309 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009310 then CCSHARED="-fPIC";
9311 elif test `uname -p` = sparc;
9312 then CCSHARED="-xcode=pic32";
9313 else CCSHARED="-Kpic";
9314 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009315 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009316 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009317 else CCSHARED="+z";
9318 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009319 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009320 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009321 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009322 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009323 if test "$GCC" = "yes"
9324 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009325 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009326 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009327 SCO_SV*)
9328 if test "$GCC" = "yes"
9329 then CCSHARED="-fPIC"
9330 else CCSHARED="-Kpic -belf"
9331 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009332 IRIX*/6*) case $CC in
9333 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009334 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009335 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9339$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009340# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009341# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9343$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009344if test -z "$LINKFORSHARED"
9345then
Guido van Rossum07397971997-04-29 21:49:50 +00009346 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009347 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009348 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009349 LINKFORSHARED="-Wl,-E -Wl,+s";;
9350# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009351 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009352 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009353 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009355 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009356
9357 # Issue #18075: the default maximum stack size (8MBytes) is too
9358 # small for the default recursion limit. Increase the stack size
9359 # to ensure that tests don't crash
9360 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9361
Jack Jansene578a632001-08-15 01:27:14 +00009362 if test "$enable_framework"
9363 then
Jack Jansenda49e192005-01-07 13:08:22 +00009364 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009365 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009366 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009367 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009368 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009369 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009370 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009371 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9372 then
9373 LINKFORSHARED="-Wl,--export-dynamic"
9374 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009375 SunOS/5*) case $CC in
9376 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009377 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009378 then
9379 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009380 fi;;
9381 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009382 CYGWIN*)
9383 if test $enable_shared = "no"
9384 then
9385 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9386 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009387 QNX*)
9388 # -Wl,-E causes the symbols to be added to the dynamic
9389 # symbol table so that they can be found when a module
9390 # is loaded. -N 2048K causes the stack size to be set
9391 # to 2048 kilobytes so that the stack doesn't overflow
9392 # when running test_compile.py.
9393 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009394 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9397$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009398
Michael W. Hudson54241132001-12-07 15:38:26 +00009399
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009400
Matthias Kloseb9621712010-04-24 17:59:49 +00009401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9402$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009403if test ! "$LIBRARY" = "$LDLIBRARY"
9404then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009405 case $ac_sys_system in
9406 CYGWIN*)
9407 # Cygwin needs CCSHARED when building extension DLLs
9408 # but not when building the interpreter DLL.
9409 CFLAGSFORSHARED='';;
9410 *)
9411 CFLAGSFORSHARED='$(CCSHARED)'
9412 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9415$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009416
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009417# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9418# library (with --enable-shared).
9419# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009420# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9421# if it is not required, since it creates a dependency of the shared library
9422# to LIBS. This, in turn, means that applications linking the shared libpython
9423# don't need to link LIBS explicitly. The default should be only changed
9424# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009425
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9427$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009428case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009429 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009430 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009431esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9433$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009434
9435
Guido van Rossum627b2d71993-12-24 10:39:16 +00009436# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9438$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009439if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009440 $as_echo_n "(cached) " >&6
9441else
9442 ac_check_lib_save_LIBS=$LIBS
9443LIBS="-lsendfile $LIBS"
9444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9445/* end confdefs.h. */
9446
9447/* Override any GCC internal prototype to avoid an error.
9448 Use char because int might match the return type of a GCC
9449 builtin and then its argument prototype would still apply. */
9450#ifdef __cplusplus
9451extern "C"
9452#endif
9453char sendfile ();
9454int
9455main ()
9456{
9457return sendfile ();
9458 ;
9459 return 0;
9460}
9461_ACEOF
9462if ac_fn_c_try_link "$LINENO"; then :
9463 ac_cv_lib_sendfile_sendfile=yes
9464else
9465 ac_cv_lib_sendfile_sendfile=no
9466fi
9467rm -f core conftest.err conftest.$ac_objext \
9468 conftest$ac_exeext conftest.$ac_ext
9469LIBS=$ac_check_lib_save_LIBS
9470fi
9471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9472$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009473if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009474 cat >>confdefs.h <<_ACEOF
9475#define HAVE_LIBSENDFILE 1
9476_ACEOF
9477
9478 LIBS="-lsendfile $LIBS"
9479
9480fi
9481
Matthias Kloseb9621712010-04-24 17:59:49 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9483$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009484if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009485 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009486else
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009488LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492/* Override any GCC internal prototype to avoid an error.
9493 Use char because int might match the return type of a GCC
9494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009495#ifdef __cplusplus
9496extern "C"
9497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009498char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009499int
9500main ()
9501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009502return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 ;
9504 return 0;
9505}
9506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009507if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009509else
Matthias Kloseb9621712010-04-24 17:59:49 +00009510 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009512rm -f core conftest.err conftest.$ac_objext \
9513 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009514LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9517$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009518if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 cat >>confdefs.h <<_ACEOF
9520#define HAVE_LIBDL 1
9521_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009522
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009523 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009525fi
9526 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9528$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009529if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009530 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009531else
Martin v. Löwis11437992002-04-12 09:54:03 +00009532 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009533LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537/* Override any GCC internal prototype to avoid an error.
9538 Use char because int might match the return type of a GCC
9539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009540#ifdef __cplusplus
9541extern "C"
9542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009543char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009544int
9545main ()
9546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ;
9549 return 0;
9550}
9551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009554else
Matthias Kloseb9621712010-04-24 17:59:49 +00009555 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009557rm -f core conftest.err conftest.$ac_objext \
9558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009559LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9562$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009563if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 cat >>confdefs.h <<_ACEOF
9565#define HAVE_LIBDLD 1
9566_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009567
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009568 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009569
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009570fi
9571 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009572
Georg Brandlb1441c72009-01-03 22:33:39 +00009573# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009574if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9576$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009577if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009578 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009579else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009580 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584/* Override any GCC internal prototype to avoid an error.
9585 Use char because int might match the return type of a GCC
9586 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009587#ifdef __cplusplus
9588extern "C"
9589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009590char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009591int
9592main ()
9593{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 ;
9596 return 0;
9597}
9598_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599for ac_lib in '' pthread rt posix4; do
9600 if test -z "$ac_lib"; then
9601 ac_res="none required"
9602 else
9603 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009604 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009606 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009609rm -f core conftest.err conftest.$ac_objext \
9610 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009611 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614done
Victor Stinnere0be4232011-10-25 13:06:09 +02009615if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617else
9618 ac_cv_search_sem_init=no
9619fi
9620rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009621LIBS=$ac_func_search_save_LIBS
9622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9624$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009626if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009628
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009629fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009630 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009631 # posix4 on Solaris 2.6
9632 # pthread (first!) on Linux
9633fi
9634
Martin v. Löwis19d17342003-06-14 21:03:05 +00009635# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9637$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009638if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009639 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009640else
9641 ac_check_lib_save_LIBS=$LIBS
9642LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646/* Override any GCC internal prototype to avoid an error.
9647 Use char because int might match the return type of a GCC
9648 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009649#ifdef __cplusplus
9650extern "C"
9651#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009652char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009653int
9654main ()
9655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009656return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009657 ;
9658 return 0;
9659}
9660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009661if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009662 ac_cv_lib_intl_textdomain=yes
9663else
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009666rm -f core conftest.err conftest.$ac_objext \
9667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009668LIBS=$ac_check_lib_save_LIBS
9669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9671$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009672if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009673
Matthias Kloseb9621712010-04-24 17:59:49 +00009674$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009675
Brett Cannonc6d936e2009-06-07 20:09:53 +00009676 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009677fi
9678
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009679
9680# checks for system dependent C++ extensions support
9681case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9683$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009685/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009686
Georg Brandl59e87bd2011-02-15 19:48:59 +00009687 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009688int
9689main ()
9690{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009691loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ;
9693 return 0;
9694}
Matthias Kloseb159a552010-04-25 21:00:44 +00009695
Martin v. Löwis11437992002-04-12 09:54:03 +00009696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009697if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009698
Matthias Kloseb159a552010-04-25 21:00:44 +00009699
Matthias Kloseb9621712010-04-24 17:59:49 +00009700$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009701
Matthias Kloseb159a552010-04-25 21:00:44 +00009702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009703$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009704
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009705else
Matthias Kloseb159a552010-04-25 21:00:44 +00009706
9707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009708$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009709
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009711rm -f core conftest.err conftest.$ac_objext \
9712 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009713 *) ;;
9714esac
9715
Christian Heimes985ecdc2013-11-20 11:46:18 +01009716# check for systems that require aligned memory access
9717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9718$as_echo_n "checking aligned memory access is required... " >&6; }
9719if test "$cross_compiling" = yes; then :
9720 aligned_required=yes
9721else
9722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9723/* end confdefs.h. */
9724
9725int main()
9726{
9727 char s[16];
9728 int i, *p1, *p2;
9729 for (i=0; i < 16; i++)
9730 s[i] = i;
9731 p1 = (int*)(s+1);
9732 p2 = (int*)(s+2);
9733 if (*p1 == *p2)
9734 return 1;
9735 return 0;
9736}
9737
9738_ACEOF
9739if ac_fn_c_try_run "$LINENO"; then :
9740 aligned_required=no
9741else
9742 aligned_required=yes
9743fi
9744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9745 conftest.$ac_objext conftest.beam conftest.$ac_ext
9746fi
9747
9748
9749if test "$aligned_required" = yes ; then
9750
9751$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9752
9753fi
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9755$as_echo "$aligned_required" >&6; }
9756
9757
9758# str, bytes and memoryview hash algorithm
9759
9760
9761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9762$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9763
9764# Check whether --with-hash_algorithm was given.
9765if test "${with_hash_algorithm+set}" = set; then :
9766 withval=$with_hash_algorithm;
9767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9768$as_echo "$withval" >&6; }
9769case "$withval" in
9770 siphash24)
9771 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9772
9773 ;;
9774 fnv)
9775 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9776
9777 ;;
9778 *)
9779 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9780 ;;
9781esac
9782
9783else
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9785$as_echo "default" >&6; }
9786fi
9787
9788
Charles-François Natalid30b0222014-05-08 23:08:51 +01009789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9790$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9791
9792# Check whether --with-address_sanitizer was given.
9793if test "${with_address_sanitizer+set}" = set; then :
9794 withval=$with_address_sanitizer;
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9796$as_echo "$withval" >&6; }
9797BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9798LDFLAGS="-fsanitize=address $LDFLAGS"
9799
9800else
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803fi
9804
9805
Guido van Rossum70c7f481998-03-26 18:44:10 +00009806# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9808$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009809if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009810 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009811else
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009813LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009817/* Override any GCC internal prototype to avoid an error.
9818 Use char because int might match the return type of a GCC
9819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820#ifdef __cplusplus
9821extern "C"
9822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009823char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009824int
9825main ()
9826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 ;
9829 return 0;
9830}
9831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009834else
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009837rm -f core conftest.err conftest.$ac_objext \
9838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009839LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9842$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009843if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009844 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009845fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009846 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9848$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009849if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009851else
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009853LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857/* Override any GCC internal prototype to avoid an error.
9858 Use char because int might match the return type of a GCC
9859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009860#ifdef __cplusplus
9861extern "C"
9862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009863char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009864int
9865main ()
9866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 ;
9869 return 0;
9870}
9871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009874else
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009877rm -f core conftest.err conftest.$ac_objext \
9878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009879LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9882$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009883if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009884 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009885fi
9886 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009887
Matthias Kloseb9621712010-04-24 17:59:49 +00009888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9889$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009892if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9895$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009896LIBS="$withval $LIBS"
9897
9898else
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9900$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009901fi
9902
Guido van Rossum7f43da71994-08-01 12:15:30 +00009903
Victor Stinner8291b5e2015-03-20 16:03:14 +01009904
9905
9906
9907
9908
9909
9910
9911if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9912 if test -n "$ac_tool_prefix"; then
9913 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9914set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9916$as_echo_n "checking for $ac_word... " >&6; }
9917if ${ac_cv_path_PKG_CONFIG+:} false; then :
9918 $as_echo_n "(cached) " >&6
9919else
9920 case $PKG_CONFIG in
9921 [\\/]* | ?:[\\/]*)
9922 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9923 ;;
9924 *)
9925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9926for as_dir in $PATH
9927do
9928 IFS=$as_save_IFS
9929 test -z "$as_dir" && as_dir=.
9930 for ac_exec_ext in '' $ac_executable_extensions; do
9931 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9932 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9933 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9934 break 2
9935 fi
9936done
9937 done
9938IFS=$as_save_IFS
9939
9940 ;;
9941esac
9942fi
9943PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9944if test -n "$PKG_CONFIG"; then
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9946$as_echo "$PKG_CONFIG" >&6; }
9947else
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949$as_echo "no" >&6; }
9950fi
9951
9952
9953fi
9954if test -z "$ac_cv_path_PKG_CONFIG"; then
9955 ac_pt_PKG_CONFIG=$PKG_CONFIG
9956 # Extract the first word of "pkg-config", so it can be a program name with args.
9957set dummy pkg-config; ac_word=$2
9958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9959$as_echo_n "checking for $ac_word... " >&6; }
9960if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9961 $as_echo_n "(cached) " >&6
9962else
9963 case $ac_pt_PKG_CONFIG in
9964 [\\/]* | ?:[\\/]*)
9965 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9966 ;;
9967 *)
9968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9969for as_dir in $PATH
9970do
9971 IFS=$as_save_IFS
9972 test -z "$as_dir" && as_dir=.
9973 for ac_exec_ext in '' $ac_executable_extensions; do
9974 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9975 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9977 break 2
9978 fi
9979done
9980 done
9981IFS=$as_save_IFS
9982
9983 ;;
9984esac
9985fi
9986ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9987if test -n "$ac_pt_PKG_CONFIG"; then
9988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9989$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9990else
9991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9992$as_echo "no" >&6; }
9993fi
9994
9995 if test "x$ac_pt_PKG_CONFIG" = x; then
9996 PKG_CONFIG=""
9997 else
9998 case $cross_compiling:$ac_tool_warned in
9999yes:)
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10001$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10002ac_tool_warned=yes ;;
10003esac
10004 PKG_CONFIG=$ac_pt_PKG_CONFIG
10005 fi
10006else
10007 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10008fi
10009
10010fi
10011if test -n "$PKG_CONFIG"; then
10012 _pkg_min_version=0.9.0
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10014$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10015 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10017$as_echo "yes" >&6; }
10018 else
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10020$as_echo "no" >&6; }
10021 PKG_CONFIG=""
10022 fi
10023fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010024
10025# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10027$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010028
10029# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010030if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010031 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010032else
10033 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010034fi
10035
10036
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10038$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010039
10040# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10042$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010043
10044# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010045if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010046 withval=$with_system_ffi;
10047fi
10048
10049
Zachary Waref40d4dd2016-09-17 01:25:24 -050010050if test "$ac_sys_system" = "Darwin"
10051then
10052 case "$with_system_ffi" in
10053 "")
10054 with_system_ffi="no"
10055 ;;
10056 yes|no)
10057 ;;
10058 *)
10059 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10060 ;;
10061 esac
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10063$as_echo "$with_system_ffi" >&6; }
10064else
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10066$as_echo "yes" >&6; }
10067 if test "$with_system_ffi" != ""
10068 then
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10070$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10071 fi
10072 with_system_ffi="yes"
10073fi
Zachary Ware935043d2016-09-09 17:01:21 -070010074
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010075if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010076 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10077else
10078 LIBFFI_INCLUDEDIR=""
10079fi
10080
10081
Stefan Krah60187b52012-03-23 19:06:27 +010010082# Check for use of the system libmpdec library
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10084$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10085
10086# Check whether --with-system_libmpdec was given.
10087if test "${with_system_libmpdec+set}" = set; then :
10088 withval=$with_system_libmpdec;
10089else
10090 with_system_libmpdec="no"
10091fi
10092
10093
10094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10095$as_echo "$with_system_libmpdec" >&6; }
10096
Benjamin Peterson076ed002010-10-31 17:11:02 +000010097# Check for support for loadable sqlite extensions
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10099$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10100# Check whether --enable-loadable-sqlite-extensions was given.
10101if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10102 enableval=$enable_loadable_sqlite_extensions;
10103else
10104 enable_loadable_sqlite_extensions="no"
10105fi
10106
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10109$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10110
Ned Deilyd819b932013-09-06 01:07:05 -070010111# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10112
10113
10114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10115$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10116
10117# Check whether --with-tcltk-includes was given.
10118if test "${with_tcltk_includes+set}" = set; then :
10119 withval=$with_tcltk_includes;
10120else
10121 with_tcltk_includes="default"
10122fi
10123
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10125$as_echo "$with_tcltk_includes" >&6; }
10126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10127$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10128
10129# Check whether --with-tcltk-libs was given.
10130if test "${with_tcltk_libs+set}" = set; then :
10131 withval=$with_tcltk_libs;
10132else
10133 with_tcltk_libs="default"
10134fi
10135
10136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10137$as_echo "$with_tcltk_libs" >&6; }
10138if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10139then
10140 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10141 then
10142 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10143 fi
10144 TCLTK_INCLUDES=""
10145 TCLTK_LIBS=""
10146else
10147 TCLTK_INCLUDES="$with_tcltk_includes"
10148 TCLTK_LIBS="$with_tcltk_libs"
10149fi
10150
Matthias Klose55708cc2009-04-30 08:06:49 +000010151# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10153$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010154
10155# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010156if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010157 withval=$with_dbmliborder;
10158if test x$with_dbmliborder = xyes
10159then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010160as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010161else
10162 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10163 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10164 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010165 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010166 fi
10167 done
10168fi
10169fi
10170
Matthias Kloseb9621712010-04-24 17:59:49 +000010171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10172$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010173
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010174# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010175
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010176USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178
Martin v. Löwis11437992002-04-12 09:54:03 +000010179
10180# Templates for things AC_DEFINEd more than once.
10181# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010182
10183
Martin v. Löwis11437992002-04-12 09:54:03 +000010184
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10186$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010189if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190 withval=$with_threads;
10191fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010192
10193
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010194# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010196# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010197if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198 withval=$with_thread; with_threads=$with_thread
10199fi
10200
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010201
10202if test -z "$with_threads"
10203then with_threads="yes"
10204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10206$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010207
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010208
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010209if test "$with_threads" = "no"
10210then
10211 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010212elif test "$ac_cv_pthread_is_default" = yes
10213then
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010215
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010216 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010218
10219 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010220 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010221elif test "$ac_cv_kpthread" = "yes"
10222then
10223 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010224 if test "$ac_cv_cxx_thread" = "yes"; then
10225 CXX="$CXX -Kpthread"
10226 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010228
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010229 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010230 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010231elif test "$ac_cv_kthread" = "yes"
10232then
10233 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010234 if test "$ac_cv_cxx_thread" = "yes"; then
10235 CXX="$CXX -Kthread"
10236 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010238
10239 posix_threads=yes
10240 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010241elif test "$ac_cv_pthread" = "yes"
10242then
10243 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010244 if test "$ac_cv_cxx_thread" = "yes"; then
10245 CXX="$CXX -pthread"
10246 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010248
10249 posix_threads=yes
10250 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010251else
10252 if test ! -z "$with_threads" -a -d "$with_threads"
10253 then LDFLAGS="$LDFLAGS -L$with_threads"
10254 fi
10255 if test ! -z "$withval" -a -d "$withval"
10256 then LDFLAGS="$LDFLAGS -L$withval"
10257 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010258
10259 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010260 # define _POSIX_THREADS in unistd.h. Some apparently don't
10261 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10263$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010265/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010266
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010267#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010268#ifdef _POSIX_THREADS
10269yes
10270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010271
10272_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010275 unistd_defines_pthreads=yes
10276else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010277 unistd_defines_pthreads=no
10278fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010279rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010280
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10282$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010283
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010285
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010286 # Just looking for pthread_create in libpthread is not enough:
10287 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10288 # So we really have to include pthread.h, and then link.
10289 _libs=$LIBS
10290 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10292$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010294/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010295
10296#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010297#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010298
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010299void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010300int
10301main ()
10302{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010303
10304pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ;
10306 return 0;
10307}
10308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010309if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010310
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10312$as_echo "yes" >&6; }
10313 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010314
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010315 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010316 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010317else
Martin v. Löwis11437992002-04-12 09:54:03 +000010318
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010319 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010321if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010323
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010324 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010325 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010326else
Guido van Rossumad678af1998-10-02 14:42:15 +000010327
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10329$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010330if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010332else
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010334LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338/* Override any GCC internal prototype to avoid an error.
10339 Use char because int might match the return type of a GCC
10340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010341#ifdef __cplusplus
10342extern "C"
10343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010344char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010345int
10346main ()
10347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ;
10350 return 0;
10351}
10352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010355else
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358rm -f core conftest.err conftest.$ac_objext \
10359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010360LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10363$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010364if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010367 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010368 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010369 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010370else
Greg Steinadf63d62000-07-05 10:38:09 +000010371
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10373$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010374if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010376else
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010378LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382/* Override any GCC internal prototype to avoid an error.
10383 Use char because int might match the return type of a GCC
10384 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010385#ifdef __cplusplus
10386extern "C"
10387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010388char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010389int
10390main ()
10391{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010392return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 ;
10394 return 0;
10395}
10396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010397if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010399else
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010402rm -f core conftest.err conftest.$ac_objext \
10403 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010404LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10407$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010408if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010410
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010411 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010412 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010413 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010414else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10417$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010418if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010420else
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010422LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426/* Override any GCC internal prototype to avoid an error.
10427 Use char because int might match the return type of a GCC
10428 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010429#ifdef __cplusplus
10430extern "C"
10431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010432char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010433int
10434main ()
10435{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010436return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ;
10438 return 0;
10439}
10440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010441if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010443else
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010446rm -f core conftest.err conftest.$ac_objext \
10447 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010448LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10451$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010452if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010454
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010455 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010456 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010457 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010458else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010459
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10461$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010462if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010464else
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010466LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010470/* Override any GCC internal prototype to avoid an error.
10471 Use char because int might match the return type of a GCC
10472 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010473#ifdef __cplusplus
10474extern "C"
10475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010476char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010477int
10478main ()
10479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 ;
10482 return 0;
10483}
10484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010487else
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010490rm -f core conftest.err conftest.$ac_objext \
10491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010492LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10495$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010496if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010498
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010499 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010500 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010501 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010502else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010503
Martin v. Löwis130fb172001-07-19 11:00:41 +000010504 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010505fi
10506
Guido van Rossum627b2d71993-12-24 10:39:16 +000010507
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010508fi
10509
Guido van Rossum0be3e491997-05-22 20:33:33 +000010510fi
10511
Guido van Rossum49545951997-12-02 19:28:29 +000010512fi
10513
Guido van Rossumb93a8621998-05-07 13:27:32 +000010514fi
10515
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010517rm -f core conftest.err conftest.$ac_objext \
10518 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010519
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10521$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010522if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010524else
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010526LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530/* Override any GCC internal prototype to avoid an error.
10531 Use char because int might match the return type of a GCC
10532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010533#ifdef __cplusplus
10534extern "C"
10535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010536char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010537int
10538main ()
10539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010540return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010541 ;
10542 return 0;
10543}
10544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010545if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010547else
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010550rm -f core conftest.err conftest.$ac_objext \
10551 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010552LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10555$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010556if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010558
Martin v. Löwis130fb172001-07-19 11:00:41 +000010559 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010560 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010561 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010562fi
10563
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010564
Neal Norwitza978ab02002-11-02 16:58:05 +000010565 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10567$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010568if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010572LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576/* Override any GCC internal prototype to avoid an error.
10577 Use char because int might match the return type of a GCC
10578 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010579#ifdef __cplusplus
10580extern "C"
10581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010582char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010583int
10584main ()
10585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ;
10588 return 0;
10589}
10590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010591if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010593else
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010596rm -f core conftest.err conftest.$ac_objext \
10597 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010598LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10601$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010602if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010604
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010605 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010606 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010607 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010608fi
10609
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010610 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010612
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010613if test "$posix_threads" = "yes"; then
10614 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010615
Matthias Kloseb9621712010-04-24 17:59:49 +000010616$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010617
10618 fi
10619
10620 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10621 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010622 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010623$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010624
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010625 ;;
10626 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010627$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628
10629 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010630 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010631$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010632
10633 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010634 esac
10635
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10637$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010638 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010640else
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642 ac_cv_pthread_system_supported=no
10643else
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010645/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010646
10647 #include <stdio.h>
10648 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010649 void *foo(void *parm) {
10650 return NULL;
10651 }
10652 main() {
10653 pthread_attr_t attr;
10654 pthread_t id;
10655 if (pthread_attr_init(&attr)) exit(-1);
10656 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10657 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10658 exit(0);
10659 }
10660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010661if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662 ac_cv_pthread_system_supported=yes
10663else
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10667 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010668fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670
Guido van Rossum627b2d71993-12-24 10:39:16 +000010671fi
10672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10674$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675 if test "$ac_cv_pthread_system_supported" = "yes"; then
10676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010678
10679 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 for ac_func in pthread_sigmask
10681do :
10682 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010683if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010685#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010686_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010687 case $ac_sys_system in
10688 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010691
10692 ;;
10693 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010694fi
10695done
10696
Christian Heimesf77b4b22013-08-21 13:26:05 +020010697 for ac_func in pthread_atfork
10698do :
10699 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10700if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10701 cat >>confdefs.h <<_ACEOF
10702#define HAVE_PTHREAD_ATFORK 1
10703_ACEOF
10704
10705fi
10706done
10707
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708fi
10709
10710
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10714$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010716if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10720$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010721 ipv6=no
10722 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10724$as_echo "yes" >&6; }
10725 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726
10727 ipv6=yes
10728 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010730else
Martin v. Löwis11437992002-04-12 09:54:03 +000010731
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010733/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734 /* AF_INET6 available check */
10735#include <sys/types.h>
10736#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010737int
10738main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010740int domain = AF_INET6;
10741 ;
10742 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743}
Martin v. Löwis11437992002-04-12 09:54:03 +000010744_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010745if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010746
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10748$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010749 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010750
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751else
Matthias Kloseb159a552010-04-25 21:00:44 +000010752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10754$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010756
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010759
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010760if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10762$as_echo_n "checking if RFC2553 API is available... " >&6; }
10763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010764/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010765
10766 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010767#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010768int
10769main ()
10770{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010771struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010772 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010773 ;
10774 return 0;
10775}
Matthias Kloseb159a552010-04-25 21:00:44 +000010776
Martin v. Löwis11437992002-04-12 09:54:03 +000010777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010778if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010779
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010781$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010782 ipv6=yes
10783
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010784else
Matthias Kloseb159a552010-04-25 21:00:44 +000010785
10786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010787$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010788 ipv6=no
10789
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010792fi
10793
10794if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010796
10797fi
10798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010799fi
10800
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801
10802ipv6type=unknown
10803ipv6lib=none
10804ipv6trylibc=no
10805
10806if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10808$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010809 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10810 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811 case $i in
10812 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010814/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816#include <netinet/in.h>
10817#ifdef IPV6_INRIA_VERSION
10818yes
10819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010820_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010823 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010824fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010825rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826
10827 ;;
10828 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010830/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010831
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010832#include <netinet/in.h>
10833#ifdef __KAME__
10834yes
10835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010836_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839 ipv6type=$i;
10840 ipv6lib=inet6
10841 ipv6libdir=/usr/local/v6/lib
10842 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010844rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010845
10846 ;;
10847 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851#include <features.h>
10852#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10853yes
10854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010855_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858 ipv6type=$i;
10859 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010861rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010862
10863 ;;
10864 linux-inet6)
10865 if test -d /usr/inet6; then
10866 ipv6type=$i
10867 ipv6lib=inet6
10868 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010869 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870 fi
10871 ;;
10872 solaris)
10873 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010874 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875 ipv6type=$i
10876 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877 fi
10878 fi
10879 ;;
10880 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010882/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010883
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884#include <sys/param.h>
10885#ifdef _TOSHIBA_INET6
10886yes
10887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010888_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891 ipv6type=$i;
10892 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010893 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010895rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896
10897 ;;
10898 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010900/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010901
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902#include </usr/local/v6/include/sys/v6config.h>
10903#ifdef __V6D__
10904yes
10905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010906_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909 ipv6type=$i;
10910 ipv6lib=v6;
10911 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010912 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010914rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915
10916 ;;
10917 zeta)
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 _ZETA_MINAMI_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 esac
10936 if test "$ipv6type" != "unknown"; then
10937 break
10938 fi
10939 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10941$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942fi
10943
10944if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10945 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10946 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10947 echo "using lib$ipv6lib"
10948 else
10949 if test $ipv6trylibc = "yes"; then
10950 echo "using libc"
10951 else
10952 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10953 echo "You need to fetch lib$ipv6lib.a from appropriate"
10954 echo 'ipv6 kit and compile beforehand.'
10955 exit 1
10956 fi
10957 fi
10958fi
10959
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10961$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10963/* end confdefs.h. */
10964 /* CAN_RAW_FD_FRAMES available check */
10965#include <linux/can/raw.h>
10966int
10967main ()
10968{
10969int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10970 ;
10971 return 0;
10972}
10973_ACEOF
10974if ac_fn_c_try_compile "$LINENO"; then :
10975
10976
10977$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10978
10979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10980$as_echo "yes" >&6; }
10981
10982else
10983
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10985$as_echo "no" >&6; }
10986
10987fi
10988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10989
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010990# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10992$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010995if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996 withval=$with_doc_strings;
10997fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010998
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010999
11000if test -z "$with_doc_strings"
11001then with_doc_strings="yes"
11002fi
11003if test "$with_doc_strings" != "no"
11004then
11005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011007
11008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11010$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011011
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011012# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11014$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011017if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018 withval=$with_pymalloc;
11019fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011020
Neil Schemenauera35c6882001-02-27 04:45:05 +000011021
Neil Schemenauer16c22972002-03-22 15:34:49 +000011022if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011023then
11024 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011025fi
11026if test "$with_pymalloc" != "no"
11027then
Martin v. Löwis11437992002-04-12 09:54:03 +000011028
Matthias Kloseb9621712010-04-24 17:59:49 +000011029$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011030
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011031 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11034$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011035
Benjamin Peterson05159c42009-12-03 03:01:27 +000011036# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11038$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011039
11040# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011041if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011042 withval=$with_valgrind;
11043else
11044 with_valgrind=no
11045fi
11046
Matthias Kloseb9621712010-04-24 17:59:49 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11048$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011049if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011050 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 +020011051if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011052
Matthias Kloseb9621712010-04-24 17:59:49 +000011053$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011054
11055else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011056 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011057
11058fi
11059
11060
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011061 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011062fi
11063
Łukasz Langaa785c872016-09-09 17:37:37 -070011064# Check for DTrace support
11065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11066$as_echo_n "checking for --with-dtrace... " >&6; }
11067
11068# Check whether --with-dtrace was given.
11069if test "${with_dtrace+set}" = set; then :
11070 withval=$with_dtrace;
11071else
11072 with_dtrace=no
11073fi
11074
11075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11076$as_echo "$with_dtrace" >&6; }
11077
11078
11079
11080
11081
11082DTRACE=
11083DFLAGS=
11084DTRACE_HEADERS=
11085DTRACE_OBJS=
11086
11087if test "$with_dtrace" = "yes"
11088then
11089 # Extract the first word of "dtrace", so it can be a program name with args.
11090set dummy dtrace; ac_word=$2
11091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11092$as_echo_n "checking for $ac_word... " >&6; }
11093if ${ac_cv_path_DTRACE+:} false; then :
11094 $as_echo_n "(cached) " >&6
11095else
11096 case $DTRACE in
11097 [\\/]* | ?:[\\/]*)
11098 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11099 ;;
11100 *)
11101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11102for as_dir in $PATH
11103do
11104 IFS=$as_save_IFS
11105 test -z "$as_dir" && as_dir=.
11106 for ac_exec_ext in '' $ac_executable_extensions; do
11107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11108 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11110 break 2
11111 fi
11112done
11113 done
11114IFS=$as_save_IFS
11115
11116 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11117 ;;
11118esac
11119fi
11120DTRACE=$ac_cv_path_DTRACE
11121if test -n "$DTRACE"; then
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11123$as_echo "$DTRACE" >&6; }
11124else
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11126$as_echo "no" >&6; }
11127fi
11128
11129
11130 if test "$DTRACE" = "not found"; then
11131 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11132 fi
11133
11134$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11135
11136 DTRACE_HEADERS="Include/pydtrace_probes.h"
11137
11138 # On OS X, DTrace providers do not need to be explicitly compiled and
11139 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11140 # generation flag '-G'. We check for presence of this flag, rather than
11141 # hardcoding support by OS, in the interest of robustness.
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11143$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11144if ${ac_cv_dtrace_link+:} false; then :
11145 $as_echo_n "(cached) " >&6
11146else
11147 ac_cv_dtrace_link=no
11148 echo 'BEGIN' > conftest.d
11149 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11150 ac_cv_dtrace_link=yes
11151
11152fi
11153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11154$as_echo "$ac_cv_dtrace_link" >&6; }
11155 if test "$ac_cv_dtrace_link" = "yes"; then
11156 DTRACE_OBJS="Python/pydtrace.o"
11157 fi
11158fi
11159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011160# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011161
Guido van Rossum98935bf2001-09-05 19:13:16 +000011162DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011163
Guido van Rossume97ee181999-12-20 21:27:22 +000011164# the dlopen() function means we might want to use dynload_shlib.o. some
11165# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011166for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011167do :
11168 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011169if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011171#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011172_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011173
Guido van Rossume97ee181999-12-20 21:27:22 +000011174fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011175done
Guido van Rossume97ee181999-12-20 21:27:22 +000011176
Michael W. Hudson54241132001-12-07 15:38:26 +000011177
Guido van Rossume97ee181999-12-20 21:27:22 +000011178# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11179# loading of modules.
11180
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11182$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011183if test -z "$DYNLOADFILE"
11184then
11185 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011186 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11187 if test "$ac_cv_func_dlopen" = yes
11188 then DYNLOADFILE="dynload_shlib.o"
11189 else DYNLOADFILE="dynload_aix.o"
11190 fi
11191 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011192 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011193 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11194 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011195 *)
11196 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11197 # out any dynamic loading
11198 if test "$ac_cv_func_dlopen" = yes
11199 then DYNLOADFILE="dynload_shlib.o"
11200 else DYNLOADFILE="dynload_stub.o"
11201 fi
11202 ;;
11203 esac
11204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11206$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011207if test "$DYNLOADFILE" != "dynload_stub.o"
11208then
Martin v. Löwis11437992002-04-12 09:54:03 +000011209
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011211
11212fi
11213
Neil Schemenauer4e425612001-06-19 15:44:15 +000011214# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11215
Michael W. Hudson54241132001-12-07 15:38:26 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11218$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011219if test -z "$MACHDEP_OBJS"
11220then
Jack Jansene578a632001-08-15 01:27:14 +000011221 MACHDEP_OBJS=$extra_machdep_objs
11222else
11223 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011224fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011225if test -z "$MACHDEP_OBJS"; then
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11227$as_echo "none" >&6; }
11228else
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11230$as_echo "$MACHDEP_OBJS" >&6; }
11231fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011232
Guido van Rossum627b2d71993-12-24 10:39:16 +000011233# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011234for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011235 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011236 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011237 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011238 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011239 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011240 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011241 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11242 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011243 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011244 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011245 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011246 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011247 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011248 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011249 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11250 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011251 sigaction sigaltstack siginterrupt sigpending sigrelse \
11252 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011253 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011254 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011255 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011256do :
11257 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11258ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011259if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011260 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011261#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011262_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011263
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011264fi
11265done
11266
Michael W. Hudson54241132001-12-07 15:38:26 +000011267
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011268ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11269 #include <dirent.h>
11270"
11271if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11272
11273$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11274
11275fi
11276
11277
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011278# For some functions, having a definition is not sufficient, since
11279# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11281$as_echo_n "checking for chroot... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011284#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011285int
11286main ()
11287{
11288void *x=chroot
11289 ;
11290 return 0;
11291}
11292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011294
Matthias Kloseb9621712010-04-24 17:59:49 +000011295$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011296
Matthias Kloseb159a552010-04-25 21:00:44 +000011297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011299else
Matthias Kloseb9621712010-04-24 17:59:49 +000011300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11301$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011302
11303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11306$as_echo_n "checking for link... " >&6; }
11307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011310int
11311main ()
11312{
11313void *x=link
11314 ;
11315 return 0;
11316}
11317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011319
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011321
Matthias Kloseb159a552010-04-25 21:00:44 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011324else
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11326$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011327
11328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11331$as_echo_n "checking for symlink... " >&6; }
11332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011333/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011334#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011335int
11336main ()
11337{
11338void *x=symlink
11339 ;
11340 return 0;
11341}
11342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011346
Matthias Kloseb159a552010-04-25 21:00:44 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011349else
Matthias Kloseb9621712010-04-24 17:59:49 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352
11353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11356$as_echo_n "checking for fchdir... " >&6; }
11357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011359#include <unistd.h>
11360int
11361main ()
11362{
11363void *x=fchdir
11364 ;
11365 return 0;
11366}
11367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011369
Matthias Kloseb9621712010-04-24 17:59:49 +000011370$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011371
Matthias Kloseb159a552010-04-25 21:00:44 +000011372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011373$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011374else
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011377
11378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11381$as_echo_n "checking for fsync... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011384#include <unistd.h>
11385int
11386main ()
11387{
11388void *x=fsync
11389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011396
Matthias Kloseb159a552010-04-25 21:00:44 +000011397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011398$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011399else
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11401$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011402
11403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11406$as_echo_n "checking for fdatasync... " >&6; }
11407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011409#include <unistd.h>
11410int
11411main ()
11412{
11413void *x=fdatasync
11414 ;
11415 return 0;
11416}
11417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011421
Matthias Kloseb159a552010-04-25 21:00:44 +000011422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011423$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011424else
Matthias Kloseb9621712010-04-24 17:59:49 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11426$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011427
11428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11431$as_echo_n "checking for epoll... " >&6; }
11432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011433/* end confdefs.h. */
11434#include <sys/epoll.h>
11435int
11436main ()
11437{
11438void *x=epoll_create
11439 ;
11440 return 0;
11441}
11442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011446
Matthias Kloseb159a552010-04-25 21:00:44 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011449else
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011452
11453fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11456$as_echo_n "checking for epoll_create1... " >&6; }
11457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11458/* end confdefs.h. */
11459#include <sys/epoll.h>
11460int
11461main ()
11462{
11463void *x=epoll_create1
11464 ;
11465 return 0;
11466}
11467_ACEOF
11468if ac_fn_c_try_compile "$LINENO"; then :
11469
11470$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11471
11472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11473$as_echo "yes" >&6; }
11474else
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476$as_echo "no" >&6; }
11477
11478fi
11479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11481$as_echo_n "checking for kqueue... " >&6; }
11482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011483/* end confdefs.h. */
11484
11485#include <sys/types.h>
11486#include <sys/event.h>
11487
11488int
11489main ()
11490{
11491int x=kqueue()
11492 ;
11493 return 0;
11494}
11495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011496if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011497
Matthias Kloseb9621712010-04-24 17:59:49 +000011498$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011499
Matthias Kloseb159a552010-04-25 21:00:44 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011501$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011502else
Matthias Kloseb9621712010-04-24 17:59:49 +000011503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11504$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011505
11506fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11509$as_echo_n "checking for prlimit... " >&6; }
11510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11511/* end confdefs.h. */
11512
11513#include <sys/time.h>
11514#include <sys/resource.h>
11515
11516int
11517main ()
11518{
11519void *x=prlimit
11520 ;
11521 return 0;
11522}
11523_ACEOF
11524if ac_fn_c_try_compile "$LINENO"; then :
11525
11526$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11527
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11529$as_echo "yes" >&6; }
11530else
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
11533
11534fi
11535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11536
Martin v. Löwisd5843682002-11-21 20:41:28 +000011537# On some systems (eg. FreeBSD 5), we would find a definition of the
11538# functions ctermid_r, setgroups in the library, but no prototype
11539# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11540# address to avoid compiler warnings and potential miscompilations
11541# because of the missing prototypes.
11542
Matthias Kloseb9621712010-04-24 17:59:49 +000011543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11544$as_echo_n "checking for ctermid_r... " >&6; }
11545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011546/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011547
Martin v. Löwisd5843682002-11-21 20:41:28 +000011548#include <stdio.h>
11549
Martin v. Löwisd5843682002-11-21 20:41:28 +000011550int
11551main ()
11552{
11553void* p = ctermid_r
11554 ;
11555 return 0;
11556}
11557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011559
Matthias Kloseb9621712010-04-24 17:59:49 +000011560$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011561
Matthias Kloseb159a552010-04-25 21:00:44 +000011562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011563$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011564else
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11566$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011567
11568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11570
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11572$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011573if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011574 $as_echo_n "(cached) " >&6
11575else
11576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011578#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011579int
11580main ()
11581{
11582void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011583
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011584 ;
11585 return 0;
11586}
11587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011588if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011589 ac_cv_flock_decl=yes
11590else
11591 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011592
11593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011595
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011596fi
11597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11598$as_echo "$ac_cv_flock_decl" >&6; }
11599if test "x${ac_cv_flock_decl}" = xyes; then
11600 for ac_func in flock
11601do :
11602 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011603if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011604 cat >>confdefs.h <<_ACEOF
11605#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011606_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011607
Antoine Pitroua3000072010-09-07 14:52:42 +000011608else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011610$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011611if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011612 $as_echo_n "(cached) " >&6
11613else
11614 ac_check_lib_save_LIBS=$LIBS
11615LIBS="-lbsd $LIBS"
11616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11617/* end confdefs.h. */
11618
11619/* Override any GCC internal prototype to avoid an error.
11620 Use char because int might match the return type of a GCC
11621 builtin and then its argument prototype would still apply. */
11622#ifdef __cplusplus
11623extern "C"
11624#endif
11625char flock ();
11626int
11627main ()
11628{
11629return flock ();
11630 ;
11631 return 0;
11632}
11633_ACEOF
11634if ac_fn_c_try_link "$LINENO"; then :
11635 ac_cv_lib_bsd_flock=yes
11636else
11637 ac_cv_lib_bsd_flock=no
11638fi
11639rm -f core conftest.err conftest.$ac_objext \
11640 conftest$ac_exeext conftest.$ac_ext
11641LIBS=$ac_check_lib_save_LIBS
11642fi
11643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11644$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011645if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011646 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011647
11648
11649$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11650
11651
11652fi
11653
11654
11655fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011656done
11657
Antoine Pitroua3000072010-09-07 14:52:42 +000011658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011659
Matthias Kloseb9621712010-04-24 17:59:49 +000011660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11661$as_echo_n "checking for getpagesize... " >&6; }
11662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011663/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011664
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011665#include <unistd.h>
11666
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011667int
11668main ()
11669{
11670void* p = getpagesize
11671 ;
11672 return 0;
11673}
11674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011675if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011676
Matthias Kloseb9621712010-04-24 17:59:49 +000011677$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011678
Matthias Kloseb159a552010-04-25 21:00:44 +000011679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011680$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011681else
Matthias Kloseb9621712010-04-24 17:59:49 +000011682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11683$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011684
11685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011687
Victor Stinner984890f2011-11-24 13:53:38 +010011688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11689$as_echo_n "checking for broken unsetenv... " >&6; }
11690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11691/* end confdefs.h. */
11692
11693#include <stdlib.h>
11694
11695int
11696main ()
11697{
11698int res = unsetenv("DUMMY")
11699 ;
11700 return 0;
11701}
11702_ACEOF
11703if ac_fn_c_try_compile "$LINENO"; then :
11704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11705$as_echo "no" >&6; }
11706else
11707
11708$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11709
11710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11711$as_echo "yes" >&6; }
11712
11713fi
11714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11715
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011716for ac_prog in true
11717do
11718 # Extract the first word of "$ac_prog", so it can be a program name with args.
11719set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11721$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011722if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011724else
11725 if test -n "$TRUE"; then
11726 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11727else
11728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11729for as_dir in $PATH
11730do
11731 IFS=$as_save_IFS
11732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011735 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 $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 +000011737 break 2
11738 fi
11739done
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011741IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011742
11743fi
11744fi
11745TRUE=$ac_cv_prog_TRUE
11746if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11748$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011752fi
11753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011754
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011755 test -n "$TRUE" && break
11756done
11757test -n "$TRUE" || TRUE="/bin/true"
11758
11759
Matthias Kloseb9621712010-04-24 17:59:49 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11761$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011762if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011764else
11765 ac_check_lib_save_LIBS=$LIBS
11766LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011768/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770/* Override any GCC internal prototype to avoid an error.
11771 Use char because int might match the return type of a GCC
11772 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011773#ifdef __cplusplus
11774extern "C"
11775#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011776char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011777int
11778main ()
11779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011780return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011781 ;
11782 return 0;
11783}
11784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011786 ac_cv_lib_c_inet_aton=yes
11787else
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011790rm -f core conftest.err conftest.$ac_objext \
11791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792LIBS=$ac_check_lib_save_LIBS
11793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11795$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011796if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011797 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798else
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11800$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011801if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011803else
11804 ac_check_lib_save_LIBS=$LIBS
11805LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011807/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011809/* Override any GCC internal prototype to avoid an error.
11810 Use char because int might match the return type of a GCC
11811 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011812#ifdef __cplusplus
11813extern "C"
11814#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011815char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011816int
11817main ()
11818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011819return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820 ;
11821 return 0;
11822}
11823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011824if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011825 ac_cv_lib_resolv_inet_aton=yes
11826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011829rm -f core conftest.err conftest.$ac_objext \
11830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011831LIBS=$ac_check_lib_save_LIBS
11832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11834$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836 cat >>confdefs.h <<_ACEOF
11837#define HAVE_LIBRESOLV 1
11838_ACEOF
11839
11840 LIBS="-lresolv $LIBS"
11841
11842fi
11843
11844
11845fi
11846
11847
Christian Heimesd0764e22007-12-04 15:00:33 +000011848# On Tru64, chflags seems to be present, but calling it will
11849# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11851$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011852if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011856 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011859/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011860
Christian Heimesd0764e22007-12-04 15:00:33 +000011861#include <sys/stat.h>
11862#include <unistd.h>
11863int main(int argc, char*argv[])
11864{
11865 if(chflags(argv[0], 0) != 0)
11866 return 1;
11867 return 0;
11868}
Ned Deily3eb67d52011-06-28 00:00:28 -070011869
Christian Heimesd0764e22007-12-04 15:00:33 +000011870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011871if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011872 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011873else
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011878fi
11879
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011880
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11883$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011884if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011887 ac_cv_have_chflags="yes"
11888else
11889 ac_cv_have_chflags="no"
11890fi
11891
11892fi
11893if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011896
11897fi
11898
Matthias Kloseb9621712010-04-24 17:59:49 +000011899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11900$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011901if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011903else
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011905 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011908/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011909
Christian Heimesd0764e22007-12-04 15:00:33 +000011910#include <sys/stat.h>
11911#include <unistd.h>
11912int main(int argc, char*argv[])
11913{
11914 if(lchflags(argv[0], 0) != 0)
11915 return 1;
11916 return 0;
11917}
Ned Deily3eb67d52011-06-28 00:00:28 -070011918
Christian Heimesd0764e22007-12-04 15:00:33 +000011919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011920if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011921 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11926 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011927fi
11928
11929
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11932$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011933if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011934 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011935if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011936 ac_cv_have_lchflags="yes"
11937else
11938 ac_cv_have_lchflags="no"
11939fi
11940
11941fi
11942if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011943
Matthias Kloseb9621712010-04-24 17:59:49 +000011944$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011945
11946fi
11947
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011948case $ac_sys_system/$ac_sys_release in
11949Darwin/*)
11950 _CUR_CFLAGS="${CFLAGS}"
11951 _CUR_LDFLAGS="${LDFLAGS}"
11952 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11953 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11954 ;;
11955esac
11956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11958$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011959if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011961else
11962 ac_check_lib_save_LIBS=$LIBS
11963LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011965/* end confdefs.h. */
11966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011967/* Override any GCC internal prototype to avoid an error.
11968 Use char because int might match the return type of a GCC
11969 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011970#ifdef __cplusplus
11971extern "C"
11972#endif
11973char inflateCopy ();
11974int
11975main ()
11976{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011978 ;
11979 return 0;
11980}
11981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011982if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011983 ac_cv_lib_z_inflateCopy=yes
11984else
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011987rm -f core conftest.err conftest.$ac_objext \
11988 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011989LIBS=$ac_check_lib_save_LIBS
11990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11992$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011993if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011994
Matthias Kloseb9621712010-04-24 17:59:49 +000011995$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011996
11997fi
11998
11999
12000case $ac_sys_system/$ac_sys_release in
12001Darwin/*)
12002 CFLAGS="${_CUR_CFLAGS}"
12003 LDFLAGS="${_CUR_LDFLAGS}"
12004 ;;
12005esac
12006
Matthias Kloseb9621712010-04-24 17:59:49 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12008$as_echo_n "checking for hstrerror... " >&6; }
12009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012010/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012011
Martin v. Löwise9416172003-05-03 10:12:45 +000012012#include <netdb.h>
12013
Martin v. Löwise9416172003-05-03 10:12:45 +000012014int
12015main ()
12016{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012017void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012018 ;
12019 return 0;
12020}
12021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012022if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012025
Matthias Kloseb159a552010-04-25 21:00:44 +000012026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012027$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012028else
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12030$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012031
12032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012033rm -f core conftest.err conftest.$ac_objext \
12034 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012035
Matthias Kloseb9621712010-04-24 17:59:49 +000012036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12037$as_echo_n "checking for inet_aton... " >&6; }
12038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012039/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012040
Martin v. Löwis86d66262006-02-17 08:40:11 +000012041#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012042#include <sys/socket.h>
12043#include <netinet/in.h>
12044#include <arpa/inet.h>
12045
Martin v. Löwise9416172003-05-03 10:12:45 +000012046int
12047main ()
12048{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012050 ;
12051 return 0;
12052}
12053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012054if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012057
Matthias Kloseb159a552010-04-25 21:00:44 +000012058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012059$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012060else
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12062$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012063
12064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012065rm -f core conftest.err conftest.$ac_objext \
12066 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067
Matthias Kloseb9621712010-04-24 17:59:49 +000012068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12069$as_echo_n "checking for inet_pton... " >&6; }
12070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012071/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012072
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012073#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012074#include <sys/socket.h>
12075#include <netinet/in.h>
12076#include <arpa/inet.h>
12077
Martin v. Löwise9416172003-05-03 10:12:45 +000012078int
12079main ()
12080{
12081void* p = inet_pton
12082 ;
12083 return 0;
12084}
12085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012086if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012089
Matthias Kloseb159a552010-04-25 21:00:44 +000012090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012091$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12094$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012095
12096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012098
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012099# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12101$as_echo_n "checking for setgroups... " >&6; }
12102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012103/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012104
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012105#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012106#ifdef HAVE_GRP_H
12107#include <grp.h>
12108#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012109
Martin v. Löwisd5843682002-11-21 20:41:28 +000012110int
12111main ()
12112{
12113void* p = setgroups
12114 ;
12115 return 0;
12116}
12117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012121
Matthias Kloseb159a552010-04-25 21:00:44 +000012122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012123$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012124else
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12126$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012127
12128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012130
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012131# check for openpty and forkpty
12132
12133for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012134do :
12135 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012136if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012138#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012139_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012140
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012141else
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12143$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012146else
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012148LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152/* Override any GCC internal prototype to avoid an error.
12153 Use char because int might match the return type of a GCC
12154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012155#ifdef __cplusplus
12156extern "C"
12157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012158char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012159int
12160main ()
12161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012163 ;
12164 return 0;
12165}
12166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012172rm -f core conftest.err conftest.$ac_objext \
12173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012174LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12177$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012178if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012180 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012181else
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12183$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012184if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012186else
12187 ac_check_lib_save_LIBS=$LIBS
12188LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012190/* end confdefs.h. */
12191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012192/* Override any GCC internal prototype to avoid an error.
12193 Use char because int might match the return type of a GCC
12194 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012195#ifdef __cplusplus
12196extern "C"
12197#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012198char openpty ();
12199int
12200main ()
12201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012203 ;
12204 return 0;
12205}
12206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012207if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012208 ac_cv_lib_bsd_openpty=yes
12209else
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012212rm -f core conftest.err conftest.$ac_objext \
12213 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012214LIBS=$ac_check_lib_save_LIBS
12215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12217$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012218if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220 LIBS="$LIBS -lbsd"
12221fi
12222
12223
12224fi
12225
Fred Drake8cef4cf2000-06-28 16:40:38 +000012226
12227fi
12228done
12229
12230for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012231do :
12232 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012233if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012235#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012236_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012237
Fred Drake8cef4cf2000-06-28 16:40:38 +000012238else
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12240$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012241if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012243else
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012245LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249/* Override any GCC internal prototype to avoid an error.
12250 Use char because int might match the return type of a GCC
12251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012252#ifdef __cplusplus
12253extern "C"
12254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012255char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012256int
12257main ()
12258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012260 ;
12261 return 0;
12262}
12263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012266else
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012269rm -f core conftest.err conftest.$ac_objext \
12270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012271LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12274$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012275if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012277 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012278else
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12280$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012281if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012283else
12284 ac_check_lib_save_LIBS=$LIBS
12285LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012287/* end confdefs.h. */
12288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289/* Override any GCC internal prototype to avoid an error.
12290 Use char because int might match the return type of a GCC
12291 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012292#ifdef __cplusplus
12293extern "C"
12294#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012295char forkpty ();
12296int
12297main ()
12298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012300 ;
12301 return 0;
12302}
12303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012304if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012305 ac_cv_lib_bsd_forkpty=yes
12306else
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012309rm -f core conftest.err conftest.$ac_objext \
12310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012311LIBS=$ac_check_lib_save_LIBS
12312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12314$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012315if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012316 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012317 LIBS="$LIBS -lbsd"
12318fi
12319
12320
12321fi
12322
Fred Drake8cef4cf2000-06-28 16:40:38 +000012323
12324fi
12325done
12326
Jack Jansendd19cf82001-12-06 22:36:17 +000012327
Christian Heimesb186d002008-03-18 15:15:01 +000012328# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012329for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012330do :
12331 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012332if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012333 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012335_ACEOF
12336
12337fi
12338done
12339
12340
Michael W. Hudson54241132001-12-07 15:38:26 +000012341# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012342for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012343do :
12344 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12345ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012346if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012348#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012349_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012350
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012351fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012352done
12353
Michael W. Hudson54241132001-12-07 15:38:26 +000012354
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012355ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012356if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012357 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012358
Martin v. Löwis1142de32002-03-29 16:28:31 +000012359else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012361 *" dup2.$ac_objext "* ) ;;
12362 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012364esac
12365
Martin v. Löwis1142de32002-03-29 16:28:31 +000012366fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012367
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012368ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012369if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012370 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12371
12372else
12373 case " $LIBOBJS " in
12374 *" strdup.$ac_objext "* ) ;;
12375 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12376 ;;
12377esac
12378
12379fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012380
12381
12382for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012383do :
12384 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012385if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012387#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012390/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012391#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012392int
12393main ()
12394{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012395getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ;
12397 return 0;
12398}
12399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
Matthias Kloseb9621712010-04-24 17:59:49 +000012402$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012403
Guido van Rossum627b2d71993-12-24 10:39:16 +000012404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012406
Guido van Rossum627b2d71993-12-24 10:39:16 +000012407fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012408done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012409
Jack Jansen150753c2003-03-29 22:07:47 +000012410for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012411do :
12412 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012413if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012414 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012415#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012418/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012419#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012420int
12421main ()
12422{
12423setpgrp(0,0);
12424 ;
12425 return 0;
12426}
12427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
Matthias Kloseb9621712010-04-24 17:59:49 +000012430$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012431
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012434
12435fi
12436done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012437
Thomas Wouters3a584202000-08-05 23:28:51 +000012438for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012439do :
12440 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012441if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012443#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012446/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012447#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012448int
12449main ()
12450{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012451gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 ;
12453 return 0;
12454}
12455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456if ac_fn_c_try_compile "$LINENO"; then :
12457
Guido van Rossum627b2d71993-12-24 10:39:16 +000012458else
Skip Montanaro6dead952003-09-25 14:50:04 +000012459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012461
Martin v. Löwis11437992002-04-12 09:54:03 +000012462
Guido van Rossum627b2d71993-12-24 10:39:16 +000012463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012465
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012466fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012467done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012468
Michael W. Hudson54241132001-12-07 15:38:26 +000012469
Victor Stinnere0be4232011-10-25 13:06:09 +020012470for ac_func in clock_gettime
12471do :
12472 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12473if test "x$ac_cv_func_clock_gettime" = xyes; then :
12474 cat >>confdefs.h <<_ACEOF
12475#define HAVE_CLOCK_GETTIME 1
12476_ACEOF
12477
12478else
12479
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12481$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12482if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12483 $as_echo_n "(cached) " >&6
12484else
12485 ac_check_lib_save_LIBS=$LIBS
12486LIBS="-lrt $LIBS"
12487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12488/* end confdefs.h. */
12489
12490/* Override any GCC internal prototype to avoid an error.
12491 Use char because int might match the return type of a GCC
12492 builtin and then its argument prototype would still apply. */
12493#ifdef __cplusplus
12494extern "C"
12495#endif
12496char clock_gettime ();
12497int
12498main ()
12499{
12500return clock_gettime ();
12501 ;
12502 return 0;
12503}
12504_ACEOF
12505if ac_fn_c_try_link "$LINENO"; then :
12506 ac_cv_lib_rt_clock_gettime=yes
12507else
12508 ac_cv_lib_rt_clock_gettime=no
12509fi
12510rm -f core conftest.err conftest.$ac_objext \
12511 conftest$ac_exeext conftest.$ac_ext
12512LIBS=$ac_check_lib_save_LIBS
12513fi
12514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12515$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12516if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12517
Victor Stinner7efb8332014-08-29 15:41:08 +020012518 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012519 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12520
12521
12522$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12523
12524
12525fi
12526
12527
12528fi
12529done
12530
12531
12532for ac_func in clock_getres
12533do :
12534 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12535if test "x$ac_cv_func_clock_getres" = xyes; then :
12536 cat >>confdefs.h <<_ACEOF
12537#define HAVE_CLOCK_GETRES 1
12538_ACEOF
12539
12540else
12541
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12543$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12544if ${ac_cv_lib_rt_clock_getres+:} false; then :
12545 $as_echo_n "(cached) " >&6
12546else
12547 ac_check_lib_save_LIBS=$LIBS
12548LIBS="-lrt $LIBS"
12549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12550/* end confdefs.h. */
12551
12552/* Override any GCC internal prototype to avoid an error.
12553 Use char because int might match the return type of a GCC
12554 builtin and then its argument prototype would still apply. */
12555#ifdef __cplusplus
12556extern "C"
12557#endif
12558char clock_getres ();
12559int
12560main ()
12561{
12562return clock_getres ();
12563 ;
12564 return 0;
12565}
12566_ACEOF
12567if ac_fn_c_try_link "$LINENO"; then :
12568 ac_cv_lib_rt_clock_getres=yes
12569else
12570 ac_cv_lib_rt_clock_getres=no
12571fi
12572rm -f core conftest.err conftest.$ac_objext \
12573 conftest$ac_exeext conftest.$ac_ext
12574LIBS=$ac_check_lib_save_LIBS
12575fi
12576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12577$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12578if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12579
12580 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12581
12582
12583fi
12584
12585
12586fi
12587done
12588
12589
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012590for ac_func in clock_settime
12591do :
12592 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12593if test "x$ac_cv_func_clock_settime" = xyes; then :
12594 cat >>confdefs.h <<_ACEOF
12595#define HAVE_CLOCK_SETTIME 1
12596_ACEOF
12597
12598else
12599
12600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12601$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12602if ${ac_cv_lib_rt_clock_settime+:} false; then :
12603 $as_echo_n "(cached) " >&6
12604else
12605 ac_check_lib_save_LIBS=$LIBS
12606LIBS="-lrt $LIBS"
12607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12608/* end confdefs.h. */
12609
12610/* Override any GCC internal prototype to avoid an error.
12611 Use char because int might match the return type of a GCC
12612 builtin and then its argument prototype would still apply. */
12613#ifdef __cplusplus
12614extern "C"
12615#endif
12616char clock_settime ();
12617int
12618main ()
12619{
12620return clock_settime ();
12621 ;
12622 return 0;
12623}
12624_ACEOF
12625if ac_fn_c_try_link "$LINENO"; then :
12626 ac_cv_lib_rt_clock_settime=yes
12627else
12628 ac_cv_lib_rt_clock_settime=no
12629fi
12630rm -f core conftest.err conftest.$ac_objext \
12631 conftest$ac_exeext conftest.$ac_ext
12632LIBS=$ac_check_lib_save_LIBS
12633fi
12634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12635$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12636if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12637
12638 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12639
12640
12641fi
12642
12643
12644fi
12645done
12646
12647
Matthias Kloseb9621712010-04-24 17:59:49 +000012648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12649$as_echo_n "checking for major... " >&6; }
12650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012651/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012652
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012653#if defined(MAJOR_IN_MKDEV)
12654#include <sys/mkdev.h>
12655#elif defined(MAJOR_IN_SYSMACROS)
12656#include <sys/sysmacros.h>
12657#else
12658#include <sys/types.h>
12659#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012660
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012661int
12662main ()
12663{
12664
12665 makedev(major(0),minor(0));
12666
12667 ;
12668 return 0;
12669}
12670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012672
12673
Matthias Kloseb9621712010-04-24 17:59:49 +000012674$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12677$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012678
12679else
Skip Montanaro6dead952003-09-25 14:50:04 +000012680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12682$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012683
12684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012685rm -f core conftest.err conftest.$ac_objext \
12686 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012687
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012688# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012689# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12691$as_echo_n "checking for getaddrinfo... " >&6; }
12692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012693/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012694
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012695#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012696#include <sys/socket.h>
12697#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012698#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012699
Martin v. Löwis11437992002-04-12 09:54:03 +000012700int
12701main ()
12702{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012703getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 ;
12705 return 0;
12706}
12707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012708if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012709 have_getaddrinfo=yes
12710else
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012713rm -f core conftest.err conftest.$ac_objext \
12714 conftest$ac_exeext conftest.$ac_ext
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12716$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012717if test $have_getaddrinfo = yes
12718then
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12720$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012721 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012723else
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012725
12726if test "${enable_ipv6+set}" = set; then
12727 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12728else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012729 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012730fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012731else
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012733/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012734
Stefan Krah19c21392012-11-22 23:47:32 +010012735#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012736#include <sys/types.h>
12737#include <netdb.h>
12738#include <string.h>
12739#include <sys/socket.h>
12740#include <netinet/in.h>
12741
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012742int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012743{
12744 int passive, gaierr, inet4 = 0, inet6 = 0;
12745 struct addrinfo hints, *ai, *aitop;
12746 char straddr[INET6_ADDRSTRLEN], strport[16];
12747
12748 for (passive = 0; passive <= 1; passive++) {
12749 memset(&hints, 0, sizeof(hints));
12750 hints.ai_family = AF_UNSPEC;
12751 hints.ai_flags = passive ? AI_PASSIVE : 0;
12752 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012753 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012754 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12755 (void)gai_strerror(gaierr);
12756 goto bad;
12757 }
12758 for (ai = aitop; ai; ai = ai->ai_next) {
12759 if (ai->ai_addr == NULL ||
12760 ai->ai_addrlen == 0 ||
12761 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12762 straddr, sizeof(straddr), strport, sizeof(strport),
12763 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12764 goto bad;
12765 }
12766 switch (ai->ai_family) {
12767 case AF_INET:
12768 if (strcmp(strport, "54321") != 0) {
12769 goto bad;
12770 }
12771 if (passive) {
12772 if (strcmp(straddr, "0.0.0.0") != 0) {
12773 goto bad;
12774 }
12775 } else {
12776 if (strcmp(straddr, "127.0.0.1") != 0) {
12777 goto bad;
12778 }
12779 }
12780 inet4++;
12781 break;
12782 case AF_INET6:
12783 if (strcmp(strport, "54321") != 0) {
12784 goto bad;
12785 }
12786 if (passive) {
12787 if (strcmp(straddr, "::") != 0) {
12788 goto bad;
12789 }
12790 } else {
12791 if (strcmp(straddr, "::1") != 0) {
12792 goto bad;
12793 }
12794 }
12795 inet6++;
12796 break;
12797 case AF_UNSPEC:
12798 goto bad;
12799 break;
12800 default:
12801 /* another family support? */
12802 break;
12803 }
12804 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012805 freeaddrinfo(aitop);
12806 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012807 }
12808
12809 if (!(inet4 == 0 || inet4 == 2))
12810 goto bad;
12811 if (!(inet6 == 0 || inet6 == 2))
12812 goto bad;
12813
12814 if (aitop)
12815 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012816 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012817
12818 bad:
12819 if (aitop)
12820 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012821 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012822}
12823
Martin v. Löwis11437992002-04-12 09:54:03 +000012824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012825if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012826 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012827else
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012834fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012835
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012837
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12839$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12840
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012841if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012842then
12843 if test $ipv6 = yes
12844 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012845 echo 'Fatal: You must get working getaddrinfo() function.'
12846 echo ' or you can specify "--disable-ipv6"'.
12847 exit 1
12848 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012849else
Martin v. Löwis11437992002-04-12 09:54:03 +000012850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012852
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012853fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012854
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012855for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012856do :
12857 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012858if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012860#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012861_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012862
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012863fi
12864done
12865
Michael W. Hudson54241132001-12-07 15:38:26 +000012866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012867# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12869$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012870if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012872else
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012874/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012875#include <sys/types.h>
12876#include <sys/time.h>
12877#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012878
Martin v. Löwis11437992002-04-12 09:54:03 +000012879int
12880main ()
12881{
12882if ((struct tm *) 0)
12883return 0;
12884 ;
12885 return 0;
12886}
12887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012888if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012889 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12896$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012897if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012900
12901fi
12902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12904$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012905if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012907else
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012909/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012910#include <sys/types.h>
12911#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012912
Martin v. Löwis11437992002-04-12 09:54:03 +000012913int
12914main ()
12915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916struct tm tm;
12917 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 ;
12920 return 0;
12921}
12922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012923if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012924 ac_cv_struct_tm=time.h
12925else
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12931$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012932if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012935
12936fi
12937
Matthias Kloseb9621712010-04-24 17:59:49 +000012938ac_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 +000012939#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941"
Victor Stinnere0be4232011-10-25 13:06:09 +020012942if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012943
12944cat >>confdefs.h <<_ACEOF
12945#define HAVE_STRUCT_TM_TM_ZONE 1
12946_ACEOF
12947
12948
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012950
Martin v. Löwis11437992002-04-12 09:54:03 +000012951if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954
12955else
Matthias Kloseb9621712010-04-24 17:59:49 +000012956 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12957"
Victor Stinnere0be4232011-10-25 13:06:09 +020012958if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962fi
12963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012965#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966_ACEOF
12967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12969$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012970if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012972else
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012974/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012975#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976#if !HAVE_DECL_TZNAME
12977extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012979
Martin v. Löwis11437992002-04-12 09:54:03 +000012980int
12981main ()
12982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 ;
12985 return 0;
12986}
12987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012988if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012989 ac_cv_var_tzname=yes
12990else
Matthias Kloseb9621712010-04-24 17:59:49 +000012991 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012993rm -f core conftest.err conftest.$ac_objext \
12994 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12997$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012998 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
Matthias Kloseb9621712010-04-24 17:59:49 +000013000$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013001
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013002 fi
13003fi
13004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005ac_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 +020013006if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013007
13008cat >>confdefs.h <<_ACEOF
13009#define HAVE_STRUCT_STAT_ST_RDEV 1
13010_ACEOF
13011
13012
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013013fi
13014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015ac_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 +020013016if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013017
Martin v. Löwis11437992002-04-12 09:54:03 +000013018cat >>confdefs.h <<_ACEOF
13019#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13020_ACEOF
13021
13022
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013023fi
13024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025ac_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 +020013026if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013027
13028cat >>confdefs.h <<_ACEOF
13029#define HAVE_STRUCT_STAT_ST_FLAGS 1
13030_ACEOF
13031
13032
13033fi
13034
Matthias Kloseb9621712010-04-24 17:59:49 +000013035ac_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 +020013036if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013037
13038cat >>confdefs.h <<_ACEOF
13039#define HAVE_STRUCT_STAT_ST_GEN 1
13040_ACEOF
13041
13042
13043fi
13044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045ac_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 +020013046if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013047
13048cat >>confdefs.h <<_ACEOF
13049#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13050_ACEOF
13051
13052
13053fi
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055ac_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 +020013056if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013057
Martin v. Löwis11437992002-04-12 09:54:03 +000013058cat >>confdefs.h <<_ACEOF
13059#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13060_ACEOF
13061
13062
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013063fi
13064
Stefan Krah267b6392016-04-26 01:09:18 +020013065ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13066 #include <sys/types.h>
13067 #include <pwd.h>
13068
13069"
13070if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13071
13072cat >>confdefs.h <<_ACEOF
13073#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13074_ACEOF
13075
13076
13077fi
13078ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13079 #include <sys/types.h>
13080 #include <pwd.h>
13081
13082"
13083if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13084
13085cat >>confdefs.h <<_ACEOF
13086#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13087_ACEOF
13088
13089
13090fi
13091
Michael W. Hudson54241132001-12-07 15:38:26 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13094$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013095if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013097else
Matthias Kloseb159a552010-04-25 21:00:44 +000013098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013100/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013101#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013102int
13103main ()
13104{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013105return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013106 ;
13107 return 0;
13108}
13109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013110if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013111 ac_cv_header_time_altzone=yes
13112else
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117fi
13118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13120$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013121if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124
13125fi
13126
Guido van Rossumda88dad1995-01-26 00:46:29 +000013127was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13129$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013131/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013132
13133#include <sys/types.h>
13134#include <sys/select.h>
13135#include <sys/time.h>
13136
Martin v. Löwis11437992002-04-12 09:54:03 +000013137int
13138main ()
13139{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013140;
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 ;
13142 return 0;
13143}
13144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013145if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013146
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013149
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013150 was_it_defined=yes
13151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13155$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13158$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013159if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013161else
Matthias Kloseb9621712010-04-24 17:59:49 +000013162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013163/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013164#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013165int
13166main ()
13167{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013168struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 ;
13170 return 0;
13171}
13172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013173if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013174 ac_cv_struct_addrinfo=yes
13175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13179fi
13180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13182$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013186
13187fi
13188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13190$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013191if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013195/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013196
13197# include <sys/types.h>
13198# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013199int
13200main ()
13201{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013202struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013203 ;
13204 return 0;
13205}
13206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208 ac_cv_struct_sockaddr_storage=yes
13209else
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13213fi
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13216$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013217if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013220
13221fi
13222
Christian Heimesdffa3942016-09-05 23:54:41 +020013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13224$as_echo_n "checking for sockaddr_alg... " >&6; }
13225if ${ac_cv_struct_sockaddr_alg+:} false; then :
13226 $as_echo_n "(cached) " >&6
13227else
13228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13229/* end confdefs.h. */
13230
13231# include <sys/types.h>
13232# include <sys/socket.h>
13233# include <linux/if_alg.h>
13234int
13235main ()
13236{
13237struct sockaddr_alg s
13238 ;
13239 return 0;
13240}
13241_ACEOF
13242if ac_fn_c_try_compile "$LINENO"; then :
13243 ac_cv_struct_sockaddr_alg=yes
13244else
13245 ac_cv_struct_sockaddr_alg=no
13246fi
13247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13248fi
13249
13250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13251$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13252if test $ac_cv_struct_sockaddr_alg = yes; then
13253
13254$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13255
13256fi
13257
Guido van Rossum627b2d71993-12-24 10:39:16 +000013258# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13261$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013262if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013264else
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013267$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013268int
13269main ()
13270{
13271static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013272test_array [0] = 0;
13273return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
13275 ;
13276 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013277}
Martin v. Löwis11437992002-04-12 09:54:03 +000013278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013279if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013280 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013281else
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13287$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290
13291fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013292
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13294$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013295if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013297else
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013299/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300
Martin v. Löwis11437992002-04-12 09:54:03 +000013301int
13302main ()
13303{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013304
Martin v. Löwis11437992002-04-12 09:54:03 +000013305#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013306 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013308 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013310 char const *const *pcpcc;
13311 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 /* NEC SVR4.0.2 mips cc rejects this. */
13313 struct point {int x, y;};
13314 static struct point const zero = {0,0};
13315 /* AIX XL C 1.02.0.0 rejects this.
13316 It does not let you subtract one const X* pointer from another in
13317 an arm of an if-expression whose if-part is not a constant
13318 expression */
13319 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013321 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013322 ++pcpcc;
13323 ppc = (char**) pcpcc;
13324 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013325 { /* SCO 3.2v4 cc rejects this sort of thing. */
13326 char tx;
13327 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 }
13333 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13334 int x[] = {25, 17};
13335 const int *foo = &x[0];
13336 ++foo;
13337 }
13338 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13339 typedef const int *iptr;
13340 iptr p = 0;
13341 ++p;
13342 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013343 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013345 struct s { int j; const int *ap[3]; } bx;
13346 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013347 }
13348 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13349 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013353#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013354
Martin v. Löwis11437992002-04-12 09:54:03 +000013355 ;
13356 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013357}
Martin v. Löwis11437992002-04-12 09:54:03 +000013358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013359if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360 ac_cv_c_const=yes
13361else
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13367$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013371
13372fi
13373
Michael W. Hudson54241132001-12-07 15:38:26 +000013374
Guido van Rossumda88dad1995-01-26 00:46:29 +000013375works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13377$as_echo_n "checking for working volatile... " >&6; }
13378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013379/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013380
Martin v. Löwis11437992002-04-12 09:54:03 +000013381int
13382main ()
13383{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 ;
13386 return 0;
13387}
13388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013389if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013390 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013391else
Skip Montanaro6dead952003-09-25 14:50:04 +000013392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013394
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013395
Guido van Rossum627b2d71993-12-24 10:39:16 +000013396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13399$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013400
Guido van Rossumda88dad1995-01-26 00:46:29 +000013401works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13403$as_echo_n "checking for working signed char... " >&6; }
13404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013405/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407int
13408main ()
13409{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 ;
13412 return 0;
13413}
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013416 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013417else
Skip Montanaro6dead952003-09-25 14:50:04 +000013418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013420
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013421
Guido van Rossum7f43da71994-08-01 12:15:30 +000013422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13425$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013426
Guido van Rossumda88dad1995-01-26 00:46:29 +000013427have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13429$as_echo_n "checking for prototypes... " >&6; }
13430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013431/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013432int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013433int
13434main ()
13435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013436return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 ;
13438 return 0;
13439}
13440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013441if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013444
Matthias Kloseb159a552010-04-25 21:00:44 +000013445 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13449$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450
Guido van Rossumda88dad1995-01-26 00:46:29 +000013451works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13453$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013455/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013456
13457#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013458int foo(int x, ...) {
13459 va_list va;
13460 va_start(va, x);
13461 va_arg(va, int);
13462 va_arg(va, char *);
13463 va_arg(va, double);
13464 return 0;
13465}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013466
Martin v. Löwis11437992002-04-12 09:54:03 +000013467int
13468main ()
13469{
Guido van Rossum90eea071996-08-30 20:58:57 +000013470return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 ;
13472 return 0;
13473}
13474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
13477
Matthias Kloseb9621712010-04-24 17:59:49 +000013478$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013479
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013480 works=yes
13481
Guido van Rossum627b2d71993-12-24 10:39:16 +000013482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13485$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486
Martin v. Löwisd6320502004-08-12 13:45:08 +000013487# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13489$as_echo_n "checking for socketpair... " >&6; }
13490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013491/* end confdefs.h. */
13492
13493#include <sys/types.h>
13494#include <sys/socket.h>
13495
13496int
13497main ()
13498{
13499void *x=socketpair
13500 ;
13501 return 0;
13502}
13503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013505
Matthias Kloseb9621712010-04-24 17:59:49 +000013506$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013507
Matthias Kloseb159a552010-04-25 21:00:44 +000013508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013509$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013510else
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13512$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013513
13514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013516
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013517# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13519$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013521/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013522#include <sys/types.h>
13523#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013524int
13525main ()
13526{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013527struct sockaddr x;
13528x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 ;
13530 return 0;
13531}
13532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013533if ac_fn_c_try_compile "$LINENO"; then :
13534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13535$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013538
13539else
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13541$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013542
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013545
Guido van Rossumda88dad1995-01-26 00:46:29 +000013546va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13548$as_echo_n "checking whether va_list is an array... " >&6; }
13549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013550/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013551
13552#ifdef HAVE_STDARG_PROTOTYPES
13553#include <stdarg.h>
13554#else
13555#include <varargs.h>
13556#endif
13557
Martin v. Löwis11437992002-04-12 09:54:03 +000013558int
13559main ()
13560{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013561va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 ;
13563 return 0;
13564}
13565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566if ac_fn_c_try_compile "$LINENO"; then :
13567
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013568else
Skip Montanaro6dead952003-09-25 14:50:04 +000013569
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Guido van Rossumda88dad1995-01-26 00:46:29 +000013573 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013574
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13578$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013579
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013580# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013584if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13589$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013590 OLD_CFLAGS=$CFLAGS
13591 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013593/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013594
13595# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013596
Martin v. Löwis11437992002-04-12 09:54:03 +000013597int
13598main ()
13599{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013600
13601 char *name;
13602 struct hostent *he, *res;
13603 char buffer[2048];
13604 int buflen = 2048;
13605 int h_errnop;
13606
13607 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013608
13609 ;
13610 return 0;
13611}
13612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013616
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13621$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013623else
Skip Montanaro6dead952003-09-25 14:50:04 +000013624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13626$as_echo "no" >&6; }
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13628$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013630/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013631
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013632# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013633
Martin v. Löwis11437992002-04-12 09:54:03 +000013634int
13635main ()
13636{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013637
13638 char *name;
13639 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013640 char buffer[2048];
13641 int buflen = 2048;
13642 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013643
Matthias Kloseb159a552010-04-25 21:00:44 +000013644 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
13646 ;
13647 return 0;
13648}
13649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013650if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013653
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Matthias Kloseb159a552010-04-25 21:00:44 +000013655$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13658$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013660else
Skip Montanaro6dead952003-09-25 14:50:04 +000013661
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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13665$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13667/* end confdefs.h. */
13668
13669# include <netdb.h>
13670
13671int
13672main ()
13673{
13674
13675 char *name;
13676 struct hostent *he;
13677 struct hostent_data data;
13678
13679 (void) gethostbyname_r(name, he, &data);
13680
13681 ;
13682 return 0;
13683}
13684_ACEOF
13685if ac_fn_c_try_compile "$LINENO"; then :
13686
13687 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13688
13689
13690$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13691
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13693$as_echo "yes" >&6; }
13694
13695else
13696
13697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13698$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013708 CFLAGS=$OLD_CFLAGS
13709
13710else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 for ac_func in gethostbyname
13713do :
13714 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013715if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013717#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013718_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013720fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013721done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013722
Michael W. Hudson54241132001-12-07 15:38:26 +000013723
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013724fi
13725
Michael W. Hudson54241132001-12-07 15:38:26 +000013726
13727
13728
13729
13730
13731
Guido van Rossum627b2d71993-12-24 10:39:16 +000013732# checks for system services
13733# (none yet)
13734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013736ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013737if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13741$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013742if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013744else
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013746LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750/* Override any GCC internal prototype to avoid an error.
13751 Use char because int might match the return type of a GCC
13752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013753#ifdef __cplusplus
13754extern "C"
13755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013756char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013757int
13758main ()
13759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ;
13762 return 0;
13763}
13764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013767else
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013770rm -f core conftest.err conftest.$ac_objext \
13771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13775$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 cat >>confdefs.h <<_ACEOF
13778#define HAVE_LIBIEEE 1
13779_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013781 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782
Guido van Rossum627b2d71993-12-24 10:39:16 +000013783fi
13784
Michael W. Hudson54241132001-12-07 15:38:26 +000013785
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013786fi
13787
Michael W. Hudson54241132001-12-07 15:38:26 +000013788
Guido van Rossum7f253911997-05-09 02:42:48 +000013789# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13791$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013796if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013797then
13798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013800
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13802$as_echo "yes" >&6; }
13803else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13804$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013805fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13808$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809fi
13810
Guido van Rossum7f253911997-05-09 02:42:48 +000013811
Guido van Rossum7f43da71994-08-01 12:15:30 +000013812# check for --with-libm=...
13813
Guido van Rossum563e7081996-09-10 18:20:48 +000013814case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013815Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013816*) LIBM=-lm
13817esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13819$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013824if test "$withval" = no
13825then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13827$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013828elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013829then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13831$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013832else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013833fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013834else
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13836$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837fi
13838
Guido van Rossum7f43da71994-08-01 12:15:30 +000013839
13840# check for --with-libc=...
13841
Matthias Kloseb9621712010-04-24 17:59:49 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13843$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013847 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013848if test "$withval" = no
13849then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13851$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013852elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013853then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13855$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013856else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013857fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13860$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861fi
13862
Guido van Rossum7f43da71994-08-01 12:15:30 +000013863
Stefan Krah1919b7e2012-03-21 18:25:23 +010013864# **************************************
13865# * Check for gcc x64 inline assembler *
13866# **************************************
13867
13868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13869$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13871/* end confdefs.h. */
13872
13873int
13874main ()
13875{
13876
13877 __asm__ __volatile__ ("movq %rcx, %rax");
13878
13879 ;
13880 return 0;
13881}
13882_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013883if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013884 have_gcc_asm_for_x64=yes
13885else
13886 have_gcc_asm_for_x64=no
13887fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013888rm -f core conftest.err conftest.$ac_objext \
13889 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13891$as_echo "$have_gcc_asm_for_x64" >&6; }
13892if test "$have_gcc_asm_for_x64" = yes
13893then
13894
13895$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13896
13897fi
13898
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899# **************************************************
13900# * Check for various properties of floating point *
13901# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13904$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013905if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013907else
13908
Matthias Kloseb9621712010-04-24 17:59:49 +000013909if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013910 ac_cv_little_endian_double=no
13911else
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013913/* end confdefs.h. */
13914
13915#include <string.h>
13916int main() {
13917 double x = 9006104071832581.0;
13918 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13919 return 0;
13920 else
13921 return 1;
13922}
13923
13924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013925if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013926 ac_cv_little_endian_double=yes
13927else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13931 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013932fi
13933
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013934fi
13935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13937$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013938if test "$ac_cv_little_endian_double" = yes
13939then
13940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942
13943fi
13944
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13946$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013947if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949else
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013952 ac_cv_big_endian_double=no
13953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013955/* end confdefs.h. */
13956
13957#include <string.h>
13958int main() {
13959 double x = 9006104071832581.0;
13960 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13961 return 0;
13962 else
13963 return 1;
13964}
13965
13966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013967if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968 ac_cv_big_endian_double=yes
13969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13973 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013974fi
13975
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976fi
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13979$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013980if test "$ac_cv_big_endian_double" = yes
13981then
13982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984
13985fi
13986
13987# Some ARM platforms use a mixed-endian representation for doubles.
13988# While Python doesn't currently have full support for these platforms
13989# (see e.g., issue 1762561), we can at least make sure that float <-> string
13990# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13992$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013993if ${ac_cv_mixed_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_mixed_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, "\x01\xff\x3f\x43\x05\x04\x03\x02", 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_mixed_endian_double=yes
14015else
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 ac_cv_mixed_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_mixed_endian_double" >&5
14025$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026if test "$ac_cv_mixed_endian_double" = yes
14027then
14028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014030
14031fi
14032
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014033# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014034# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014035# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014036# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014037# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014038# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014039
14040# This inline assembler syntax may also work for suncc and icc,
14041# so we try it on all platforms.
14042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14044$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014046/* end confdefs.h. */
14047
14048int
14049main ()
14050{
14051
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014052 unsigned short cw;
14053 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14054 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014055
14056 ;
14057 return 0;
14058}
14059_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014060if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014061 have_gcc_asm_for_x87=yes
14062else
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014064fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014065rm -f core conftest.err conftest.$ac_objext \
14066 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14068$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014069if test "$have_gcc_asm_for_x87" = yes
14070then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014073
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14077$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14079/* end confdefs.h. */
14080
14081int
14082main ()
14083{
14084
14085 unsigned int fpcr;
14086 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14087 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14088
14089 ;
14090 return 0;
14091}
14092_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014093if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014094 have_gcc_asm_for_mc68881=yes
14095else
14096 have_gcc_asm_for_mc68881=no
14097fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014098rm -f core conftest.err conftest.$ac_objext \
14099 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14101$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14102if test "$have_gcc_asm_for_mc68881" = yes
14103then
14104
14105$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14106
14107fi
14108
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014109# Detect whether system arithmetic is subject to x87-style double
14110# rounding issues. The result of this test has little meaning on non
14111# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14112# mode is round-to-nearest and double rounding issues are present, and
14113# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14115$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014116# $BASECFLAGS may affect the result
14117ac_save_cc="$CC"
14118CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014120 ac_cv_x87_double_rounding=no
14121else
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014123/* end confdefs.h. */
14124
14125#include <stdlib.h>
14126#include <math.h>
14127int main() {
14128 volatile double x, y, z;
14129 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14130 x = 0.99999999999999989; /* 1-2**-53 */
14131 y = 1./x;
14132 if (y != 1.)
14133 exit(0);
14134 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14135 x = 1e16;
14136 y = 2.99999;
14137 z = x + y;
14138 if (z != 1e16+4.)
14139 exit(0);
14140 /* both tests show evidence of double rounding */
14141 exit(1);
14142}
14143
14144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014145if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014146 ac_cv_x87_double_rounding=no
14147else
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14151 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014152fi
14153
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014154CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14156$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014157if test "$ac_cv_x87_double_rounding" = yes
14158then
14159
Matthias Kloseb9621712010-04-24 17:59:49 +000014160$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014161
14162fi
14163
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014164# ************************************
14165# * Check for mathematical functions *
14166# ************************************
14167
14168LIBS_SAVE=$LIBS
14169LIBS="$LIBS $LIBM"
14170
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014171for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14172do :
14173 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14174ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014175if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014176 cat >>confdefs.h <<_ACEOF
14177#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14178_ACEOF
14179
14180fi
14181done
14182
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014183for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014184do :
14185 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14186ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014187if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014188 cat >>confdefs.h <<_ACEOF
14189#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14190_ACEOF
14191
14192fi
14193done
14194
14195ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14196"
Victor Stinnere0be4232011-10-25 13:06:09 +020014197if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014198 ac_have_decl=1
14199else
14200 ac_have_decl=0
14201fi
14202
14203cat >>confdefs.h <<_ACEOF
14204#define HAVE_DECL_ISINF $ac_have_decl
14205_ACEOF
14206ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14207"
Victor Stinnere0be4232011-10-25 13:06:09 +020014208if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014209 ac_have_decl=1
14210else
14211 ac_have_decl=0
14212fi
14213
14214cat >>confdefs.h <<_ACEOF
14215#define HAVE_DECL_ISNAN $ac_have_decl
14216_ACEOF
14217ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14218"
Victor Stinnere0be4232011-10-25 13:06:09 +020014219if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014220 ac_have_decl=1
14221else
14222 ac_have_decl=0
14223fi
14224
14225cat >>confdefs.h <<_ACEOF
14226#define HAVE_DECL_ISFINITE $ac_have_decl
14227_ACEOF
14228
14229
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014230# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14231# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14233$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014234if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014236else
14237
Matthias Kloseb9621712010-04-24 17:59:49 +000014238if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014239 ac_cv_tanh_preserves_zero_sign=no
14240else
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014242/* end confdefs.h. */
14243
14244#include <math.h>
14245#include <stdlib.h>
14246int main() {
14247 /* return 0 if either negative zeros don't exist
14248 on this platform or if negative zeros exist
14249 and tanh(-0.) == -0. */
14250 if (atan2(0., -1.) == atan2(-0., -1.) ||
14251 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14252 else exit(1);
14253}
14254
14255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014256if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014257 ac_cv_tanh_preserves_zero_sign=yes
14258else
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014263fi
14264
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014265fi
14266
Matthias Kloseb9621712010-04-24 17:59:49 +000014267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14268$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014269if test "$ac_cv_tanh_preserves_zero_sign" = yes
14270then
14271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014273
14274fi
14275
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014276if test "$ac_cv_func_log1p" = yes
14277then
14278 # On some versions of AIX, log1p(-0.) returns 0. instead of
14279 # -0. See issue #9920.
14280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14281$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014282 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014283 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014284else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014285
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014286 if test "$cross_compiling" = yes; then :
14287 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014288else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14290/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014291
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014292 #include <math.h>
14293 #include <stdlib.h>
14294 int main() {
14295 /* Fail if the signs of log1p(-0.) and -0. can be
14296 distinguished. */
14297 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14298 return 0;
14299 else
14300 return 1;
14301 }
14302
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014303_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014304if ac_fn_c_try_run "$LINENO"; then :
14305 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014306else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014307 ac_cv_log1p_drops_zero_sign=yes
14308fi
14309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014311fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014312
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014313fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014314
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14316$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14317fi
14318if test "$ac_cv_log1p_drops_zero_sign" = yes
14319then
14320
14321$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14322
14323fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014324
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014325LIBS=$LIBS_SAVE
14326
Mark Dickinsona614f042009-11-28 12:48:43 +000014327# For multiprocessing module, check that sem_open
14328# actually works. For FreeBSD versions <= 7.2,
14329# the kernel module that provides POSIX semaphores
14330# isn't loaded by default, so an attempt to call
14331# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14333$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014334if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014336else
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014338 ac_cv_posix_semaphores_enabled=yes
14339else
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014341/* end confdefs.h. */
14342
14343#include <unistd.h>
14344#include <fcntl.h>
14345#include <stdio.h>
14346#include <semaphore.h>
14347#include <sys/stat.h>
14348
14349int main(void) {
14350 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14351 if (a == SEM_FAILED) {
14352 perror("sem_open");
14353 return 1;
14354 }
14355 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014356 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014357 return 0;
14358}
14359
14360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014361if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014362 ac_cv_posix_semaphores_enabled=yes
14363else
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14367 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014368fi
14369
14370
Mark Dickinsona614f042009-11-28 12:48:43 +000014371fi
14372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14374$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014375if test $ac_cv_posix_semaphores_enabled = no
14376then
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014379
14380fi
14381
Mark Dickinson10683072009-04-18 21:18:19 +000014382# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14384$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014385if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014387else
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014389 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014390else
Matthias Kloseb9621712010-04-24 17:59:49 +000014391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014392/* end confdefs.h. */
14393
14394#include <unistd.h>
14395#include <fcntl.h>
14396#include <stdio.h>
14397#include <semaphore.h>
14398#include <sys/stat.h>
14399
14400int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014401 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014402 int count;
14403 int res;
14404 if(a==SEM_FAILED){
14405 perror("sem_open");
14406 return 1;
14407
14408 }
14409 res = sem_getvalue(a, &count);
14410 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014411 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014412 return res==-1 ? 1 : 0;
14413}
14414
Mark Dickinson10683072009-04-18 21:18:19 +000014415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014416if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014417 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014418else
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14422 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014423fi
14424
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014425
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014426fi
14427
Matthias Kloseb9621712010-04-24 17:59:49 +000014428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14429$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014430if test $ac_cv_broken_sem_getvalue = yes
14431then
14432
Matthias Kloseb9621712010-04-24 17:59:49 +000014433$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014434
14435fi
14436
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014437ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14438"
14439if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14440 ac_have_decl=1
14441else
14442 ac_have_decl=0
14443fi
14444
14445cat >>confdefs.h <<_ACEOF
14446#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14447_ACEOF
14448ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14449"
14450if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14451 ac_have_decl=1
14452else
14453 ac_have_decl=0
14454fi
14455
14456cat >>confdefs.h <<_ACEOF
14457#define HAVE_DECL_RTLD_NOW $ac_have_decl
14458_ACEOF
14459ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14460"
14461if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14462 ac_have_decl=1
14463else
14464 ac_have_decl=0
14465fi
14466
14467cat >>confdefs.h <<_ACEOF
14468#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14469_ACEOF
14470ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14471"
14472if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14473 ac_have_decl=1
14474else
14475 ac_have_decl=0
14476fi
14477
14478cat >>confdefs.h <<_ACEOF
14479#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14480_ACEOF
14481ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14482"
14483if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14484 ac_have_decl=1
14485else
14486 ac_have_decl=0
14487fi
14488
14489cat >>confdefs.h <<_ACEOF
14490#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14491_ACEOF
14492ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14493"
14494if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14495 ac_have_decl=1
14496else
14497 ac_have_decl=0
14498fi
14499
14500cat >>confdefs.h <<_ACEOF
14501#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14502_ACEOF
14503ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14504"
14505if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14506 ac_have_decl=1
14507else
14508 ac_have_decl=0
14509fi
14510
14511cat >>confdefs.h <<_ACEOF
14512#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14513_ACEOF
14514
14515
Mark Dickinsonbd792642009-03-18 20:06:12 +000014516# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14518$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014519# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014520if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014521 enableval=$enable_big_digits; case $enable_big_digits in
14522yes)
14523 enable_big_digits=30 ;;
14524no)
14525 enable_big_digits=15 ;;
1452615|30)
14527 ;;
14528*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014529 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 +000014530esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14532$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014533
14534cat >>confdefs.h <<_ACEOF
14535#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14536_ACEOF
14537
14538
14539else
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14541$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014542fi
14543
14544
Guido van Rossumef2255b2000-03-10 22:30:29 +000014545# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014546ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014547if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
14549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014551
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014552 wchar_h="yes"
14553
Guido van Rossumef2255b2000-03-10 22:30:29 +000014554else
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014556
14557fi
14558
Michael W. Hudson54241132001-12-07 15:38:26 +000014559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014561# determine wchar_t size
14562if test "$wchar_h" = yes
14563then
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14567# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14569$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014570if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14574"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576else
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 if test "$ac_cv_type_wchar_t" = yes; then
14578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014580as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014581See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014582 else
14583 ac_cv_sizeof_wchar_t=0
14584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014586
Martin v. Löwis11437992002-04-12 09:54:03 +000014587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14589$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590
14591
14592
Martin v. Löwis11437992002-04-12 09:54:03 +000014593cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014594#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014595_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014596
Michael W. Hudson54241132001-12-07 15:38:26 +000014597
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014598fi
14599
Matthias Kloseb9621712010-04-24 17:59:49 +000014600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14601$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014602have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014604/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014605
14606#include <tcl.h>
14607#if TCL_UTF_MAX != 6
14608# error "NOT UCS4_TCL"
14609#endif
14610int
14611main ()
14612{
14613
14614 ;
14615 return 0;
14616}
14617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014619
14620
Matthias Kloseb9621712010-04-24 17:59:49 +000014621$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014622
14623 have_ucs4_tcl=yes
14624
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14628$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014629
Skip Montanaro6dead952003-09-25 14:50:04 +000014630# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014631if test "$wchar_h" = yes
14632then
14633 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14635$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014636 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014638else
14639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014641 ac_cv_wchar_t_signed=yes
14642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014644/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014645
14646 #include <wchar.h>
14647 int main()
14648 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014649 /* Success: exit code 0 */
14650 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014651 }
14652
14653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014654if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014655 ac_cv_wchar_t_signed=yes
14656else
Matthias Kloseb9621712010-04-24 17:59:49 +000014657 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14660 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014661fi
14662
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014663fi
14664
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14666$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667fi
14668
Georg Brandl52d168a2008-01-07 18:10:24 +000014669# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014670if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014671 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014672then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014673 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014676
Georg Brandl52d168a2008-01-07 18:10:24 +000014677else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014678 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014679fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14681$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014682
14683# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14685$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014686if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 ac_cv_c_bigendian=unknown
14690 # See if we're dealing with a universal compiler.
14691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692/* end confdefs.h. */
14693#ifndef __APPLE_CC__
14694 not a universal capable compiler
14695 #endif
14696 typedef int dummy;
14697
Skip Montanaro6dead952003-09-25 14:50:04 +000014698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014699if ac_fn_c_try_compile "$LINENO"; then :
14700
14701 # Check for potential -arch flags. It is not universal unless
14702 # there are at least two -arch flags with different values.
14703 ac_arch=
14704 ac_prev=
14705 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14706 if test -n "$ac_prev"; then
14707 case $ac_word in
14708 i?86 | x86_64 | ppc | ppc64)
14709 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14710 ac_arch=$ac_word
14711 else
14712 ac_cv_c_bigendian=universal
14713 break
14714 fi
14715 ;;
14716 esac
14717 ac_prev=
14718 elif test "x$ac_word" = "x-arch"; then
14719 ac_prev=arch
14720 fi
14721 done
14722fi
14723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14724 if test $ac_cv_c_bigendian = unknown; then
14725 # See if sys/param.h defines the BYTE_ORDER macro.
14726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014727/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014728#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731int
14732main ()
14733{
Matthias Kloseb9621712010-04-24 17:59:49 +000014734#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14735 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14736 && LITTLE_ENDIAN)
14737 bogus endian macros
14738 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014739
14740 ;
14741 return 0;
14742}
14743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014744if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014745 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014747/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014748#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014750
Martin v. Löwis11437992002-04-12 09:54:03 +000014751int
14752main ()
14753{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014754#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 not big endian
14756 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014757
14758 ;
14759 return 0;
14760}
14761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014762if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014763 ac_cv_c_bigendian=yes
14764else
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014768fi
14769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14770 fi
14771 if test $ac_cv_c_bigendian = unknown; then
14772 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014774/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014775#include <limits.h>
14776
Martin v. Löwis11437992002-04-12 09:54:03 +000014777int
14778main ()
14779{
Matthias Kloseb9621712010-04-24 17:59:49 +000014780#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14781 bogus endian macros
14782 #endif
14783
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 ;
14785 return 0;
14786}
14787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014788if ac_fn_c_try_compile "$LINENO"; then :
14789 # It does; now see whether it defined to _BIG_ENDIAN or not.
14790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14791/* end confdefs.h. */
14792#include <limits.h>
14793
14794int
14795main ()
14796{
14797#ifndef _BIG_ENDIAN
14798 not big endian
14799 #endif
14800
14801 ;
14802 return 0;
14803}
14804_ACEOF
14805if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14811fi
14812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14813 fi
14814 if test $ac_cv_c_bigendian = unknown; then
14815 # Compile a test program.
14816 if test "$cross_compiling" = yes; then :
14817 # Try to guess by grepping values from an object file.
14818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14819/* end confdefs.h. */
14820short int ascii_mm[] =
14821 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14822 short int ascii_ii[] =
14823 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14824 int use_ascii (int i) {
14825 return ascii_mm[i] + ascii_ii[i];
14826 }
14827 short int ebcdic_ii[] =
14828 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14829 short int ebcdic_mm[] =
14830 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14831 int use_ebcdic (int i) {
14832 return ebcdic_mm[i] + ebcdic_ii[i];
14833 }
14834 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836int
14837main ()
14838{
14839return use_ascii (foo) == use_ebcdic (foo);
14840 ;
14841 return 0;
14842}
14843_ACEOF
14844if ac_fn_c_try_compile "$LINENO"; then :
14845 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14846 ac_cv_c_bigendian=yes
14847 fi
14848 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14849 if test "$ac_cv_c_bigendian" = unknown; then
14850 ac_cv_c_bigendian=no
14851 else
14852 # finding both strings is unlikely to happen, but who knows?
14853 ac_cv_c_bigendian=unknown
14854 fi
14855 fi
14856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014858else
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014860/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014862int
14863main ()
14864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 /* Are we little or big endian? From Harbison&Steele. */
14867 union
14868 {
14869 long int l;
14870 char c[sizeof (long int)];
14871 } u;
14872 u.l = 1;
14873 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874
14875 ;
14876 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014877}
Martin v. Löwis11437992002-04-12 09:54:03 +000014878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014879if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014880 ac_cv_c_bigendian=no
14881else
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14891$as_echo "$ac_cv_c_bigendian" >&6; }
14892 case $ac_cv_c_bigendian in #(
14893 yes)
14894 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14895;; #(
14896 no)
14897 ;; #(
14898 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014899
Matthias Kloseb9621712010-04-24 17:59:49 +000014900$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 ;; #(
14903 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014904 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014905 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014907
Michael W. Hudson54241132001-12-07 15:38:26 +000014908
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014909# ABI version string for Python extension modules. This appears between the
14910# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14911# from the following attributes which affect the ABI of this Python build (in
14912# this order):
14913#
14914# * The Python implementation (always 'cpython-' for us)
14915# * The major and minor version numbers
14916# * --with-pydebug (adds a 'd')
14917# * --with-pymalloc (adds a 'm')
14918# * --with-wide-unicode (adds a 'u')
14919#
14920# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014921# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14922# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014923
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14925$as_echo_n "checking ABIFLAGS... " >&6; }
14926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14927$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14929$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014930SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14932$as_echo "$SOABI" >&6; }
14933
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014934
14935case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014936 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014937 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14938 *)
14939 EXT_SUFFIX=${SHLIB_SUFFIX};;
14940esac
14941
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14943$as_echo_n "checking LDVERSION... " >&6; }
14944LDVERSION='$(VERSION)$(ABIFLAGS)'
14945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14946$as_echo "$LDVERSION" >&6; }
14947
doko@python.org87421192013-01-26 11:39:31 +010014948
doko@ubuntu.com55532312016-06-14 08:55:19 +020014949if test x$PLATFORM_TRIPLET = x; then
14950 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14951else
14952 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14953fi
doko@python.org87421192013-01-26 11:39:31 +010014954
14955
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014956# Check whether right shifting a negative integer extends the sign bit
14957# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14959$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014960if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014962else
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014965 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014966else
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014968/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014969
14970int main()
14971{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014972 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014973}
14974
Martin v. Löwis11437992002-04-12 09:54:03 +000014975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014976if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014977 ac_cv_rshift_extends_sign=yes
14978else
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014983fi
14984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985fi
14986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14988$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014989if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014990then
Martin v. Löwis11437992002-04-12 09:54:03 +000014991
Matthias Kloseb9621712010-04-24 17:59:49 +000014992$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014993
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014994fi
14995
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014996# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14998$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014999if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015001else
Martin v. Löwis11437992002-04-12 09:54:03 +000015002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015004/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015005#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015006int
15007main ()
15008{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015009
15010 FILE *f = fopen("/dev/null", "r");
15011 flockfile(f);
15012 getc_unlocked(f);
15013 funlockfile(f);
15014
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 ;
15016 return 0;
15017}
15018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015019if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015020 ac_cv_have_getc_unlocked=yes
15021else
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 ac_cv_have_getc_unlocked=no
15023fi
15024rm -f core conftest.err conftest.$ac_objext \
15025 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027
Matthias Kloseb9621712010-04-24 17:59:49 +000015028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15029$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015030if test "$ac_cv_have_getc_unlocked" = yes
15031then
Martin v. Löwis11437992002-04-12 09:54:03 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015034
15035fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015036
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015037# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015038# save the value of LIBS so we don't actually link Python with readline
15039LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015040
Gregory P. Smith18820942008-09-07 06:24:49 +000015041# On some systems we need to link readline to a termcap compatible
15042# library. NOTE: Keep the precedence of listed libraries synchronised
15043# with setup.py.
15044py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15046$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015047for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015048 if test -z "$py_libtermcap"; then
15049 READLINE_LIBS="-lreadline"
15050 else
15051 READLINE_LIBS="-lreadline -l$py_libtermcap"
15052 fi
15053 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015055/* end confdefs.h. */
15056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057/* Override any GCC internal prototype to avoid an error.
15058 Use char because int might match the return type of a GCC
15059 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015060#ifdef __cplusplus
15061extern "C"
15062#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015063char readline ();
15064int
15065main ()
15066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015068 ;
15069 return 0;
15070}
15071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015072if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015073 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015075rm -f core conftest.err conftest.$ac_objext \
15076 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015077 if test $py_cv_lib_readline = yes; then
15078 break
15079 fi
15080done
15081# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15082#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015083if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15085$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015086else
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15088$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015089
Matthias Kloseb9621712010-04-24 17:59:49 +000015090$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015091
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015092fi
15093
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015094# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15096$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015097if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015099else
15100 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015101LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015103/* end confdefs.h. */
15104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105/* Override any GCC internal prototype to avoid an error.
15106 Use char because int might match the return type of a GCC
15107 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015108#ifdef __cplusplus
15109extern "C"
15110#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015111char rl_callback_handler_install ();
15112int
15113main ()
15114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015116 ;
15117 return 0;
15118}
15119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015120if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015121 ac_cv_lib_readline_rl_callback_handler_install=yes
15122else
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015125rm -f core conftest.err conftest.$ac_objext \
15126 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015127LIBS=$ac_check_lib_save_LIBS
15128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15130$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015131if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015132
Matthias Kloseb9621712010-04-24 17:59:49 +000015133$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015134
15135fi
15136
15137
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015138# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015140/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015141#include <readline/readline.h>
15142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015143if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015144 have_readline=yes
15145else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015146 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015147
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015148fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015149rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015150if test $have_readline = yes
15151then
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015153/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015154#include <readline/readline.h>
15155
15156_ACEOF
15157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015158 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015161
15162fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015163rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015166/* end confdefs.h. */
15167#include <readline/readline.h>
15168
15169_ACEOF
15170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015174
15175fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015176rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015177
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015178fi
15179
Martin v. Löwis0daad592001-09-30 21:09:59 +000015180# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15182$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015183if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015185else
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015187LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191/* Override any GCC internal prototype to avoid an error.
15192 Use char because int might match the return type of a GCC
15193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015194#ifdef __cplusplus
15195extern "C"
15196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015197char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015198int
15199main ()
15200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015201return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 ;
15203 return 0;
15204}
15205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015206if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015208else
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015211rm -f core conftest.err conftest.$ac_objext \
15212 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015213LIBS=$ac_check_lib_save_LIBS
15214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15216$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015217if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015220
Martin v. Löwis0daad592001-09-30 21:09:59 +000015221fi
15222
Michael W. Hudson54241132001-12-07 15:38:26 +000015223
Thomas Wouters89d996e2007-09-08 17:39:28 +000015224# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15226$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015227if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015229else
15230 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015231LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015233/* end confdefs.h. */
15234
15235/* Override any GCC internal prototype to avoid an error.
15236 Use char because int might match the return type of a GCC
15237 builtin and then its argument prototype would still apply. */
15238#ifdef __cplusplus
15239extern "C"
15240#endif
15241char rl_completion_display_matches_hook ();
15242int
15243main ()
15244{
15245return rl_completion_display_matches_hook ();
15246 ;
15247 return 0;
15248}
15249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015251 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15252else
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015255rm -f core conftest.err conftest.$ac_objext \
15256 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015257LIBS=$ac_check_lib_save_LIBS
15258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15260$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015261if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015264
15265fi
15266
15267
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015268# also in 4.0, but not in editline
15269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15270$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15271if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15272 $as_echo_n "(cached) " >&6
15273else
15274 ac_check_lib_save_LIBS=$LIBS
15275LIBS="-lreadline $READLINE_LIBS $LIBS"
15276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15277/* end confdefs.h. */
15278
15279/* 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. */
15282#ifdef __cplusplus
15283extern "C"
15284#endif
15285char rl_resize_terminal ();
15286int
15287main ()
15288{
15289return rl_resize_terminal ();
15290 ;
15291 return 0;
15292}
15293_ACEOF
15294if ac_fn_c_try_link "$LINENO"; then :
15295 ac_cv_lib_readline_rl_resize_terminal=yes
15296else
15297 ac_cv_lib_readline_rl_resize_terminal=no
15298fi
15299rm -f core conftest.err conftest.$ac_objext \
15300 conftest$ac_exeext conftest.$ac_ext
15301LIBS=$ac_check_lib_save_LIBS
15302fi
15303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15304$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15305if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15306
15307$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15308
15309fi
15310
15311
Martin v. Löwis0daad592001-09-30 21:09:59 +000015312# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15314$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015315if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015317else
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 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
Skip Montanaro6dead952003-09-25 14:50:04 +000015321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323/* 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015326#ifdef __cplusplus
15327extern "C"
15328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015329char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015330int
15331main ()
15332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 ;
15335 return 0;
15336}
15337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015338if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015340else
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015343rm -f core conftest.err conftest.$ac_objext \
15344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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_matches" >&5
15348$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015349if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015352
Guido van Rossum353ae582001-07-10 16:45:32 +000015353fi
15354
Jack Jansendd19cf82001-12-06 22:36:17 +000015355
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015356# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015358/* end confdefs.h. */
15359#include <readline/readline.h>
15360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015361if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015362 have_readline=yes
15363else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015364 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015365
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015366fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015367rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015368if test $have_readline = yes
15369then
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015371/* end confdefs.h. */
15372#include <readline/readline.h>
15373
15374_ACEOF
15375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015377
Matthias Kloseb9621712010-04-24 17:59:49 +000015378$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015379
15380fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015381rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015382
15383fi
15384
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15386$as_echo_n "checking for append_history in -lreadline... " >&6; }
15387if ${ac_cv_lib_readline_append_history+:} false; then :
15388 $as_echo_n "(cached) " >&6
15389else
15390 ac_check_lib_save_LIBS=$LIBS
15391LIBS="-lreadline $READLINE_LIBS $LIBS"
15392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15393/* end confdefs.h. */
15394
15395/* Override any GCC internal prototype to avoid an error.
15396 Use char because int might match the return type of a GCC
15397 builtin and then its argument prototype would still apply. */
15398#ifdef __cplusplus
15399extern "C"
15400#endif
15401char append_history ();
15402int
15403main ()
15404{
15405return append_history ();
15406 ;
15407 return 0;
15408}
15409_ACEOF
15410if ac_fn_c_try_link "$LINENO"; then :
15411 ac_cv_lib_readline_append_history=yes
15412else
15413 ac_cv_lib_readline_append_history=no
15414fi
15415rm -f core conftest.err conftest.$ac_objext \
15416 conftest$ac_exeext conftest.$ac_ext
15417LIBS=$ac_check_lib_save_LIBS
15418fi
15419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15420$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15421if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15422
15423$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15424
15425fi
15426
15427
Martin v. Löwis82bca632006-02-10 20:49:30 +000015428# End of readline checks: restore LIBS
15429LIBS=$LIBS_no_readline
15430
Matthias Kloseb9621712010-04-24 17:59:49 +000015431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15432$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015433if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015434 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015435else
Martin v. Löwis11437992002-04-12 09:54:03 +000015436
Matthias Kloseb9621712010-04-24 17:59:49 +000015437if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015438 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015439else
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015441/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015442
15443int main()
15444{
15445 int val1 = nice(1);
15446 if (val1 != -1 && val1 == nice(2))
15447 exit(0);
15448 exit(1);
15449}
15450
Martin v. Löwis11437992002-04-12 09:54:03 +000015451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015452if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015453 ac_cv_broken_nice=yes
15454else
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15458 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015459fi
15460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461fi
15462
Matthias Kloseb9621712010-04-24 17:59:49 +000015463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15464$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015465if test "$ac_cv_broken_nice" = yes
15466then
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015469
15470fi
15471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15473$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015474if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015476else
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015478 ac_cv_broken_poll=no
15479else
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015481/* end confdefs.h. */
15482
15483#include <poll.h>
15484
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015485int main()
15486{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015487 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015488 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015489
15490 close (42);
15491
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015492 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015493 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015494 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015495 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015496 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015497 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015498 return 1;
15499}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015500
15501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015502if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015503 ac_cv_broken_poll=yes
15504else
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15508 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015510
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015511fi
15512
Matthias Kloseb9621712010-04-24 17:59:49 +000015513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15514$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015515if test "$ac_cv_broken_poll" = yes
15516then
15517
Matthias Kloseb9621712010-04-24 17:59:49 +000015518$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015519
15520fi
15521
Brett Cannon43802422005-02-10 20:48:03 +000015522# 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 +000015523# (which is not required by ISO C or UNIX spec) and/or if we support
15524# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015525ac_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 +000015526#include <$ac_cv_struct_tm>
15527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528"
Victor Stinnere0be4232011-10-25 13:06:09 +020015529if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015530
15531cat >>confdefs.h <<_ACEOF
15532#define HAVE_STRUCT_TM_TM_ZONE 1
15533_ACEOF
15534
15535
15536fi
15537
15538if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015541
15542else
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15544"
Victor Stinnere0be4232011-10-25 13:06:09 +020015545if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547else
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549fi
15550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015551cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015552#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015553_ACEOF
15554
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15556$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015557if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559else
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015561/* end confdefs.h. */
15562#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563#if !HAVE_DECL_TZNAME
15564extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015565#endif
15566
15567int
15568main ()
15569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015571 ;
15572 return 0;
15573}
15574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015575if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015576 ac_cv_var_tzname=yes
15577else
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015580rm -f core conftest.err conftest.$ac_objext \
15581 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15584$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015585 if test $ac_cv_var_tzname = yes; then
15586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015588
15589 fi
15590fi
15591
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015592
Martin v. Löwis1d459062005-03-14 21:23:33 +000015593# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15595$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015596if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015598else
15599
Matthias Kloseb9621712010-04-24 17:59:49 +000015600if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015601 ac_cv_working_tzset=no
15602else
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015604/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015605
15606#include <stdlib.h>
15607#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015608#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015609
15610#if HAVE_TZNAME
15611extern char *tzname[];
15612#endif
15613
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015614int main()
15615{
Brett Cannon18367812003-09-19 00:59:16 +000015616 /* Note that we need to ensure that not only does tzset(3)
15617 do 'something' with localtime, but it works as documented
15618 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015619 This includes making sure that tzname is set properly if
15620 tm->tm_zone does not exist since it is the alternative way
15621 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015622
15623 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015624 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015625 */
15626
Martin v. Löwis1d459062005-03-14 21:23:33 +000015627 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015628 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15629
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015630 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015631 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015632 if (localtime(&groundhogday)->tm_hour != 0)
15633 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015634#if HAVE_TZNAME
15635 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15636 if (strcmp(tzname[0], "UTC") ||
15637 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15638 exit(1);
15639#endif
Brett Cannon18367812003-09-19 00:59:16 +000015640
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015641 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015642 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015643 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015644 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015645#if HAVE_TZNAME
15646 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15647 exit(1);
15648#endif
Brett Cannon18367812003-09-19 00:59:16 +000015649
15650 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15651 tzset();
15652 if (localtime(&groundhogday)->tm_hour != 11)
15653 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015654#if HAVE_TZNAME
15655 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15656 exit(1);
15657#endif
15658
15659#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015660 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15661 exit(1);
15662 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15663 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015664#endif
Brett Cannon18367812003-09-19 00:59:16 +000015665
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015666 exit(0);
15667}
15668
15669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015670if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015671 ac_cv_working_tzset=yes
15672else
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015677fi
15678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015679fi
15680
Matthias Kloseb9621712010-04-24 17:59:49 +000015681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15682$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015683if test "$ac_cv_working_tzset" = yes
15684then
15685
Matthias Kloseb9621712010-04-24 17:59:49 +000015686$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015687
15688fi
15689
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015690# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15692$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015693if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015695else
Matthias Kloseb9621712010-04-24 17:59:49 +000015696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015697/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015698#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015699int
15700main ()
15701{
15702
15703struct stat st;
15704st.st_mtim.tv_nsec = 1;
15705
15706 ;
15707 return 0;
15708}
15709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015711 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015712else
Matthias Kloseb9621712010-04-24 17:59:49 +000015713 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15716fi
15717
Matthias Kloseb9621712010-04-24 17:59:49 +000015718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15719$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015720if test "$ac_cv_stat_tv_nsec" = yes
15721then
15722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015724
15725fi
15726
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015727# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15729$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015730if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015732else
Matthias Kloseb9621712010-04-24 17:59:49 +000015733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015734/* end confdefs.h. */
15735#include <sys/stat.h>
15736int
15737main ()
15738{
15739
15740struct stat st;
15741st.st_mtimespec.tv_nsec = 1;
15742
15743 ;
15744 return 0;
15745}
15746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015747if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015748 ac_cv_stat_tv_nsec2=yes
15749else
Matthias Kloseb9621712010-04-24 17:59:49 +000015750 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15753fi
15754
Matthias Kloseb9621712010-04-24 17:59:49 +000015755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15756$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015757if test "$ac_cv_stat_tv_nsec2" = yes
15758then
15759
Matthias Kloseb9621712010-04-24 17:59:49 +000015760$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015761
15762fi
15763
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015764# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015765ac_save_cppflags="$CPPFLAGS"
15766CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015767
15768for ac_header in curses.h ncurses.h
15769do :
15770 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15771ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15772if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15773 cat >>confdefs.h <<_ACEOF
15774#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15775_ACEOF
15776
15777fi
15778
15779done
15780
15781
15782# On Solaris, term.h requires curses.h
15783for ac_header in term.h
15784do :
15785 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15786#ifdef HAVE_CURSES_H
15787#include <curses.h>
15788#endif
15789
15790"
15791if test "x$ac_cv_header_term_h" = xyes; then :
15792 cat >>confdefs.h <<_ACEOF
15793#define HAVE_TERM_H 1
15794_ACEOF
15795
15796fi
15797
15798done
15799
15800
Jack Jansen666b1e72001-10-31 12:11:48 +000015801# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15803$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015804if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015806else
Matthias Kloseb9621712010-04-24 17:59:49 +000015807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015808/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015809#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015810int
15811main ()
15812{
Jack Jansen666b1e72001-10-31 12:11:48 +000015813
15814 int rtn;
15815 rtn = mvwdelch(0,0,0);
15816
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 ;
15818 return 0;
15819}
15820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015821if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015822 ac_cv_mvwdelch_is_expression=yes
15823else
Matthias Kloseb9621712010-04-24 17:59:49 +000015824 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15827fi
15828
Matthias Kloseb9621712010-04-24 17:59:49 +000015829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15830$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015831
15832if test "$ac_cv_mvwdelch_is_expression" = yes
15833then
Martin v. Löwis11437992002-04-12 09:54:03 +000015834
Matthias Kloseb9621712010-04-24 17:59:49 +000015835$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015836
15837fi
15838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15840$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015841if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015843else
Matthias Kloseb9621712010-04-24 17:59:49 +000015844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015845/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015846#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015847int
15848main ()
15849{
Jack Jansen666b1e72001-10-31 12:11:48 +000015850
15851 WINDOW *w;
15852 w->_flags = 0;
15853
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 ;
15855 return 0;
15856}
15857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015858if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015859 ac_cv_window_has_flags=yes
15860else
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15864fi
15865
Matthias Kloseb9621712010-04-24 17:59:49 +000015866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15867$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015868
Jack Jansen666b1e72001-10-31 12:11:48 +000015869
15870if test "$ac_cv_window_has_flags" = yes
15871then
Martin v. Löwis11437992002-04-12 09:54:03 +000015872
Matthias Kloseb9621712010-04-24 17:59:49 +000015873$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015874
15875fi
15876
Matthias Kloseb9621712010-04-24 17:59:49 +000015877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15878$as_echo_n "checking for is_term_resized... " >&6; }
15879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015880/* end confdefs.h. */
15881#include <curses.h>
15882int
15883main ()
15884{
15885void *x=is_term_resized
15886 ;
15887 return 0;
15888}
15889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015893
Matthias Kloseb159a552010-04-25 21:00:44 +000015894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015895$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015896else
Matthias Kloseb9621712010-04-24 17:59:49 +000015897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15898$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015899
15900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15902
Matthias Kloseb9621712010-04-24 17:59:49 +000015903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15904$as_echo_n "checking for resize_term... " >&6; }
15905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015906/* end confdefs.h. */
15907#include <curses.h>
15908int
15909main ()
15910{
15911void *x=resize_term
15912 ;
15913 return 0;
15914}
15915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015916if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015917
Matthias Kloseb9621712010-04-24 17:59:49 +000015918$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015919
Matthias Kloseb159a552010-04-25 21:00:44 +000015920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015921$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015922else
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15924$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015925
15926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15928
Matthias Kloseb9621712010-04-24 17:59:49 +000015929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15930$as_echo_n "checking for resizeterm... " >&6; }
15931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015932/* end confdefs.h. */
15933#include <curses.h>
15934int
15935main ()
15936{
15937void *x=resizeterm
15938 ;
15939 return 0;
15940}
15941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015942if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015943
Matthias Kloseb9621712010-04-24 17:59:49 +000015944$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015945
Matthias Kloseb159a552010-04-25 21:00:44 +000015946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015947$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015948else
Matthias Kloseb9621712010-04-24 17:59:49 +000015949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15950$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015951
15952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015954# last curses configure check
15955CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015956
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15958$as_echo "$as_me: checking for device files" >&6;}
15959
15960if test "x$cross_compiling" = xyes; then
15961 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15963$as_echo_n "checking for /dev/ptmx... " >&6; }
15964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15965$as_echo "not set" >&6; }
15966 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15967 fi
15968 if test "${ac_cv_file__dev_ptc+set}" != set; then
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15970$as_echo_n "checking for /dev/ptc... " >&6; }
15971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15972$as_echo "not set" >&6; }
15973 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15974 fi
15975fi
15976
Matthias Kloseb9621712010-04-24 17:59:49 +000015977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15978$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015979if ${ac_cv_file__dev_ptmx+:} false; then :
15980 $as_echo_n "(cached) " >&6
15981else
15982 test "$cross_compiling" = yes &&
15983 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15984if test -r "/dev/ptmx"; then
15985 ac_cv_file__dev_ptmx=yes
15986else
15987 ac_cv_file__dev_ptmx=no
15988fi
15989fi
15990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15991$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15992if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015993
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015994fi
15995
15996if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015999
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16002$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016003if ${ac_cv_file__dev_ptc+:} false; then :
16004 $as_echo_n "(cached) " >&6
16005else
16006 test "$cross_compiling" = yes &&
16007 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16008if test -r "/dev/ptc"; then
16009 ac_cv_file__dev_ptc=yes
16010else
16011 ac_cv_file__dev_ptc=no
16012fi
16013fi
16014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16015$as_echo "$ac_cv_file__dev_ptc" >&6; }
16016if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016017
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016018fi
16019
16020if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016021
Matthias Kloseb9621712010-04-24 17:59:49 +000016022$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016023
Neal Norwitz865400f2003-03-21 01:42:58 +000016024fi
16025
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016026if test $ac_sys_system = Darwin
16027then
16028 LIBS="$LIBS -framework CoreFoundation"
16029fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16032$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016033if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016034 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016035else
Matthias Kloseb9621712010-04-24 17:59:49 +000016036 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016037 ac_cv_have_size_t_format="cross -- assuming yes"
16038
Thomas Wouters477c8d52006-05-27 19:21:47 +000016039else
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016041/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016042
Thomas Wouters477c8d52006-05-27 19:21:47 +000016043#include <stdio.h>
16044#include <stddef.h>
16045#include <string.h>
16046
Christian Heimes2c181612007-12-17 20:04:13 +000016047#ifdef HAVE_SYS_TYPES_H
16048#include <sys/types.h>
16049#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016050
16051#ifdef HAVE_SSIZE_T
16052typedef ssize_t Py_ssize_t;
16053#elif SIZEOF_VOID_P == SIZEOF_LONG
16054typedef long Py_ssize_t;
16055#else
16056typedef int Py_ssize_t;
16057#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016058
Christian Heimes2c181612007-12-17 20:04:13 +000016059int main()
16060{
16061 char buffer[256];
16062
Thomas Wouters477c8d52006-05-27 19:21:47 +000016063 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16064 return 1;
16065
Thomas Wouters89f507f2006-12-13 04:49:30 +000016066 if (strcmp(buffer, "123"))
16067 return 1;
16068
16069 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16070 return 1;
16071
16072 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016073 return 1;
16074
16075 return 0;
16076}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016077
Thomas Wouters477c8d52006-05-27 19:21:47 +000016078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016079if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016080 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016081else
Matthias Kloseb9621712010-04-24 17:59:49 +000016082 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016086fi
16087
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16090$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016091if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016092
Matthias Kloseb9621712010-04-24 17:59:49 +000016093$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016094
16095fi
16096
Matthias Kloseb9621712010-04-24 17:59:49 +000016097ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016098#ifdef HAVE_SYS_TYPES_H
16099#include <sys/types.h>
16100#endif
16101#ifdef HAVE_SYS_SOCKET_H
16102#include <sys/socket.h>
16103#endif
16104
Matthias Kloseb9621712010-04-24 17:59:49 +000016105"
Victor Stinnere0be4232011-10-25 13:06:09 +020016106if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016107
Martin v. Löwis11437992002-04-12 09:54:03 +000016108else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016109
Matthias Kloseb9621712010-04-24 17:59:49 +000016110$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016111
16112fi
16113
Michael W. Hudson54241132001-12-07 15:38:26 +000016114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16116$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016117if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016118 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016119else
Matthias Kloseb9621712010-04-24 17:59:49 +000016120 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016121 ac_cv_broken_mbstowcs=no
16122else
Matthias Kloseb9621712010-04-24 17:59:49 +000016123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016124/* end confdefs.h. */
16125
Stefan Krah19c21392012-11-22 23:47:32 +010016126#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016127#include<stdlib.h>
16128int main() {
16129 size_t len = -1;
16130 const char *str = "text";
16131 len = mbstowcs(NULL, str, 0);
16132 return (len != 4);
16133}
16134
16135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016136if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016137 ac_cv_broken_mbstowcs=no
16138else
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016143fi
16144
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016145fi
16146
Matthias Kloseb9621712010-04-24 17:59:49 +000016147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16148$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016149if test "$ac_cv_broken_mbstowcs" = yes
16150then
16151
Matthias Kloseb9621712010-04-24 17:59:49 +000016152$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016153
16154fi
16155
Antoine Pitroub52ec782009-01-25 16:34:23 +000016156# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16158$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016159
16160# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016161if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016162 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016163if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016164then
16165
Matthias Kloseb9621712010-04-24 17:59:49 +000016166$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016167
Matthias Kloseb9621712010-04-24 17:59:49 +000016168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16169$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016170fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016171if test "$withval" = no
16172then
16173
16174$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16175
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16177$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016178fi
16179
Antoine Pitrou042b1282010-08-13 21:15:58 +000016180else
16181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16182$as_echo "no value specified" >&6; }
16183fi
16184
Antoine Pitroub52ec782009-01-25 16:34:23 +000016185
Matthias Kloseb17289e2012-03-15 19:51:34 +010016186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16187$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16188if ${ac_cv_computed_gotos+:} false; then :
16189 $as_echo_n "(cached) " >&6
16190else
16191 if test "$cross_compiling" = yes; then :
16192 if test "${with_computed_gotos+set}" = set; then
16193 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16194 else
16195 ac_cv_computed_gotos=no
16196 fi
16197else
16198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16199/* end confdefs.h. */
16200
16201int main(int argc, char **argv)
16202{
16203 static void *targets[1] = { &&LABEL1 };
16204 goto LABEL2;
16205LABEL1:
16206 return 0;
16207LABEL2:
16208 goto *targets[0];
16209 return 1;
16210}
16211
16212_ACEOF
16213if ac_fn_c_try_run "$LINENO"; then :
16214 ac_cv_computed_gotos=yes
16215else
16216 ac_cv_computed_gotos=no
16217fi
16218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16219 conftest.$ac_objext conftest.beam conftest.$ac_ext
16220fi
16221
16222fi
16223
16224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16225$as_echo "$ac_cv_computed_gotos" >&6; }
16226case "$ac_cv_computed_gotos" in yes*)
16227
16228$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16229
16230esac
16231
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016232case $ac_sys_system in
16233AIX*)
16234
16235$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16236 ;;
16237esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016238
Michael W. Hudson54241132001-12-07 15:38:26 +000016239
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016240
16241
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016242for h in `(cd $srcdir;echo Python/thread_*.h)`
16243do
16244 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16245done
16246
Michael W. Hudson54241132001-12-07 15:38:26 +000016247
Ned Deily0db50cf2014-07-25 12:41:31 -070016248SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16250$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016251for dir in $SRCDIRS; do
16252 if test ! -d $dir; then
16253 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016254 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016255done
Matthias Kloseb9621712010-04-24 17:59:49 +000016256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16257$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016258
Stefan Krah1919b7e2012-03-21 18:25:23 +010016259# Availability of -O2:
16260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16261$as_echo_n "checking for -O2... " >&6; }
16262saved_cflags="$CFLAGS"
16263CFLAGS="-O2"
16264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16265/* end confdefs.h. */
16266
16267int
16268main ()
16269{
16270
16271
16272 ;
16273 return 0;
16274}
16275_ACEOF
16276if ac_fn_c_try_compile "$LINENO"; then :
16277 have_O2=yes
16278else
16279 have_O2=no
16280fi
16281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16283$as_echo "$have_O2" >&6; }
16284CFLAGS="$saved_cflags"
16285
16286# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16287# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16289$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16290saved_cflags="$CFLAGS"
16291CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16292if test "$have_O2" = no; then
16293 CFLAGS=""
16294fi
16295if test "$cross_compiling" = yes; then :
16296 have_glibc_memmove_bug=undefined
16297else
16298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16299/* end confdefs.h. */
16300
16301#include <stdio.h>
16302#include <stdlib.h>
16303#include <string.h>
16304void foo(void *p, void *q) { memmove(p, q, 19); }
16305int main() {
16306 char a[32] = "123456789000000000";
16307 foo(&a[9], a);
16308 if (strcmp(a, "123456789123456789000000000") != 0)
16309 return 1;
16310 foo(a, &a[9]);
16311 if (strcmp(a, "123456789000000000") != 0)
16312 return 1;
16313 return 0;
16314}
16315
16316_ACEOF
16317if ac_fn_c_try_run "$LINENO"; then :
16318 have_glibc_memmove_bug=no
16319else
16320 have_glibc_memmove_bug=yes
16321fi
16322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16323 conftest.$ac_objext conftest.beam conftest.$ac_ext
16324fi
16325
16326CFLAGS="$saved_cflags"
16327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16328$as_echo "$have_glibc_memmove_bug" >&6; }
16329if test "$have_glibc_memmove_bug" = yes; then
16330
16331$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16332
16333fi
16334
16335if test "$have_gcc_asm_for_x87" = yes; then
16336 # Some versions of gcc miscompile inline asm:
16337 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16338 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16339 case $CC in
16340 *gcc*)
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16342$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16343 saved_cflags="$CFLAGS"
16344 CFLAGS="-O2"
16345 if test "$cross_compiling" = yes; then :
16346 have_ipa_pure_const_bug=undefined
16347else
16348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16349/* end confdefs.h. */
16350
16351 __attribute__((noinline)) int
16352 foo(int *p) {
16353 int r;
16354 asm ( "movl \$6, (%1)\n\t"
16355 "xorl %0, %0\n\t"
16356 : "=r" (r) : "r" (p) : "memory"
16357 );
16358 return r;
16359 }
16360 int main() {
16361 int p = 8;
16362 if ((foo(&p) ? : p) != 6)
16363 return 1;
16364 return 0;
16365 }
16366
16367_ACEOF
16368if ac_fn_c_try_run "$LINENO"; then :
16369 have_ipa_pure_const_bug=no
16370else
16371 have_ipa_pure_const_bug=yes
16372fi
16373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16374 conftest.$ac_objext conftest.beam conftest.$ac_ext
16375fi
16376
16377 CFLAGS="$saved_cflags"
16378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16379$as_echo "$have_ipa_pure_const_bug" >&6; }
16380 if test "$have_ipa_pure_const_bug" = yes; then
16381
16382$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16383
16384 fi
16385 ;;
16386 esac
16387fi
16388
Victor Stinner4f5366e2015-01-09 02:13:19 +010016389# Check for stdatomic.h
16390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16391$as_echo_n "checking for stdatomic.h... " >&6; }
16392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16393/* end confdefs.h. */
16394
16395
16396 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016397 atomic_int value = ATOMIC_VAR_INIT(1);
16398 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016399 int main() {
16400 int loaded_value = atomic_load(&value);
16401 return 0;
16402 }
16403
16404
16405_ACEOF
16406if ac_fn_c_try_link "$LINENO"; then :
16407 have_stdatomic_h=yes
16408else
16409 have_stdatomic_h=no
16410fi
16411rm -f core conftest.err conftest.$ac_objext \
16412 conftest$ac_exeext conftest.$ac_ext
16413
16414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16415$as_echo "$have_stdatomic_h" >&6; }
16416
16417if test "$have_stdatomic_h" = yes; then
16418
16419$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16420
16421fi
16422
16423# Check for GCC >= 4.7 __atomic builtins
16424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16425$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427/* end confdefs.h. */
16428
16429
16430 volatile int val = 1;
16431 int main() {
16432 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16433 return 0;
16434 }
16435
16436
16437_ACEOF
16438if ac_fn_c_try_link "$LINENO"; then :
16439 have_builtin_atomic=yes
16440else
16441 have_builtin_atomic=no
16442fi
16443rm -f core conftest.err conftest.$ac_objext \
16444 conftest$ac_exeext conftest.$ac_ext
16445
16446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16447$as_echo "$have_builtin_atomic" >&6; }
16448
16449if test "$have_builtin_atomic" = yes; then
16450
16451$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16452
16453fi
16454
Ned Deily322f5ba2013-11-21 23:01:59 -080016455# ensurepip option
16456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16457$as_echo_n "checking for ensurepip... " >&6; }
16458
16459# Check whether --with-ensurepip was given.
16460if test "${with_ensurepip+set}" = set; then :
16461 withval=$with_ensurepip;
16462else
16463 with_ensurepip=upgrade
16464fi
16465
16466case $with_ensurepip in #(
16467 yes|upgrade) :
16468 ENSUREPIP=upgrade ;; #(
16469 install) :
16470 ENSUREPIP=install ;; #(
16471 no) :
16472 ENSUREPIP=no ;; #(
16473 *) :
16474 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16475esac
16476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16477$as_echo "$ENSUREPIP" >&6; }
16478
16479
Victor Stinner35a97c02015-03-08 02:59:09 +010016480# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16482$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16484/* end confdefs.h. */
16485
16486
16487 #include <dirent.h>
16488
16489 int main() {
16490 struct dirent entry;
16491 return entry.d_type == DT_UNKNOWN;
16492 }
16493
16494
16495_ACEOF
16496if ac_fn_c_try_link "$LINENO"; then :
16497 have_dirent_d_type=yes
16498else
16499 have_dirent_d_type=no
16500fi
16501rm -f core conftest.err conftest.$ac_objext \
16502 conftest$ac_exeext conftest.$ac_ext
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16504$as_echo "$have_dirent_d_type" >&6; }
16505
16506if test "$have_dirent_d_type" = yes; then
16507
16508$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16509
16510fi
16511
Victor Stinner9eb57c52015-03-19 22:21:49 +010016512# check if the Linux getrandom() syscall is available
16513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16514$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16516/* end confdefs.h. */
16517
16518
Victor Stinner1b80b242016-04-12 22:34:58 +020016519 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016520 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016521 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016522
16523 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016524 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016525 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016526 const int flags = GRND_NONBLOCK;
16527 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016528 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016529 return 0;
16530 }
16531
16532
16533_ACEOF
16534if ac_fn_c_try_link "$LINENO"; then :
16535 have_getrandom_syscall=yes
16536else
16537 have_getrandom_syscall=no
16538fi
16539rm -f core conftest.err conftest.$ac_objext \
16540 conftest$ac_exeext conftest.$ac_ext
16541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16542$as_echo "$have_getrandom_syscall" >&6; }
16543
16544if test "$have_getrandom_syscall" = yes; then
16545
16546$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16547
16548fi
16549
Victor Stinner3abf44e2015-09-18 15:38:37 +020016550# check if the getrandom() function is available
16551# the test was written for the Solaris function of <sys/random.h>
16552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16553$as_echo_n "checking for the getrandom() function... " >&6; }
16554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16555/* end confdefs.h. */
16556
16557
16558 #include <sys/random.h>
16559
16560 int main() {
16561 char buffer[1];
16562 const size_t buflen = sizeof(buffer);
16563 const int flags = 0;
16564 /* ignore the result, Python checks for ENOSYS at runtime */
16565 (void)getrandom(buffer, buflen, flags);
16566 return 0;
16567 }
16568
16569
16570_ACEOF
16571if ac_fn_c_try_link "$LINENO"; then :
16572 have_getrandom=yes
16573else
16574 have_getrandom=no
16575fi
16576rm -f core conftest.err conftest.$ac_objext \
16577 conftest$ac_exeext conftest.$ac_ext
16578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16579$as_echo "$have_getrandom" >&6; }
16580
16581if test "$have_getrandom" = yes; then
16582
16583$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16584
16585fi
16586
Guido van Rossum627b2d71993-12-24 10:39:16 +000016587# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016588ac_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 +000016589
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016590ac_config_files="$ac_config_files Modules/ld_so_aix"
16591
Martin v. Löwis11437992002-04-12 09:54:03 +000016592cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016593# This file is a shell script that caches the results of configure
16594# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016595# scripts and configure runs, see configure's option --config-cache.
16596# It is not useful on other systems. If it contains results you don't
16597# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016598#
Martin v. Löwis11437992002-04-12 09:54:03 +000016599# config.status only pays attention to the cache file if you give it
16600# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016601#
Skip Montanaro6dead952003-09-25 14:50:04 +000016602# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016603# loading this file, other *unset* `ac_cv_foo' will be assigned the
16604# following values.
16605
16606_ACEOF
16607
Guido van Rossumf78abae1997-01-21 22:02:36 +000016608# The following way of writing the cache mishandles newlines in values,
16609# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016611# Ultrix sh set writes to stderr and can't be redirected directly,
16612# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613(
16614 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16615 eval ac_val=\$$ac_var
16616 case $ac_val in #(
16617 *${as_nl}*)
16618 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016619 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16620$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621 esac
16622 case $ac_var in #(
16623 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016624 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16625 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626 esac ;;
16627 esac
16628 done
16629
Martin v. Löwis11437992002-04-12 09:54:03 +000016630 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16632 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016633 # `set' does not quote correctly, so add quotes: double-quote
16634 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016635 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016636 "s/'/'\\\\''/g;
16637 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016638 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016639 *)
16640 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016641 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016642 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643 esac |
16644 sort
16645) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016646 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16651 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016652 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16653 :end' >>confcache
16654if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16655 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016656 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016657 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16658$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016659 if test ! -f "$cache_file" || test -h "$cache_file"; then
16660 cat confcache >"$cache_file"
16661 else
16662 case $cache_file in #(
16663 */* | ?:*)
16664 mv -f confcache "$cache_file"$$ &&
16665 mv -f "$cache_file"$$ "$cache_file" ;; #(
16666 *)
16667 mv -f confcache "$cache_file" ;;
16668 esac
16669 fi
16670 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016671 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016672 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16673$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016674 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016675fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016676rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016677
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016678test "x$prefix" = xNONE && prefix=$ac_default_prefix
16679# Let make expand exec_prefix.
16680test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016681
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016682DEFS=-DHAVE_CONFIG_H
16683
Skip Montanaro6dead952003-09-25 14:50:04 +000016684ac_libobjs=
16685ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016686U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016687for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16688 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016690 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16692 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16694 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016695done
16696LIBOBJS=$ac_libobjs
16697
16698LTLIBOBJS=$ac_ltlibobjs
16699
16700
Martin v. Löwis11437992002-04-12 09:54:03 +000016701
Matthias Kloseb9621712010-04-24 17:59:49 +000016702
Victor Stinnere0be4232011-10-25 13:06:09 +020016703: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016704ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016705ac_clean_files_save=$ac_clean_files
16706ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016707{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16708$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16709as_write_fail=0
16710cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016711#! $SHELL
16712# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016713# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016714# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016715# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016716
Martin v. Löwis11437992002-04-12 09:54:03 +000016717debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016718ac_cs_recheck=false
16719ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016720
Matthias Kloseb9621712010-04-24 17:59:49 +000016721SHELL=\${CONFIG_SHELL-$SHELL}
16722export SHELL
16723_ASEOF
16724cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16725## -------------------- ##
16726## M4sh Initialization. ##
16727## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016729# Be more Bourne compatible
16730DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016731if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 emulate sh
16733 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016734 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016735 # is contrary to our usage. Disable this feature.
16736 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016738else
Matthias Kloseb9621712010-04-24 17:59:49 +000016739 case `(set -o) 2>/dev/null` in #(
16740 *posix*) :
16741 set -o posix ;; #(
16742 *) :
16743 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016744esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016745fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016746
16747
Matthias Kloseb9621712010-04-24 17:59:49 +000016748as_nl='
16749'
16750export as_nl
16751# Printing a long string crashes Solaris 7 /usr/bin/printf.
16752as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16753as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16754as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16755# Prefer a ksh shell builtin over an external printf program on Solaris,
16756# but without wasting forks for bash or zsh.
16757if test -z "$BASH_VERSION$ZSH_VERSION" \
16758 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16759 as_echo='print -r --'
16760 as_echo_n='print -rn --'
16761elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16762 as_echo='printf %s\n'
16763 as_echo_n='printf %s'
16764else
16765 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16766 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16767 as_echo_n='/usr/ucb/echo -n'
16768 else
16769 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16770 as_echo_n_body='eval
16771 arg=$1;
16772 case $arg in #(
16773 *"$as_nl"*)
16774 expr "X$arg" : "X\\(.*\\)$as_nl";
16775 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16776 esac;
16777 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16778 '
16779 export as_echo_n_body
16780 as_echo_n='sh -c $as_echo_n_body as_echo'
16781 fi
16782 export as_echo_body
16783 as_echo='sh -c $as_echo_body as_echo'
16784fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
16786# The user is always right.
16787if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016788 PATH_SEPARATOR=:
16789 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16790 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16791 PATH_SEPARATOR=';'
16792 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016795
16796# IFS
16797# We need space, tab and new line, in precisely that order. Quoting is
16798# there to prevent editors from complaining about space-tab.
16799# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16800# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801IFS=" "" $as_nl"
16802
16803# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016804as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016805case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806 *[\\/]* ) as_myself=$0 ;;
16807 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016808for as_dir in $PATH
16809do
16810 IFS=$as_save_IFS
16811 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016812 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16813 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 ;;
16817esac
16818# We did not find ourselves, most probably we were run as `sh COMMAND'
16819# in which case we are not to be found in the path.
16820if test "x$as_myself" = x; then
16821 as_myself=$0
16822fi
16823if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016824 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16825 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016826fi
16827
Matthias Kloseb9621712010-04-24 17:59:49 +000016828# Unset variables that we do not need and which cause bugs (e.g. in
16829# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16830# suppresses any "Segmentation fault" message there. '((' could
16831# trigger a bug in pdksh 5.2.14.
16832for as_var in BASH_ENV ENV MAIL MAILPATH
16833do eval test x\${$as_var+set} = xset \
16834 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016835done
16836PS1='$ '
16837PS2='> '
16838PS4='+ '
16839
16840# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016841LC_ALL=C
16842export LC_ALL
16843LANGUAGE=C
16844export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016845
Matthias Kloseb9621712010-04-24 17:59:49 +000016846# CDPATH.
16847(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16848
16849
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016850# as_fn_error STATUS ERROR [LINENO LOG_FD]
16851# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016852# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16853# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016854# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016855as_fn_error ()
16856{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016857 as_status=$1; test $as_status -eq 0 && as_status=1
16858 if test "$4"; then
16859 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16860 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016861 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016862 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016863 as_fn_exit $as_status
16864} # as_fn_error
16865
16866
16867# as_fn_set_status STATUS
16868# -----------------------
16869# Set $? to STATUS, without forking.
16870as_fn_set_status ()
16871{
16872 return $1
16873} # as_fn_set_status
16874
16875# as_fn_exit STATUS
16876# -----------------
16877# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16878as_fn_exit ()
16879{
16880 set +e
16881 as_fn_set_status $1
16882 exit $1
16883} # as_fn_exit
16884
16885# as_fn_unset VAR
16886# ---------------
16887# Portably unset VAR.
16888as_fn_unset ()
16889{
16890 { eval $1=; unset $1;}
16891}
16892as_unset=as_fn_unset
16893# as_fn_append VAR VALUE
16894# ----------------------
16895# Append the text in VALUE to the end of the definition contained in VAR. Take
16896# advantage of any shell optimizations that allow amortized linear growth over
16897# repeated appends, instead of the typical quadratic growth present in naive
16898# implementations.
16899if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16900 eval 'as_fn_append ()
16901 {
16902 eval $1+=\$2
16903 }'
16904else
16905 as_fn_append ()
16906 {
16907 eval $1=\$$1\$2
16908 }
16909fi # as_fn_append
16910
16911# as_fn_arith ARG...
16912# ------------------
16913# Perform arithmetic evaluation on the ARGs, and store the result in the
16914# global $as_val. Take advantage of shells that can avoid forks. The arguments
16915# must be portable across $(()) and expr.
16916if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16917 eval 'as_fn_arith ()
16918 {
16919 as_val=$(( $* ))
16920 }'
16921else
16922 as_fn_arith ()
16923 {
16924 as_val=`expr "$@" || test $? -eq 1`
16925 }
16926fi # as_fn_arith
16927
16928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016929if expr a : '\(a\)' >/dev/null 2>&1 &&
16930 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16931 as_expr=expr
16932else
16933 as_expr=false
16934fi
16935
16936if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16937 as_basename=basename
16938else
16939 as_basename=false
16940fi
16941
Matthias Kloseb9621712010-04-24 17:59:49 +000016942if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16943 as_dirname=dirname
16944else
16945 as_dirname=false
16946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016948as_me=`$as_basename -- "$0" ||
16949$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16950 X"$0" : 'X\(//\)$' \| \
16951 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016952$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016953 sed '/^.*\/\([^/][^/]*\)\/*$/{
16954 s//\1/
16955 q
16956 }
16957 /^X\/\(\/\/\)$/{
16958 s//\1/
16959 q
16960 }
16961 /^X\/\(\/\).*/{
16962 s//\1/
16963 q
16964 }
16965 s/.*/./; q'`
16966
Matthias Kloseb9621712010-04-24 17:59:49 +000016967# Avoid depending upon Character Ranges.
16968as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16969as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16970as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16971as_cr_digits='0123456789'
16972as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016973
16974ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016975case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016977 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016979 xy) ECHO_C='\c';;
16980 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16981 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982 esac;;
16983*)
16984 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016985esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016986
Martin v. Löwis11437992002-04-12 09:54:03 +000016987rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988if test -d conf$$.dir; then
16989 rm -f conf$$.dir/conf$$.file
16990else
16991 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016992 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016994if (echo >conf$$.file) 2>/dev/null; then
16995 if ln -s conf$$.file conf$$ 2>/dev/null; then
16996 as_ln_s='ln -s'
16997 # ... but there are two gotchas:
16998 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16999 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017000 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017001 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017002 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017003 elif ln conf$$.file conf$$ 2>/dev/null; then
17004 as_ln_s=ln
17005 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017006 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017007 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017008else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017009 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17012rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017013
Matthias Kloseb9621712010-04-24 17:59:49 +000017014
17015# as_fn_mkdir_p
17016# -------------
17017# Create "$as_dir" as a directory, including parents if necessary.
17018as_fn_mkdir_p ()
17019{
17020
17021 case $as_dir in #(
17022 -*) as_dir=./$as_dir;;
17023 esac
17024 test -d "$as_dir" || eval $as_mkdir_p || {
17025 as_dirs=
17026 while :; do
17027 case $as_dir in #(
17028 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17029 *) as_qdir=$as_dir;;
17030 esac
17031 as_dirs="'$as_qdir' $as_dirs"
17032 as_dir=`$as_dirname -- "$as_dir" ||
17033$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17034 X"$as_dir" : 'X\(//\)[^/]' \| \
17035 X"$as_dir" : 'X\(//\)$' \| \
17036 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17037$as_echo X"$as_dir" |
17038 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17039 s//\1/
17040 q
17041 }
17042 /^X\(\/\/\)[^/].*/{
17043 s//\1/
17044 q
17045 }
17046 /^X\(\/\/\)$/{
17047 s//\1/
17048 q
17049 }
17050 /^X\(\/\).*/{
17051 s//\1/
17052 q
17053 }
17054 s/.*/./; q'`
17055 test -d "$as_dir" && break
17056 done
17057 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017058 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017059
17060
17061} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017062if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017063 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017064else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017065 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017066 as_mkdir_p=false
17067fi
17068
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017069
17070# as_fn_executable_p FILE
17071# -----------------------
17072# Test if FILE is an executable regular file.
17073as_fn_executable_p ()
17074{
17075 test -f "$1" && test -x "$1"
17076} # as_fn_executable_p
17077as_test_x='test -x'
17078as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017079
17080# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017081as_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 +000017082
17083# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017084as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017085
17086
Martin v. Löwis11437992002-04-12 09:54:03 +000017087exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017088## ----------------------------------- ##
17089## Main body of $CONFIG_STATUS script. ##
17090## ----------------------------------- ##
17091_ASEOF
17092test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017093
Matthias Kloseb9621712010-04-24 17:59:49 +000017094cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17095# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017096# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097# values after options handling.
17098ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017099This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017100generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017101
17102 CONFIG_FILES = $CONFIG_FILES
17103 CONFIG_HEADERS = $CONFIG_HEADERS
17104 CONFIG_LINKS = $CONFIG_LINKS
17105 CONFIG_COMMANDS = $CONFIG_COMMANDS
17106 $ $0 $@
17107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017108on `(hostname || uname -n) 2>/dev/null | sed 1q`
17109"
17110
Martin v. Löwis11437992002-04-12 09:54:03 +000017111_ACEOF
17112
Matthias Kloseb9621712010-04-24 17:59:49 +000017113case $ac_config_files in *"
17114"*) set x $ac_config_files; shift; ac_config_files=$*;;
17115esac
17116
17117case $ac_config_headers in *"
17118"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17119esac
17120
17121
17122cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017123# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017124config_files="$ac_config_files"
17125config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017127_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017128
Matthias Kloseb9621712010-04-24 17:59:49 +000017129cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017130ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017131\`$as_me' instantiates files and other configuration actions
17132from templates according to the current configuration. Unless the files
17133and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017136
17137 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017139 --config print configuration, then exit
17140 -q, --quiet, --silent
17141 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017142 -d, --debug don't remove temporary files
17143 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017144 --file=FILE[:TEMPLATE]
17145 instantiate the configuration file FILE
17146 --header=FILE[:TEMPLATE]
17147 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017148
17149Configuration files:
17150$config_files
17151
17152Configuration headers:
17153$config_headers
17154
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017155Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017158cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17159ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017160ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017161python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017162configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017163 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017164
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017165Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017166This config.status script is free software; the Free Software Foundation
17167gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017168
17169ac_pwd='$ac_pwd'
17170srcdir='$srcdir'
17171INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017172MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017173test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017174_ACEOF
17175
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17177# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017178ac_need_defaults=:
17179while test $# != 0
17180do
17181 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017182 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17184 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017185 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017186 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017187 --*=)
17188 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17189 ac_optarg=
17190 ac_shift=:
17191 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017193 ac_option=$1
17194 ac_optarg=$2
17195 ac_shift=shift
17196 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017197 esac
17198
Skip Montanaro6dead952003-09-25 14:50:04 +000017199 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017200 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017201 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17202 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017203 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017204 $as_echo "$ac_cs_version"; exit ;;
17205 --config | --confi | --conf | --con | --co | --c )
17206 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017208 debug=: ;;
17209 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017210 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017211 case $ac_optarg in
17212 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017213 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017214 esac
17215 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017216 ac_need_defaults=false;;
17217 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017218 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017219 case $ac_optarg in
17220 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17221 esac
17222 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224 --he | --h)
17225 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017226 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017227Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017229 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017230 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17231 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17232 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017233
17234 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017235 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017236Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017237
Matthias Kloseb9621712010-04-24 17:59:49 +000017238 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017240
17241 esac
17242 shift
17243done
17244
Skip Montanaro6dead952003-09-25 14:50:04 +000017245ac_configure_extra_args=
17246
17247if $ac_cs_silent; then
17248 exec 6>/dev/null
17249 ac_configure_extra_args="$ac_configure_extra_args --silent"
17250fi
17251
17252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017253cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017254if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017255 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017256 shift
17257 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17258 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017260 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017261fi
17262
Martin v. Löwis11437992002-04-12 09:54:03 +000017263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017264cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265exec 5>>config.log
17266{
17267 echo
17268 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17269## Running $as_me. ##
17270_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017271 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017272} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017275cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017277
Matthias Kloseb9621712010-04-24 17:59:49 +000017278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279
17280# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017281for ac_config_target in $ac_config_targets
17282do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283 case $ac_config_target in
17284 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17285 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17286 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017287 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17288 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17290 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017291 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017292 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017293 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017294
Victor Stinnere0be4232011-10-25 13:06:09 +020017295 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017296 esac
17297done
17298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299
Martin v. Löwis11437992002-04-12 09:54:03 +000017300# If the user did not use the arguments to specify the items to instantiate,
17301# then the envvar interface is used. Set only those that are not.
17302# We use the long form for the default assignment because of an extremely
17303# bizarre bug on SunOS 4.1.3.
17304if $ac_need_defaults; then
17305 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17306 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17307fi
17308
Skip Montanaro6dead952003-09-25 14:50:04 +000017309# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017311# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017312# Hook for its removal unless debugging.
17313# Note that there is a small window in which the directory will not be cleaned:
17314# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017315$debug ||
17316{
Victor Stinnere0be4232011-10-25 13:06:09 +020017317 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017319 : "${ac_tmp:=$tmp}"
17320 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017322 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017323}
Martin v. Löwis11437992002-04-12 09:54:03 +000017324# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017325
Martin v. Löwis11437992002-04-12 09:54:03 +000017326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017328 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017329} ||
17330{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331 tmp=./conf$$-$RANDOM
17332 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017333} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017334ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017335
Matthias Kloseb9621712010-04-24 17:59:49 +000017336# Set up the scripts for CONFIG_FILES section.
17337# No need to generate them if there are no CONFIG_FILES.
17338# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017340
Matthias Kloseb9621712010-04-24 17:59:49 +000017341
17342ac_cr=`echo X | tr X '\015'`
17343# On cygwin, bash can eat \r inside `` if the user requested igncr.
17344# But we know of no other shell where ac_cr would be empty at this
17345# point, so we can use a bashism as a fallback.
17346if test "x$ac_cr" = x; then
17347 eval ac_cr=\$\'\\r\'
17348fi
17349ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17350if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017351 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017352else
17353 ac_cs_awk_cr=$ac_cr
17354fi
17355
Victor Stinnere0be4232011-10-25 13:06:09 +020017356echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017357_ACEOF
17358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359
Matthias Kloseb9621712010-04-24 17:59:49 +000017360{
17361 echo "cat >conf$$subs.awk <<_ACEOF" &&
17362 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17363 echo "_ACEOF"
17364} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017365 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17366ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367ac_delim='%!_!# '
17368for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017369 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017370 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371
Matthias Kloseb9621712010-04-24 17:59:49 +000017372 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17373 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017374 break
17375 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017376 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 else
17378 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017379 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380done
Matthias Kloseb9621712010-04-24 17:59:49 +000017381rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382
Matthias Kloseb9621712010-04-24 17:59:49 +000017383cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017384cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017386sed -n '
17387h
17388s/^/S["/; s/!.*/"]=/
17389p
17390g
17391s/^[^!]*!//
17392:repl
17393t repl
17394s/'"$ac_delim"'$//
17395t delim
17396:nl
17397h
17398s/\(.\{148\}\)..*/\1/
17399t more1
17400s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17401p
17402n
17403b repl
17404:more1
17405s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17406p
17407g
17408s/.\{148\}//
17409t nl
17410:delim
17411h
17412s/\(.\{148\}\)..*/\1/
17413t more2
17414s/["\\]/\\&/g; s/^/"/; s/$/"/
17415p
17416b
17417:more2
17418s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17419p
17420g
17421s/.\{148\}//
17422t delim
17423' <conf$$subs.awk | sed '
17424/^[^""]/{
17425 N
17426 s/\n//
17427}
17428' >>$CONFIG_STATUS || ac_write_fail=1
17429rm -f conf$$subs.awk
17430cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17431_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017432cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017433 for (key in S) S_is_set[key] = 1
17434 FS = ""
17435
17436}
17437{
17438 line = $ 0
17439 nfields = split(line, field, "@")
17440 substed = 0
17441 len = length(field[1])
17442 for (i = 2; i < nfields; i++) {
17443 key = field[i]
17444 keylen = length(key)
17445 if (S_is_set[key]) {
17446 value = S[key]
17447 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17448 len += length(value) + length(field[++i])
17449 substed = 1
17450 } else
17451 len += 1 + keylen
17452 }
17453
17454 print line
17455}
17456
17457_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017459cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17460if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17461 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17462else
17463 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017464fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017465 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017466_ACEOF
17467
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017468# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17469# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470# trailing colons and then remove the whole line if VPATH becomes empty
17471# (actually we leave an empty line to preserve line numbers).
17472if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017473 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17474h
17475s///
17476s/^/:/
17477s/[ ]*$/:/
17478s/:\$(srcdir):/:/g
17479s/:\${srcdir}:/:/g
17480s/:@srcdir@:/:/g
17481s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017483x
17484s/\(=[ ]*\).*/\1/
17485G
17486s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487s/^[^=]*=[ ]*$//
17488}'
17489fi
17490
Matthias Kloseb9621712010-04-24 17:59:49 +000017491cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017492fi # test -n "$CONFIG_FILES"
17493
Matthias Kloseb9621712010-04-24 17:59:49 +000017494# Set up the scripts for CONFIG_HEADERS section.
17495# No need to generate them if there are no CONFIG_HEADERS.
17496# This happens for instance with `./config.status Makefile'.
17497if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017498cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017499BEGIN {
17500_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501
Matthias Kloseb9621712010-04-24 17:59:49 +000017502# Transform confdefs.h into an awk script `defines.awk', embedded as
17503# here-document in config.status, that substitutes the proper values into
17504# config.h.in to produce config.h.
17505
17506# Create a delimiter string that does not exist in confdefs.h, to ease
17507# handling of long lines.
17508ac_delim='%!_!# '
17509for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017510 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17511 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017512 break
17513 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017514 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017515 else
17516 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17517 fi
17518done
17519
17520# For the awk script, D is an array of macro values keyed by name,
17521# likewise P contains macro parameters if any. Preserve backslash
17522# newline sequences.
17523
17524ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17525sed -n '
17526s/.\{148\}/&'"$ac_delim"'/g
17527t rset
17528:rset
17529s/^[ ]*#[ ]*define[ ][ ]*/ /
17530t def
17531d
17532:def
17533s/\\$//
17534t bsnl
17535s/["\\]/\\&/g
17536s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17537D["\1"]=" \3"/p
17538s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17539d
17540:bsnl
17541s/["\\]/\\&/g
17542s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17543D["\1"]=" \3\\\\\\n"\\/p
17544t cont
17545s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17546t cont
17547d
17548:cont
17549n
17550s/.\{148\}/&'"$ac_delim"'/g
17551t clear
17552:clear
17553s/\\$//
17554t bsnlc
17555s/["\\]/\\&/g; s/^/"/; s/$/"/p
17556d
17557:bsnlc
17558s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17559b cont
17560' <confdefs.h | sed '
17561s/'"$ac_delim"'/"\\\
17562"/g' >>$CONFIG_STATUS || ac_write_fail=1
17563
17564cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17565 for (key in D) D_is_set[key] = 1
17566 FS = ""
17567}
17568/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17569 line = \$ 0
17570 split(line, arg, " ")
17571 if (arg[1] == "#") {
17572 defundef = arg[2]
17573 mac1 = arg[3]
17574 } else {
17575 defundef = substr(arg[1], 2)
17576 mac1 = arg[2]
17577 }
17578 split(mac1, mac2, "(") #)
17579 macro = mac2[1]
17580 prefix = substr(line, 1, index(line, defundef) - 1)
17581 if (D_is_set[macro]) {
17582 # Preserve the white space surrounding the "#".
17583 print prefix "define", macro P[macro] D[macro]
17584 next
17585 } else {
17586 # Replace #undef with comments. This is necessary, for example,
17587 # in the case of _POSIX_SOURCE, which is predefined and required
17588 # on some systems where configure will not decide to define it.
17589 if (defundef == "undef") {
17590 print "/*", prefix defundef, macro, "*/"
17591 next
17592 }
17593 }
17594}
17595{ print }
17596_ACAWK
17597_ACEOF
17598cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017599 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017600fi # test -n "$CONFIG_HEADERS"
17601
17602
17603eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17604shift
17605for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606do
17607 case $ac_tag in
17608 :[FHLC]) ac_mode=$ac_tag; continue;;
17609 esac
17610 case $ac_mode$ac_tag in
17611 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017612 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613 :[FH]-) ac_tag=-:-;;
17614 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17615 esac
17616 ac_save_IFS=$IFS
17617 IFS=:
17618 set x $ac_tag
17619 IFS=$ac_save_IFS
17620 shift
17621 ac_file=$1
17622 shift
17623
17624 case $ac_mode in
17625 :L) ac_source=$1;;
17626 :[FH])
17627 ac_file_inputs=
17628 for ac_f
17629 do
17630 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017631 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 *) # Look for the file first in the build tree, then in the source tree
17633 # (if the path is not absolute). The absolute path cannot be DOS-style,
17634 # because $ac_f cannot contain `:'.
17635 test -f "$ac_f" ||
17636 case $ac_f in
17637 [\\/$]*) false;;
17638 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17639 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017640 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017642 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17643 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644 done
17645
17646 # Let's still pretend it is `configure' which instantiates (i.e., don't
17647 # use $as_me), people would be surprised to read:
17648 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017649 configure_input='Generated from '`
17650 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17651 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652 if test x"$ac_file" != x-; then
17653 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017654 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17655$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017657 # Neutralize special characters interpreted by sed in replacement strings.
17658 case $configure_input in #(
17659 *\&* | *\|* | *\\* )
17660 ac_sed_conf_input=`$as_echo "$configure_input" |
17661 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17662 *) ac_sed_conf_input=$configure_input;;
17663 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664
17665 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017666 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17667 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668 esac
17669 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017670 esac
17671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017673$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017674 X"$ac_file" : 'X\(//\)[^/]' \| \
17675 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017676 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017677$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17679 s//\1/
17680 q
17681 }
17682 /^X\(\/\/\)[^/].*/{
17683 s//\1/
17684 q
17685 }
17686 /^X\(\/\/\)$/{
17687 s//\1/
17688 q
17689 }
17690 /^X\(\/\).*/{
17691 s//\1/
17692 q
17693 }
17694 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017695 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017696 ac_builddir=.
17697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698case "$ac_dir" in
17699.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17700*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017701 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017703 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 case $ac_top_builddir_sub in
17705 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17706 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17707 esac ;;
17708esac
17709ac_abs_top_builddir=$ac_pwd
17710ac_abs_builddir=$ac_pwd$ac_dir_suffix
17711# for backward compatibility:
17712ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017713
17714case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017716 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 ac_top_srcdir=$ac_top_builddir_sub
17718 ac_abs_top_srcdir=$ac_pwd ;;
17719 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017720 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 ac_top_srcdir=$srcdir
17722 ac_abs_top_srcdir=$srcdir ;;
17723 *) # Relative name.
17724 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17725 ac_top_srcdir=$ac_top_build_prefix$srcdir
17726 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017727esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017729
Martin v. Löwis11437992002-04-12 09:54:03 +000017730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731 case $ac_mode in
17732 :F)
17733 #
17734 # CONFIG_FILE
17735 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017736
17737 case $INSTALL in
17738 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017740 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017741 ac_MKDIR_P=$MKDIR_P
17742 case $MKDIR_P in
17743 [\\/$]* | ?:[\\/]* ) ;;
17744 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17745 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017746_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747
Matthias Kloseb9621712010-04-24 17:59:49 +000017748cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749# If the template does not know about datarootdir, expand it.
17750# FIXME: This hack should be removed a few years after 2.60.
17751ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017752ac_sed_dataroot='
17753/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754 p
17755 q
17756}
17757/@datadir@/p
17758/@docdir@/p
17759/@infodir@/p
17760/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017761/@mandir@/p'
17762case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763*datarootdir*) ac_datarootdir_seen=yes;;
17764*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17766$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017768cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769 ac_datarootdir_hack='
17770 s&@datadir@&$datadir&g
17771 s&@docdir@&$docdir&g
17772 s&@infodir@&$infodir&g
17773 s&@localedir@&$localedir&g
17774 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017775 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776esac
17777_ACEOF
17778
17779# Neutralize VPATH when `$srcdir' = `.'.
17780# Shell code in configure.ac might set extrasub.
17781# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017782cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17783ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017784$extrasub
17785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017787:t
17788/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017789s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017791s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792s&@srcdir@&$ac_srcdir&;t t
17793s&@abs_srcdir@&$ac_abs_srcdir&;t t
17794s&@top_srcdir@&$ac_top_srcdir&;t t
17795s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17796s&@builddir@&$ac_builddir&;t t
17797s&@abs_builddir@&$ac_abs_builddir&;t t
17798s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17799s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017800s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017802"
Victor Stinnere0be4232011-10-25 13:06:09 +020017803eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17804 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017807 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17808 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17809 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017811which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017812$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017813which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017814
Victor Stinnere0be4232011-10-25 13:06:09 +020017815 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017817 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17818 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017819 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017820 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821 ;;
17822 :H)
17823 #
17824 # CONFIG_HEADER
17825 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017826 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017827 {
17828 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017829 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17830 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017831 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017832 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017833 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17834$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017836 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017837 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017838 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017839 fi
17840 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017841 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017842 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017843 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017844 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847
17848 esac
17849
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017850
17851 case $ac_file$ac_mode in
17852 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17853
17854 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855done # for ac_tag
17856
Guido van Rossum627b2d71993-12-24 10:39:16 +000017857
Matthias Kloseb9621712010-04-24 17:59:49 +000017858as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017859_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017860ac_clean_files=$ac_clean_files_save
17861
Matthias Kloseb9621712010-04-24 17:59:49 +000017862test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017863 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017864
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
17866# configure is writing to config.log, and then calls config.status.
17867# config.status does its own redirection, appending to config.log.
17868# Unfortunately, on DOS this fails, as config.log is still kept open
17869# by configure, so config.status won't be able to write to it; its
17870# output is simply discarded. So we exec the FD to /dev/null,
17871# effectively closing config.log, so it can be properly (re)opened and
17872# appended to by config.status. When coming back to configure, we
17873# need to make the FD available again.
17874if test "$no_create" != yes; then
17875 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017876 ac_config_status_args=
17877 test "$silent" = yes &&
17878 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017879 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017880 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017881 exec 5>>config.log
17882 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17883 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017884 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017885fi
17886if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17888$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017889fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017890
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017891
Christian Heimes75ed8902013-11-20 01:11:18 +010017892echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017893if test ! -f Modules/Setup
17894then
17895 cp $srcdir/Modules/Setup.dist Modules/Setup
17896fi
17897
Christian Heimes75ed8902013-11-20 01:11:18 +010017898echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017899if test ! -f Modules/Setup.local
17900then
17901 echo "# Edit this file for local setup changes" >Modules/Setup.local
17902fi
17903
Christian Heimes75ed8902013-11-20 01:11:18 +010017904echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017905$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17906 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017907 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017908mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017909
17910if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17911 echo "" >&6
17912 echo "" >&6
17913 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17914 echo "please run ./configure --with-optimizations" >&6
17915 echo "" >&6
17916 echo "" >&6
17917fi
17918