blob: 73a974eb00931eda5a3b837376e202c83d1ad3ae [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.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
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'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
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
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200683ac_ct_READELF
684READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000685ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200686ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000687AR
688RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000689USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000690GNULD
691LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000693RUNSHARED
694INSTSONAME
695LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000696PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BLDLIBRARY
698DLLLIBRARY
699LDLIBRARY
700LIBRARY
701BUILDEXEEXT
702EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200703NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200704MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200705PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200706PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200708ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000709MAINCC
710CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711GREP
712CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720EXPORT_MACOSX_DEPLOYMENT_TARGET
721CONFIGURE_MACOSX_DEPLOYMENT_TARGET
722SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200723_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000724MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000725FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000726FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800727FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000743GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200744PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200745PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500754HAS_HG
755HGBRANCH
756HGTAG
757HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400758BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
Benjamin Petersoned4aa832016-09-05 17:44:18 -0700778runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000779localstatedir
780sharedstatedir
781sysconfdir
782datadir
783datarootdir
784libexecdir
785sbindir
786bindir
787program_transform_name
788prefix
789exec_prefix
790PACKAGE_URL
791PACKAGE_BUGREPORT
792PACKAGE_STRING
793PACKAGE_VERSION
794PACKAGE_TARNAME
795PACKAGE_NAME
796PATH_SEPARATOR
797SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000798ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000799ac_user_opts='
800enable_option_checking
801enable_universalsdk
802with_universal_archs
803with_framework_name
804enable_framework
805with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600806with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_cxx_main
808with_suffix
809enable_shared
810enable_profiling
811with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700812with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100813with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100814with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_libs
816with_system_expat
817with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100818with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000819enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700820with_tcltk_includes
821with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_dbmliborder
823with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_threads
825with_thread
826enable_ipv6
827with_doc_strings
828with_tsc
829with_pymalloc
830with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_fpectl
832with_libm
833with_libc
834enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800836with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000837'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 ac_precious_vars='build_alias
839host_alias
840target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100841MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842CC
843CFLAGS
844LDFLAGS
845LIBS
846CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100847CPP
848PKG_CONFIG
849PKG_CONFIG_PATH
850PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854ac_init_help=
855ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000856ac_unrecognized_opts=
857ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# The variables have the same names as the options, with
859# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863no_recursion=
864prefix=NONE
865program_prefix=NONE
866program_suffix=NONE
867program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872x_includes=NONE
873x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000874
875# Installation directory options.
876# These are left unexpanded so users can "make install exec_prefix=/foo"
877# and all the variables that are supposed to be based on exec_prefix
878# by default will actually change.
879# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881bindir='${exec_prefix}/bin'
882sbindir='${exec_prefix}/sbin'
883libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884datarootdir='${prefix}/share'
885datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886sysconfdir='${prefix}/etc'
887sharedstatedir='${prefix}/com'
888localstatedir='${prefix}/var'
Benjamin Petersoned4aa832016-09-05 17:44:18 -0700889runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890includedir='${prefix}/include'
891oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
893infodir='${datarootdir}/info'
894htmldir='${docdir}'
895dvidir='${docdir}'
896pdfdir='${docdir}'
897psdir='${docdir}'
898libdir='${exec_prefix}/lib'
899localedir='${datarootdir}/locale'
900mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 # If the previous option needs an argument, assign it.
907 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 ac_prev=
910 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200914 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
915 *=) ac_optarg= ;;
916 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 # Accept the important Cygnus configure options, so we can diagnose typos.
920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_dashdash$ac_option in
922 --)
923 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -bindir | --bindir | --bindi | --bind | --bin | --bi)
926 ac_prev=bindir ;;
927 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
930 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 -cache-file | --cache-file | --cache-fil | --cache-fi \
936 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
937 ac_prev=cache_file ;;
938 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
939 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 cache_file=$ac_optarg ;;
941
942 --config-cache | -C)
943 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
951 | --dataroo | --dataro | --datar)
952 ac_prev=datarootdir ;;
953 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
954 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
955 datarootdir=$ac_optarg ;;
956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200961 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt_orig=$ac_useropt
963 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
964 case $ac_user_opts in
965 *"
966"enable_$ac_useropt"
967"*) ;;
968 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
969 ac_unrecognized_sep=', ';;
970 esac
971 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972
973 -docdir | --docdir | --docdi | --doc | --do)
974 ac_prev=docdir ;;
975 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
976 docdir=$ac_optarg ;;
977
978 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
979 ac_prev=dvidir ;;
980 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
981 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1000 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1001 | --exec | --exe | --ex)
1002 ac_prev=exec_prefix ;;
1003 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1004 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1005 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 # Obsolete; use --with-gas.
1010 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 -help | --help | --hel | --he | -h)
1013 ac_init_help=long ;;
1014 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1015 ac_init_help=recursive ;;
1016 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1017 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001024 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1025 ac_prev=htmldir ;;
1026 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1027 | --ht=*)
1028 htmldir=$ac_optarg ;;
1029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -includedir | --includedir | --includedi | --included | --include \
1031 | --includ | --inclu | --incl | --inc)
1032 ac_prev=includedir ;;
1033 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1034 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -infodir | --infodir | --infodi | --infod | --info | --inf)
1038 ac_prev=infodir ;;
1039 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libdir | --libdir | --libdi | --libd)
1043 ac_prev=libdir ;;
1044 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1048 | --libexe | --libex | --libe)
1049 ac_prev=libexecdir ;;
1050 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1051 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -localedir | --localedir | --localedi | --localed | --locale)
1055 ac_prev=localedir ;;
1056 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1057 localedir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 ac_prev=localstatedir ;;
1062 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1067 ac_prev=mandir ;;
1068 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 # Obsolete; use --without-fp.
1073 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 no_create=yes ;;
1078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1080 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1081 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1084 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1085 | --oldin | --oldi | --old | --ol | --o)
1086 ac_prev=oldincludedir ;;
1087 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1088 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1089 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1093 ac_prev=prefix ;;
1094 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1098 | --program-pre | --program-pr | --program-p)
1099 ac_prev=program_prefix ;;
1100 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1101 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1105 | --program-suf | --program-su | --program-s)
1106 ac_prev=program_suffix ;;
1107 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1108 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-transform-name | --program-transform-name \
1112 | --program-transform-nam | --program-transform-na \
1113 | --program-transform-n | --program-transform- \
1114 | --program-transform | --program-transfor \
1115 | --program-transfo | --program-transf \
1116 | --program-trans | --program-tran \
1117 | --progr-tra | --program-tr | --program-t)
1118 ac_prev=program_transform_name ;;
1119 -program-transform-name=* | --program-transform-name=* \
1120 | --program-transform-nam=* | --program-transform-na=* \
1121 | --program-transform-n=* | --program-transform-=* \
1122 | --program-transform=* | --program-transfor=* \
1123 | --program-transfo=* | --program-transf=* \
1124 | --program-trans=* | --program-tran=* \
1125 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001128 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1129 ac_prev=pdfdir ;;
1130 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1131 pdfdir=$ac_optarg ;;
1132
1133 -psdir | --psdir | --psdi | --psd | --ps)
1134 ac_prev=psdir ;;
1135 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1136 psdir=$ac_optarg ;;
1137
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139 | -silent | --silent | --silen | --sile | --sil)
1140 silent=yes ;;
1141
Benjamin Petersoned4aa832016-09-05 17:44:18 -07001142 -runstatedir | --runstatedir | --runstatedi | --runstated \
1143 | --runstate | --runstat | --runsta | --runst | --runs \
1144 | --run | --ru | --r)
1145 ac_prev=runstatedir ;;
1146 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1147 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1148 | --run=* | --ru=* | --r=*)
1149 runstatedir=$ac_optarg ;;
1150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152 ac_prev=sbindir ;;
1153 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
1157 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159 | --sharedst | --shareds | --shared | --share | --shar \
1160 | --sha | --sh)
1161 ac_prev=sharedstatedir ;;
1162 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 -site | --site | --sit)
1169 ac_prev=site ;;
1170 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174 ac_prev=srcdir ;;
1175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179 | --syscon | --sysco | --sysc | --sys | --sy)
1180 ac_prev=sysconfdir ;;
1181 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191 verbose=yes ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 -version | --version | --versio | --versi | --vers | -V)
1194 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 --x)
1229 # Obsolete; use --with-x.
1230 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233 | --x-incl | --x-inc | --x-in | --x-i)
1234 ac_prev=x_includes ;;
1235 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241 ac_prev=x_libraries ;;
1242 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ;;
1249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 *=*)
1251 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 case $ac_envvar in #(
1254 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 export $ac_envvar ;;
1259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001265 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ;;
1267
1268 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269done
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274fi
1275
Matthias Kloseb9621712010-04-24 17:59:49 +00001276if test -n "$ac_unrecognized_opts"; then
1277 case $enable_option_checking in
1278 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281 esac
1282fi
1283
1284# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286 datadir sysconfdir sharedstatedir localstatedir includedir \
1287 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersoned4aa832016-09-05 17:44:18 -07001288 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 # Remove trailing slashes.
1292 case $ac_val in
1293 */ )
1294 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295 eval $ac_var=\$ac_val;;
1296 esac
1297 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 [\\/$]* | ?:[\\/]* ) continue;;
1300 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# There might be people who depend on the old broken behavior: `$host'
1306# used to hold the argument of --host etc.
1307# FIXME: To remove some day.
1308build=$build_alias
1309host=$host_alias
1310target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# FIXME: To remove some day.
1313if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 elif test "x$build_alias" != "x$host_alias"; then
1317 cross_compiling=yes
1318 fi
1319fi
1320
1321ac_tool_prefix=
1322test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324test "$silent" = yes && exec 6>/dev/null
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328ac_ls_di=`ls -di .` &&
1329ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335# Find the source files, if location was not specified.
1336if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 ac_confdir=`$as_dirname -- "$as_myself" ||
1340$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341 X"$as_myself" : 'X\(//\)[^/]' \| \
1342 X"$as_myself" : 'X\(//\)$' \| \
1343 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)[^/].*/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\).*/{
1358 s//\1/
1359 q
1360 }
1361 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 srcdir=..
1365 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366else
1367 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369if test ! -r "$srcdir/$ac_unique_file"; then
1370 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 pwd)`
1377# When building in place, set srcdir=.
1378if test "$ac_abs_confdir" = "$ac_pwd"; then
1379 srcdir=.
1380fi
1381# Remove unnecessary trailing slashes from srcdir.
1382# Double slashes in file names in object file debugging info
1383# mess up M-x gdb in Emacs.
1384case $srcdir in
1385*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386esac
1387for ac_var in $ac_precious_vars; do
1388 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_env_${ac_var}_value=\$${ac_var}
1390 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394#
1395# Report the --help message.
1396#
1397if test "$ac_init_help" = "long"; then
1398 # Omit some internal or obsolete options to make the list less imposing.
1399 # This message is too long to be a string in the A/UX 3.1 sh.
1400 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001401\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406VAR=VALUE. See below for descriptions of some of the useful variables.
1407
1408Defaults for the options are specified in brackets.
1409
1410Configuration:
1411 -h, --help display this help and exit
1412 --help=short display options specific to this package
1413 --help=recursive display the short help of all the included packages
1414 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001415 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --cache-file=FILE cache test results in FILE [disabled]
1417 -C, --config-cache alias for \`--cache-file=config.cache'
1418 -n, --no-create do not create output files
1419 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1420
Martin v. Löwis11437992002-04-12 09:54:03 +00001421Installation directories:
1422 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427By default, \`make install' will install all the files in
1428\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1429an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430for instance \`--prefix=\$HOME'.
1431
1432For better control, use the options below.
1433
1434Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --bindir=DIR user executables [EPREFIX/bin]
1436 --sbindir=DIR system admin executables [EPREFIX/sbin]
1437 --libexecdir=DIR program executables [EPREFIX/libexec]
1438 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1439 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1440 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersoned4aa832016-09-05 17:44:18 -07001441 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001467 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 cat <<\_ACEOF
1470
1471Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1474 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001475 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001476 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
1478 Build (MacOSX|Darwin) framework
1479 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001480 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-threads[=DIRECTORY]
1526 disable/enable thread support
1527 --with(out)-thread[=DIRECTORY]
1528 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001530 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-fpectl enable SIGFPE catching
1534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001624python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
1977# ac_fn_c_find_uintX_t LINENO BITS VAR
1978# ------------------------------------
1979# Finds an unsigned integer type with width BITS, setting cache variable VAR
1980# accordingly.
1981ac_fn_c_find_uintX_t ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1985$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001986if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001987 $as_echo_n "(cached) " >&6
1988else
1989 eval "$3=no"
1990 # Order is important - never check a type that is potentially smaller
1991 # than half of the expected target width.
1992 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1993 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$ac_includes_default
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002001test_array [0] = 0;
2002return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 case $ac_type in #(
2010 uint$2_t) :
2011 eval "$3=yes" ;; #(
2012 *) :
2013 eval "$3=\$ac_type" ;;
2014esac
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002017 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019else
2020 break
2021fi
2022 done
2023fi
2024eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029} # ac_fn_c_find_uintX_t
2030
2031# ac_fn_c_find_intX_t LINENO BITS VAR
2032# -----------------------------------
2033# Finds a signed integer type with width BITS, setting cache variable VAR
2034# accordingly.
2035ac_fn_c_find_intX_t ()
2036{
2037 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2039$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002040if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002041 $as_echo_n "(cached) " >&6
2042else
2043 eval "$3=no"
2044 # Order is important - never check a type that is potentially smaller
2045 # than half of the expected target width.
2046 for ac_type in int$2_t 'int' 'long int' \
2047 'long long int' 'short int' 'signed char'; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002051 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002052int
2053main ()
2054{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002055static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002056test_array [0] = 0;
2057return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065/* end confdefs.h. */
2066$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002067 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002068int
2069main ()
2070{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002071static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002072 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002073test_array [0] = 0;
2074return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081
2082else
2083 case $ac_type in #(
2084 int$2_t) :
2085 eval "$3=yes" ;; #(
2086 *) :
2087 eval "$3=\$ac_type" ;;
2088esac
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002093 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095else
2096 break
2097fi
2098 done
2099fi
2100eval ac_res=\$$3
2101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2102$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002103 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002104
2105} # ac_fn_c_find_intX_t
2106
2107# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2108# --------------------------------------------
2109# Tries to find the compile-time value of EXPR in a program that includes
2110# INCLUDES, setting VAR accordingly. Returns whether the value could be
2111# computed
2112ac_fn_c_compute_int ()
2113{
2114 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2115 if test "$cross_compiling" = yes; then
2116 # Depending upon the size, compute the lo and hi bounds.
2117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120int
2121main ()
2122{
2123static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002124test_array [0] = 0;
2125return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002126
2127 ;
2128 return 0;
2129}
2130_ACEOF
2131if ac_fn_c_try_compile "$LINENO"; then :
2132 ac_lo=0 ac_mid=0
2133 while :; do
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137int
2138main ()
2139{
2140static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002141test_array [0] = 0;
2142return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002143
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_compile "$LINENO"; then :
2149 ac_hi=$ac_mid; break
2150else
2151 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2152 if test $ac_lo -le $ac_mid; then
2153 ac_lo= ac_hi=
2154 break
2155 fi
2156 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2157fi
2158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2159 done
2160else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164int
2165main ()
2166{
2167static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002168test_array [0] = 0;
2169return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002170
2171 ;
2172 return 0;
2173}
2174_ACEOF
2175if ac_fn_c_try_compile "$LINENO"; then :
2176 ac_hi=-1 ac_mid=-1
2177 while :; do
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180$4
2181int
2182main ()
2183{
2184static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002185test_array [0] = 0;
2186return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002187
2188 ;
2189 return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_compile "$LINENO"; then :
2193 ac_lo=$ac_mid; break
2194else
2195 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2196 if test $ac_mid -le $ac_hi; then
2197 ac_lo= ac_hi=
2198 break
2199 fi
2200 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2201fi
2202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203 done
2204else
2205 ac_lo= ac_hi=
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208fi
2209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210# Binary search between lo and hi bounds.
2211while test "x$ac_lo" != "x$ac_hi"; do
2212 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h. */
2215$4
2216int
2217main ()
2218{
2219static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002220test_array [0] = 0;
2221return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002222
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_compile "$LINENO"; then :
2228 ac_hi=$ac_mid
2229else
2230 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2231fi
2232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2233done
2234case $ac_lo in #((
2235?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2236'') ac_retval=1 ;;
2237esac
2238 else
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
2241$4
2242static long int longval () { return $2; }
2243static unsigned long int ulongval () { return $2; }
2244#include <stdio.h>
2245#include <stdlib.h>
2246int
2247main ()
2248{
2249
2250 FILE *f = fopen ("conftest.val", "w");
2251 if (! f)
2252 return 1;
2253 if (($2) < 0)
2254 {
2255 long int i = longval ();
2256 if (i != ($2))
2257 return 1;
2258 fprintf (f, "%ld", i);
2259 }
2260 else
2261 {
2262 unsigned long int i = ulongval ();
2263 if (i != ($2))
2264 return 1;
2265 fprintf (f, "%lu", i);
2266 }
2267 /* Do not output a trailing newline, as this causes \r\n confusion
2268 on some platforms. */
2269 return ferror (f) || fclose (f) != 0;
2270
2271 ;
2272 return 0;
2273}
2274_ACEOF
2275if ac_fn_c_try_run "$LINENO"; then :
2276 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2277else
2278 ac_retval=1
2279fi
2280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2281 conftest.$ac_objext conftest.beam conftest.$ac_ext
2282rm -f conftest.val
2283
2284 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002285 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002286 as_fn_set_status $ac_retval
2287
2288} # ac_fn_c_compute_int
2289
2290# ac_fn_c_check_func LINENO FUNC VAR
2291# ----------------------------------
2292# Tests whether FUNC exists, setting the cache variable VAR accordingly
2293ac_fn_c_check_func ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2297$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002298if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2304 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2305#define $2 innocuous_$2
2306
2307/* System header to define __stub macros and hopefully few prototypes,
2308 which can conflict with char $2 (); below.
2309 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2310 <limits.h> exists even on freestanding compilers. */
2311
2312#ifdef __STDC__
2313# include <limits.h>
2314#else
2315# include <assert.h>
2316#endif
2317
2318#undef $2
2319
2320/* Override any GCC internal prototype to avoid an error.
2321 Use char because int might match the return type of a GCC
2322 builtin and then its argument prototype would still apply. */
2323#ifdef __cplusplus
2324extern "C"
2325#endif
2326char $2 ();
2327/* The GNU C library defines this for functions which it implements
2328 to always fail with ENOSYS. Some functions are actually named
2329 something starting with __ and the normal name is an alias. */
2330#if defined __stub_$2 || defined __stub___$2
2331choke me
2332#endif
2333
2334int
2335main ()
2336{
2337return $2 ();
2338 ;
2339 return 0;
2340}
2341_ACEOF
2342if ac_fn_c_try_link "$LINENO"; then :
2343 eval "$3=yes"
2344else
2345 eval "$3=no"
2346fi
2347rm -f core conftest.err conftest.$ac_objext \
2348 conftest$ac_exeext conftest.$ac_ext
2349fi
2350eval ac_res=\$$3
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002354
2355} # ac_fn_c_check_func
2356
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002357# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2358# ---------------------------------------------
2359# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2360# accordingly.
2361ac_fn_c_check_decl ()
2362{
2363 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364 as_decl_name=`echo $2|sed 's/ *(.*//'`
2365 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2367$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2368if eval \${$3+:} false; then :
2369 $as_echo_n "(cached) " >&6
2370else
2371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372/* end confdefs.h. */
2373$4
2374int
2375main ()
2376{
2377#ifndef $as_decl_name
2378#ifdef __cplusplus
2379 (void) $as_decl_use;
2380#else
2381 (void) $as_decl_name;
2382#endif
2383#endif
2384
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389if ac_fn_c_try_compile "$LINENO"; then :
2390 eval "$3=yes"
2391else
2392 eval "$3=no"
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396eval ac_res=\$$3
2397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2398$as_echo "$ac_res" >&6; }
2399 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2400
2401} # ac_fn_c_check_decl
2402
Matthias Kloseb9621712010-04-24 17:59:49 +00002403# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2404# ----------------------------------------------------
2405# Tries to find if the field MEMBER exists in type AGGR, after including
2406# INCLUDES, setting cache variable VAR accordingly.
2407ac_fn_c_check_member ()
2408{
2409 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2411$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002412if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 $as_echo_n "(cached) " >&6
2414else
2415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h. */
2417$5
2418int
2419main ()
2420{
2421static $2 ac_aggr;
2422if (ac_aggr.$3)
2423return 0;
2424 ;
2425 return 0;
2426}
2427_ACEOF
2428if ac_fn_c_try_compile "$LINENO"; then :
2429 eval "$4=yes"
2430else
2431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h. */
2433$5
2434int
2435main ()
2436{
2437static $2 ac_aggr;
2438if (sizeof ac_aggr.$3)
2439return 0;
2440 ;
2441 return 0;
2442}
2443_ACEOF
2444if ac_fn_c_try_compile "$LINENO"; then :
2445 eval "$4=yes"
2446else
2447 eval "$4=no"
2448fi
2449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452fi
2453eval ac_res=\$$4
2454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2455$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002456 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002457
2458} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002460This file contains any messages produced by compilers while
2461running configure, to aid debugging if configure makes a mistake.
2462
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002463It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002464generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002465
2466 $ $0 $@
2467
2468_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002470{
2471cat <<_ASUNAME
2472## --------- ##
2473## Platform. ##
2474## --------- ##
2475
2476hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2477uname -m = `(uname -m) 2>/dev/null || echo unknown`
2478uname -r = `(uname -r) 2>/dev/null || echo unknown`
2479uname -s = `(uname -s) 2>/dev/null || echo unknown`
2480uname -v = `(uname -v) 2>/dev/null || echo unknown`
2481
2482/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2483/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2484
2485/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2486/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2487/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002489/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2490/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2491/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2492
2493_ASUNAME
2494
2495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2496for as_dir in $PATH
2497do
2498 IFS=$as_save_IFS
2499 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "PATH: $as_dir"
2501 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002503
2504} >&5
2505
2506cat >&5 <<_ACEOF
2507
2508
2509## ----------- ##
2510## Core tests. ##
2511## ----------- ##
2512
2513_ACEOF
2514
2515
2516# Keep a trace of the command line.
2517# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002518# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002519# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002520# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002521ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002522ac_configure_args0=
2523ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002524ac_must_keep_next=false
2525for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002526do
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 for ac_arg
2528 do
2529 case $ac_arg in
2530 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2531 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2532 | -silent | --silent | --silen | --sile | --sil)
2533 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 esac
2537 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002542 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002544 case $ac_arg in
2545 *=* | --config-cache | -C | -disable-* | --disable-* \
2546 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2547 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2548 | -with-* | --with-* | -without-* | --without-* | --x)
2549 case "$ac_configure_args0 " in
2550 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2551 esac
2552 ;;
2553 -* ) ac_must_keep_next=true ;;
2554 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 ;;
2558 esac
2559 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002560done
Matthias Kloseb9621712010-04-24 17:59:49 +00002561{ ac_configure_args0=; unset ac_configure_args0;}
2562{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002563
2564# When interrupted or exit'd, cleanup temporary files, and complete
2565# config.log. We remove comments because anyway the quotes in there
2566# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567# WARNING: Use '\'' to represent an apostrophe within the trap.
2568# 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 +00002569trap 'exit_status=$?
2570 # Save into config.log some information that might help in debugging.
2571 {
2572 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002573
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002575## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 echo
2578 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579(
2580 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2581 eval ac_val=\$$ac_var
2582 case $ac_val in #(
2583 *${as_nl}*)
2584 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2586$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 esac
2588 case $ac_var in #(
2589 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2591 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 esac ;;
2593 esac
2594 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2597 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 "s/'\''/'\''\\\\'\'''\''/g;
2600 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2601 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002602 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002604 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 esac |
2606 sort
2607)
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002609
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002610 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002611## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002612## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002613 echo
2614 for ac_var in $ac_subst_vars
2615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 eval ac_val=\$$ac_var
2617 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002621 done | sort
2622 echo
2623
2624 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002625 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002628 echo
2629 for ac_var in $ac_subst_files
2630 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631 eval ac_val=\$$ac_var
2632 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002636 done | sort
2637 echo
2638 fi
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002641 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002642## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002643## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 echo
2647 fi
2648 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 $as_echo "$as_me: caught signal $ac_signal"
2650 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652 rm -f core *.core core.conftest.* &&
2653 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002656for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002658done
2659ac_signal=0
2660
2661# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002663
Matthias Kloseb9621712010-04-24 17:59:49 +00002664$as_echo "/* confdefs.h */" > confdefs.h
2665
Martin v. Löwis11437992002-04-12 09:54:03 +00002666# Predefined preprocessor variables.
2667
2668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_NAME "$PACKAGE_NAME"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_VERSION "$PACKAGE_VERSION"
2678_ACEOF
2679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680cat >>confdefs.h <<_ACEOF
2681#define PACKAGE_STRING "$PACKAGE_STRING"
2682_ACEOF
2683
Martin v. Löwis11437992002-04-12 09:54:03 +00002684cat >>confdefs.h <<_ACEOF
2685#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2686_ACEOF
2687
Matthias Kloseb9621712010-04-24 17:59:49 +00002688cat >>confdefs.h <<_ACEOF
2689#define PACKAGE_URL "$PACKAGE_URL"
2690_ACEOF
2691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692
2693# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002694# Prefer an explicitly selected file to automatically selected ones.
2695ac_site_file1=NONE
2696ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002698 # We do not want a PATH search for config.site.
2699 case $CONFIG_SITE in #((
2700 -*) ac_site_file1=./$CONFIG_SITE;;
2701 */*) ac_site_file1=$CONFIG_SITE;;
2702 *) ac_site_file1=./$CONFIG_SITE;;
2703 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 ac_site_file1=$prefix/share/config.site
2706 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707else
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 ac_site_file1=$ac_default_prefix/share/config.site
2709 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002711for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712do
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 test "x$ac_site_file" = xNONE && continue
2714 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2716$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002718 . "$ac_site_file" \
2719 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2721as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002722See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002723 fi
2724done
2725
2726if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 # Some versions of bash will fail to source /dev/null (special files
2728 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2729 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2731$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2734 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 esac
2736 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737else
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2739$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 >$cache_file
2741fi
2742
2743# Check that the precious variables saved in the cache have kept the same
2744# value.
2745ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2748 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002749 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2750 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 case $ac_old_set,$ac_new_set in
2752 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2754$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 +00002755 ac_cache_corrupted=: ;;
2756 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2758$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 ac_cache_corrupted=: ;;
2760 ,);;
2761 *)
2762 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002763 # differences in whitespace do not lead to failure.
2764 ac_old_val_w=`echo x $ac_old_val`
2765 ac_new_val_w=`echo x $ac_new_val`
2766 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2768$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2769 ac_cache_corrupted=:
2770 else
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2772$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2773 eval $ac_var=\$ac_old_val
2774 fi
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2776$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2778$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 fi;;
2780 esac
2781 # Pass precious variables to config.status.
2782 if test "$ac_new_set" = set; then
2783 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002784 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 *) ac_arg=$ac_var=$ac_new_val ;;
2786 esac
2787 case " $ac_configure_args " in
2788 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002789 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 esac
2791 fi
2792done
2793if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002794 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2797$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002798 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002800## -------------------- ##
2801## Main body of script. ##
2802## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002803
Guido van Rossum7f43da71994-08-01 12:15:30 +00002804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809
Guido van Rossum627b2d71993-12-24 10:39:16 +00002810
Michael W. Hudson54241132001-12-07 15:38:26 +00002811
Trent Nelson4d4ec652012-10-16 08:51:24 -04002812
Trent Nelson5595ab52012-10-17 04:47:31 -04002813if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002814 # If we're building out-of-tree, we need to make sure the following
2815 # resources get picked up before their $srcdir counterparts.
2816 # Objects/ -> typeslots.inc
2817 # Include/ -> Python-ast.h, graminit.h
2818 # Python/ -> importlib.h
2819 # (A side effect of this is that these resources will automatically be
2820 # regenerated when building out-of-tree, regardless of whether or not
2821 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2822 # off.)
2823 BASECPPFLAGS="-IObjects -IInclude -IPython"
2824else
2825 BASECPPFLAGS=""
2826fi
2827
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002828
2829
2830
2831
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002832if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002833then
2834# Extract the first word of "hg", so it can be a program name with args.
2835set dummy hg; ac_word=$2
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002838if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002839 $as_echo_n "(cached) " >&6
2840else
2841 if test -n "$HAS_HG"; then
2842 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2843else
2844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2845for as_dir in $PATH
2846do
2847 IFS=$as_save_IFS
2848 test -z "$as_dir" && as_dir=.
2849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002851 ac_cv_prog_HAS_HG="found"
2852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2853 break 2
2854 fi
2855done
2856 done
2857IFS=$as_save_IFS
2858
2859 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2860fi
2861fi
2862HAS_HG=$ac_cv_prog_HAS_HG
2863if test -n "$HAS_HG"; then
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2865$as_echo "$HAS_HG" >&6; }
2866else
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2868$as_echo "no" >&6; }
2869fi
2870
2871
2872else
2873HAS_HG=no-repository
2874fi
2875if test $HAS_HG = found
2876then
2877 HGVERSION="hg id -i \$(srcdir)"
2878 HGTAG="hg id -t \$(srcdir)"
2879 HGBRANCH="hg id -b \$(srcdir)"
2880else
2881 HGVERSION=""
2882 HGTAG=""
2883 HGBRANCH=""
2884fi
2885
2886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002888
2889
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002890ac_aux_dir=
2891for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2892 if test -f "$ac_dir/install-sh"; then
2893 ac_aux_dir=$ac_dir
2894 ac_install_sh="$ac_aux_dir/install-sh -c"
2895 break
2896 elif test -f "$ac_dir/install.sh"; then
2897 ac_aux_dir=$ac_dir
2898 ac_install_sh="$ac_aux_dir/install.sh -c"
2899 break
2900 elif test -f "$ac_dir/shtool"; then
2901 ac_aux_dir=$ac_dir
2902 ac_install_sh="$ac_aux_dir/shtool install -c"
2903 break
2904 fi
2905done
2906if test -z "$ac_aux_dir"; then
2907 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2908fi
2909
2910# These three variables are undocumented and unsupported,
2911# and are intended to be withdrawn in a future Autoconf release.
2912# They can cause serious problems if a builder's source tree is in a directory
2913# whose full name contains unusual characters.
2914ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2915ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2916ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2917
2918
2919# Make sure we can run config.sub.
2920$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2921 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2922
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2924$as_echo_n "checking build system type... " >&6; }
2925if ${ac_cv_build+:} false; then :
2926 $as_echo_n "(cached) " >&6
2927else
2928 ac_build_alias=$build_alias
2929test "x$ac_build_alias" = x &&
2930 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2931test "x$ac_build_alias" = x &&
2932 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2933ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2934 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2935
2936fi
2937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2938$as_echo "$ac_cv_build" >&6; }
2939case $ac_cv_build in
2940*-*-*) ;;
2941*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2942esac
2943build=$ac_cv_build
2944ac_save_IFS=$IFS; IFS='-'
2945set x $ac_cv_build
2946shift
2947build_cpu=$1
2948build_vendor=$2
2949shift; shift
2950# Remember, the first character of IFS is used to create $*,
2951# except with old shells:
2952build_os=$*
2953IFS=$ac_save_IFS
2954case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2955
2956
2957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2958$as_echo_n "checking host system type... " >&6; }
2959if ${ac_cv_host+:} false; then :
2960 $as_echo_n "(cached) " >&6
2961else
2962 if test "x$host_alias" = x; then
2963 ac_cv_host=$ac_cv_build
2964else
2965 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2966 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2967fi
2968
2969fi
2970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2971$as_echo "$ac_cv_host" >&6; }
2972case $ac_cv_host in
2973*-*-*) ;;
2974*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2975esac
2976host=$ac_cv_host
2977ac_save_IFS=$IFS; IFS='-'
2978set x $ac_cv_host
2979shift
2980host_cpu=$1
2981host_vendor=$2
2982shift; shift
2983# Remember, the first character of IFS is used to create $*,
2984# except with old shells:
2985host_os=$*
2986IFS=$ac_save_IFS
2987case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2988
2989
2990
doko@python.orga10e4a92013-01-25 18:45:12 +01002991
2992
Ned Deilyfcbc2462014-08-22 13:32:49 -07002993# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2994rm -f pybuilddir.txt
2995
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002996for ac_prog in python$PACKAGE_VERSION python3 python
2997do
2998 # Extract the first word of "$ac_prog", so it can be a program name with args.
2999set dummy $ac_prog; ac_word=$2
3000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3001$as_echo_n "checking for $ac_word... " >&6; }
3002if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
3003 $as_echo_n "(cached) " >&6
3004else
3005 if test -n "$PYTHON_FOR_GEN"; then
3006 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
3007else
3008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3009for as_dir in $PATH
3010do
3011 IFS=$as_save_IFS
3012 test -z "$as_dir" && as_dir=.
3013 for ac_exec_ext in '' $ac_executable_extensions; do
3014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3015 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3017 break 2
3018 fi
3019done
3020 done
3021IFS=$as_save_IFS
3022
3023fi
3024fi
3025PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3026if test -n "$PYTHON_FOR_GEN"; then
3027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3028$as_echo "$PYTHON_FOR_GEN" >&6; }
3029else
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3031$as_echo "no" >&6; }
3032fi
3033
3034
3035 test -n "$PYTHON_FOR_GEN" && break
3036done
3037test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3038
3039if test "$PYTHON_FOR_GEN" = not-found; then
3040 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3041 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3042 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3043fi
3044
3045
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003046if test "$cross_compiling" = yes; then
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3048$as_echo_n "checking for python interpreter for cross build... " >&6; }
3049 if test -z "$PYTHON_FOR_BUILD"; then
3050 for interp in python$PACKAGE_VERSION python3 python; do
3051 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003052 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 +02003053 break
3054 fi
3055 interp=
3056 done
3057 if test x$interp = x; then
3058 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3059 fi
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3061$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003062 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:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003063 fi
Martin Panter43a94a72016-07-29 05:52:32 +00003064 # Used to comment out stuff for rebuilding generated files
3065 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01003066elif test "$cross_compiling" = maybe; then
3067 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003068else
3069 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00003070 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003071fi
3072
3073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074
Martin Pantereac67be2016-07-28 01:28:27 +00003075
Benjamin Petersond23f8222009-04-05 19:13:16 +00003076if test "$prefix" != "/"; then
3077 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3078fi
3079
3080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081
3082
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003083# We don't use PACKAGE_ variables, and they cause conflicts
3084# with other autoconf-based packages that include Python.h
3085grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3086rm confdefs.h
3087mv confdefs.h.new confdefs.h
3088
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003089
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003090VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003091
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003092# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003093
3094SOVERSION=1.0
3095
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003096# The later defininition of _XOPEN_SOURCE disables certain features
3097# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3098
Matthias Kloseb9621712010-04-24 17:59:49 +00003099$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003100
3101
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003102# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3103# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3104# them.
3105
Matthias Kloseb9621712010-04-24 17:59:49 +00003106$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003107
3108
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003109# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3110# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3111# them.
3112
Matthias Kloseb9621712010-04-24 17:59:49 +00003113$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003114
3115
Martin v. Löwisd6320502004-08-12 13:45:08 +00003116# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3117# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3118
Matthias Kloseb9621712010-04-24 17:59:49 +00003119$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003120
3121
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3123# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3124# them.
3125
Matthias Kloseb9621712010-04-24 17:59:49 +00003126$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127
3128
3129
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003130define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003131
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003132# Arguments passed to configure.
3133
3134CONFIG_ARGS="$ac_configure_args"
3135
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3137$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003141 case $enableval in
3142 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003143 # Locate the best usable SDK, see Mac/README.txt for more
3144 # information
3145 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003146 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003147 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003148 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3149 if test ! -d "${enableval}"
3150 then
3151 enableval=/
3152 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003153 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003154 ;;
3155 esac
3156 case $enableval in
3157 no)
3158 UNIVERSALSDK=
3159 enable_universalsdk=
3160 ;;
3161 *)
3162 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003163 if test ! -d "${UNIVERSALSDK}"
3164 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003165 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003166 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167 ;;
3168 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003170
Thomas Wouters477c8d52006-05-27 19:21:47 +00003171else
3172
3173 UNIVERSALSDK=
3174 enable_universalsdk=
3175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003178if test -n "${UNIVERSALSDK}"
3179then
Matthias Kloseb9621712010-04-24 17:59:49 +00003180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3181$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003182else
Matthias Kloseb9621712010-04-24 17:59:49 +00003183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3184$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003185fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003188
Ned Deily87adb6e2013-10-18 21:09:56 -07003189ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003190
Ned Deilycbfb9a52012-06-23 16:02:19 -07003191# For backward compatibility reasons we prefer to select '32-bit' if available,
3192# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003193UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003194if test "`uname -s`" = "Darwin"
3195then
3196 if test -n "${UNIVERSALSDK}"
3197 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003198 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003199 then
3200 UNIVERSAL_ARCHS="intel"
3201 fi
3202 fi
3203fi
3204
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003205
Matthias Kloseb9621712010-04-24 17:59:49 +00003206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3207$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003208
3209# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003210if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212 UNIVERSAL_ARCHS="$withval"
3213
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003214fi
3215
Ned Deily87adb6e2013-10-18 21:09:56 -07003216if test -n "${UNIVERSALSDK}"
3217then
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3219$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3220else
3221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3222$as_echo "no" >&6; }
3223fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225
3226# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003227if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228 withval=$with_framework_name;
3229 PYTHONFRAMEWORK=${withval}
3230 PYTHONFRAMEWORKDIR=${withval}.framework
3231 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3232
3233else
3234
3235 PYTHONFRAMEWORK=Python
3236 PYTHONFRAMEWORKDIR=Python.framework
3237 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3238
3239fi
3240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003242if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003244 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003245 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003246 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003247 esac
3248 case $enableval in
3249 no)
3250 PYTHONFRAMEWORK=
3251 PYTHONFRAMEWORKDIR=no-framework
3252 PYTHONFRAMEWORKPREFIX=
3253 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254 FRAMEWORKINSTALLFIRST=
3255 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003256 FRAMEWORKALTINSTALLFIRST=
3257 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003258 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259 if test "x${prefix}" = "xNONE"; then
3260 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3261 else
3262 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3263 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003264 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003265 ;;
3266 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003267 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003268 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003270 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003271 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3272 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003273 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003274 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003275
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003276 if test "x${prefix}" = "xNONE" ; then
3277 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003278
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003279 else
3280 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3281 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003282
3283 case "${enableval}" in
3284 /System*)
3285 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3286 if test "${prefix}" = "NONE" ; then
3287 # See below
3288 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3289 fi
3290 ;;
3291
3292 /Library*)
3293 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3294 ;;
3295
3296 */Library/Frameworks)
3297 MDIR="`dirname "${enableval}"`"
3298 MDIR="`dirname "${MDIR}"`"
3299 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3300
3301 if test "${prefix}" = "NONE"; then
3302 # User hasn't specified the
3303 # --prefix option, but wants to install
3304 # the framework in a non-default location,
3305 # ensure that the compatibility links get
3306 # installed relative to that prefix as well
3307 # instead of in /usr/local.
3308 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3309 fi
3310 ;;
3311
3312 *)
3313 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3314 ;;
3315 esac
3316
Jack Jansen127e56e2001-09-11 14:41:54 +00003317 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003318
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003319 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003320 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003321 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003324
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003325 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3326
3327 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3328
Jack Jansene578a632001-08-15 01:27:14 +00003329 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003330
Guido van Rossum563e7081996-09-10 18:20:48 +00003331else
Martin v. Löwis11437992002-04-12 09:54:03 +00003332
Jack Jansene578a632001-08-15 01:27:14 +00003333 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003334 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003335 PYTHONFRAMEWORKPREFIX=
3336 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003337 FRAMEWORKINSTALLFIRST=
3338 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003339 FRAMEWORKALTINSTALLFIRST=
3340 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003341 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003342 if test "x${prefix}" = "xNONE" ; then
3343 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3344 else
3345 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3346 fi
Jack Jansene578a632001-08-15 01:27:14 +00003347 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003348
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003350fi
3351
Thomas Wouters477c8d52006-05-27 19:21:47 +00003352
3353
Michael W. Hudson54241132001-12-07 15:38:26 +00003354
3355
3356
3357
Jack Jansene578a632001-08-15 01:27:14 +00003358
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003359
3360
3361
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003362
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003363
Ned Deilyb8f944f2013-11-21 22:42:25 -08003364
Jack Jansene578a632001-08-15 01:27:14 +00003365##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003366## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003367## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003368##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003369# Set name for machine-dependent library files
3370
Matthias Kloseb9621712010-04-24 17:59:49 +00003371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3372$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003373if test -z "$MACHDEP"
3374then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003375 # avoid using uname for cross builds
3376 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003377 # ac_sys_system and ac_sys_release are used for setting
3378 # a lot of different things including 'define_xopen_source'
3379 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003380 case "$host" in
3381 *-*-linux*)
3382 ac_sys_system=Linux
3383 ;;
3384 *-*-cygwin*)
3385 ac_sys_system=Cygwin
3386 ;;
3387 *)
3388 # for now, limit cross builds to known configurations
3389 MACHDEP="unknown"
3390 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3391 esac
3392 ac_sys_release=
3393 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003394 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003395 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003396 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003397 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003398 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003399 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003400 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003401 fi
3402 ac_md_system=`echo $ac_sys_system |
3403 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3404 ac_md_release=`echo $ac_sys_release |
3405 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3406 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003407
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003408 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003409 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003410 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003411 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003412 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003413 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003414 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003415fi
Guido van Rossum91922671997-10-09 20:24:13 +00003416
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003417
3418if test "$cross_compiling" = yes; then
3419 case "$host" in
3420 *-*-linux*)
3421 case "$host_cpu" in
3422 arm*)
3423 _host_cpu=arm
3424 ;;
3425 *)
3426 _host_cpu=$host_cpu
3427 esac
3428 ;;
3429 *-*-cygwin*)
3430 _host_cpu=
3431 ;;
3432 *)
3433 # for now, limit cross builds to known configurations
3434 MACHDEP="unknown"
3435 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3436 esac
3437 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3438fi
3439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3441# disable features if it is defined, without any means to access these
3442# features as extensions. For these systems, we skip the definition of
3443# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3444# some feature, make sure there is no alternative way to access this
3445# feature. Also, when using wildcards, make sure you have verified the
3446# need for not defining _XOPEN_SOURCE on all systems matching the
3447# wildcard, and that the wildcard does not include future systems
3448# (which may remove their limitations).
3449case $ac_sys_system/$ac_sys_release in
3450 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3451 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003452 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003453 # In addition, Stefan Krah confirms that issue #1244610 exists through
3454 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003455 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003456 define_xopen_source=no
3457 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3458 # also defined. This can be overridden by defining _BSD_SOURCE
3459 # As this has a different meaning on Linux, only define it on OpenBSD
3460
Matthias Kloseb9621712010-04-24 17:59:49 +00003461$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003462
3463 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003464 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003465 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3466 # also defined. This can be overridden by defining _BSD_SOURCE
3467 # As this has a different meaning on Linux, only define it on OpenBSD
3468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003470
3471 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003472 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3473 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3474 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003475 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 +00003476 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003477 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3478 # request to enable features supported by the standard as a request
3479 # to disable features not supported by the standard. The best way
3480 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3481 # entirely and define __EXTENSIONS__ instead.
3482 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003483 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003484 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3485 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003486 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003487 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003488 define_xopen_source=no;;
3489 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003490 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003491 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003492 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003493 # On FreeBSD 4, the math functions C89 does not cover are never defined
3494 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3495 FreeBSD/4.*)
3496 define_xopen_source=no;;
3497 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3498 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3499 # identifies itself as Darwin/7.*
3500 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3501 # disables platform specific features beyond repair.
3502 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3503 # has no effect, don't bother defining them
3504 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003505 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003506 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003507 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003508 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3509 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3510 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003511 AIX/4)
3512 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003513 AIX/5)
3514 if test `uname -r` -eq 1; then
3515 define_xopen_source=no
3516 fi
3517 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003518 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3519 # defining NI_NUMERICHOST.
3520 QNX/6.3.2)
3521 define_xopen_source=no
3522 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003523
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003524esac
3525
3526if test $define_xopen_source = yes
3527then
Victor Stinner14d098d2011-09-07 22:29:43 +02003528 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003529
Victor Stinner14d098d2011-09-07 22:29:43 +02003530$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003531
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003532
3533 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3534 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3535 # several APIs are not declared. Since this is also needed in some
3536 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003537
Matthias Kloseb9621712010-04-24 17:59:49 +00003538$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003539
3540
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003541
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003542$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003543
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003544fi
3545
Christian Heimes647cd872013-12-07 23:39:33 +01003546# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3547case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003548 hp*|HP*)
3549 define_stdc_a1=yes;;
3550 *)
3551 define_stdc_a1=no;;
3552esac
3553
3554if test $define_stdc_a1 = yes
3555then
Christian Heimes647cd872013-12-07 23:39:33 +01003556
3557$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3558
Christian Heimesb02bcae2013-12-08 15:21:08 +01003559fi
Christian Heimes647cd872013-12-07 23:39:33 +01003560
Guido van Rossum91922671997-10-09 20:24:13 +00003561#
3562# SGI compilers allow the specification of the both the ABI and the
3563# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003564# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003565#
3566# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3567# thus supply support for various ABI/ISA combinations. The MACHDEP
3568# variable is also adjusted.
3569#
3570
3571if test ! -z "$SGI_ABI"
3572then
3573 CC="cc $SGI_ABI"
3574 LDFLAGS="$SGI_ABI $LDFLAGS"
3575 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3578$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003579
Jack Jansen6b08a402004-06-03 12:41:45 +00003580# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3581# it may influence the way we can build extensions, so distutils
3582# needs to check it
3583
Thomas Wouters477c8d52006-05-27 19:21:47 +00003584
Jack Jansen6b08a402004-06-03 12:41:45 +00003585CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003586EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003587
Guido van Rossum627b2d71993-12-24 10:39:16 +00003588# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003589
3590# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3591# for debug/optimization stuff. BASECFLAGS is for flags that are required
3592# just to get things to compile and link. Users are free to override OPT
3593# when running configure or make. The build should not break if they do.
3594# BASECFLAGS should generally not be messed with, however.
3595
3596# XXX shouldn't some/most/all of this code be merged with the stuff later
3597# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3599$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003602if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003604 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003605 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003606 without_gcc=yes;;
3607 yes) CC=gcc
3608 without_gcc=no;;
3609 *) CC=$withval
3610 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003611 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003612else
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003614 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003615 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003616 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003617 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003618 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619fi
3620
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3622$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003623
Zachary Ware5af85642015-12-21 12:09:17 -06003624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3625$as_echo_n "checking for --with-icc... " >&6; }
3626
3627# Check whether --with-icc was given.
3628if test "${with_icc+set}" = set; then :
3629 withval=$with_icc;
3630 case $withval in
3631 no) CC=${CC:-cc}
3632 with_icc=no;;
3633 yes) CC=icc
3634 CXX=icpc
3635 with_icc=yes;;
3636 *) CC=$withval
3637 with_icc=$withval;;
3638 esac
3639else
3640
3641 with_icc=no
3642fi
3643
3644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3645$as_echo "$with_icc" >&6; }
3646
Guido van Rossum8b131c51995-03-09 14:10:13 +00003647# If the user switches compilers, we can't believe the cache
3648if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3649then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003650 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003651(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003652fi
3653
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003654# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3655# when the compiler supports them, but we don't always want -O2, and
3656# we set -g later.
3657if test -z "$CFLAGS"; then
3658 CFLAGS=
3659fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003660
3661if test "$ac_sys_system" = "Darwin"
3662then
3663 # Compiler selection on MacOSX is more complicated than
3664 # AC_PROG_CC can handle, see Mac/README.txt for more
3665 # information
3666 if test -z "${CC}"
3667 then
3668 found_gcc=
3669 found_clang=
3670 as_save_IFS=$IFS; IFS=:
3671 for as_dir in $PATH
3672 do
3673 IFS=$as_save_IFS
3674 if test -x $as_dir/gcc; then
3675 if test -z "${found_gcc}"; then
3676 found_gcc=$as_dir/gcc
3677 fi
3678 fi
3679 if test -x $as_dir/clang; then
3680 if test -z "${found_clang}"; then
3681 found_clang=$as_dir/clang
3682 fi
3683 fi
3684 done
3685 IFS=$as_save_IFS
3686
3687 if test -n "$found_gcc" -a -n "$found_clang"
3688 then
3689 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3690 then
3691 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3692$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3693 CC="$found_clang"
3694 CXX="$found_clang++"
3695 fi
3696
3697
3698 elif test -z "$found_gcc" -a -n "$found_clang"
3699 then
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3701$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3702 CC="$found_clang"
3703 CXX="$found_clang++"
3704
3705 elif test -z "$found_gcc" -a -z "$found_clang"
3706 then
3707 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3708 if test -n "${found_clang}"
3709 then
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3711$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3712 CC="${found_clang}"
3713 CXX="`/usr/bin/xcrun -find clang++`"
3714
3715 # else: use default behaviour
3716 fi
3717 fi
3718 fi
3719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720ac_ext=c
3721ac_cpp='$CPP $CPPFLAGS'
3722ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3723ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3724ac_compiler_gnu=$ac_cv_c_compiler_gnu
3725if test -n "$ac_tool_prefix"; then
3726 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3727set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003730if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732else
3733 if test -n "$CC"; then
3734 ac_cv_prog_CC="$CC" # Let the user override the test.
3735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $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 +00003745 break 2
3746 fi
3747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
Jack Jansendd19cf82001-12-06 22:36:17 +00003751fi
3752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
3764if test -z "$ac_cv_prog_CC"; then
3765 ac_ct_CC=$CC
3766 # Extract the first word of "gcc", so it can be a program name with args.
3767set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003770if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003772else
3773 if test -n "$ac_ct_CC"; then
3774 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3775else
3776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3777for as_dir in $PATH
3778do
3779 IFS=$as_save_IFS
3780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 $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 +00003785 break 2
3786 fi
3787done
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003790
3791fi
3792fi
3793ac_ct_CC=$ac_cv_prog_ac_ct_CC
3794if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3796$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003797else
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 if test "x$ac_ct_CC" = x; then
3803 CC=""
3804 else
3805 case $cross_compiling:$ac_tool_warned in
3806yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809ac_tool_warned=yes ;;
3810esac
3811 CC=$ac_ct_CC
3812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
3814 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003815fi
3816
Jack Jansendd19cf82001-12-06 22:36:17 +00003817if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 if test -n "$ac_tool_prefix"; then
3819 # 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 +00003820set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003823if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003825else
3826 if test -n "$CC"; then
3827 ac_cv_prog_CC="$CC" # Let the user override the test.
3828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832 IFS=$as_save_IFS
3833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $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 +00003838 break 2
3839 fi
3840done
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003843
3844fi
3845fi
3846CC=$ac_cv_prog_CC
3847if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3849$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853fi
3854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858if test -z "$CC"; then
3859 # Extract the first word of "cc", so it can be a program name with args.
3860set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003863if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
3866 if test -n "$CC"; then
3867 ac_cv_prog_CC="$CC" # Let the user override the test.
3868else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003869 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871for as_dir in $PATH
3872do
3873 IFS=$as_save_IFS
3874 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3878 ac_prog_rejected=yes
3879 continue
3880 fi
3881 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 $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 +00003883 break 2
3884 fi
3885done
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003889if test $ac_prog_rejected = yes; then
3890 # We found a bogon in the path, so make sure we never use it.
3891 set dummy $ac_cv_prog_CC
3892 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003893 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003894 # We chose a different compiler from the bogus one.
3895 # However, it has the same basename, so the bogon will be chosen
3896 # first if we set CC to just the basename; use the full file name.
3897 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003898 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003899 fi
3900fi
3901fi
3902fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003903CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003904if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3906$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003907else
Matthias Kloseb9621712010-04-24 17:59:49 +00003908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3909$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003910fi
3911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912
Martin v. Löwis11437992002-04-12 09:54:03 +00003913fi
3914if test -z "$CC"; then
3915 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 do
3918 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3921$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003922if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003923 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924else
3925 if test -n "$CC"; then
3926 ac_cv_prog_CC="$CC" # Let the user override the test.
3927else
Martin v. Löwis11437992002-04-12 09:54:03 +00003928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3929for as_dir in $PATH
3930do
3931 IFS=$as_save_IFS
3932 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 $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 +00003937 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003938 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003939done
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003942
3943fi
3944fi
3945CC=$ac_cv_prog_CC
3946if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3948$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003949else
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3951$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003952fi
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 test -n "$CC" && break
3956 done
3957fi
3958if test -z "$CC"; then
3959 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003961do
3962 # Extract the first word of "$ac_prog", so it can be a program name with args.
3963set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3965$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003966if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003968else
3969 if test -n "$ac_ct_CC"; then
3970 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3971else
3972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973for as_dir in $PATH
3974do
3975 IFS=$as_save_IFS
3976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 $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 +00003981 break 2
3982 fi
3983done
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003986
Martin v. Löwis11437992002-04-12 09:54:03 +00003987fi
3988fi
3989ac_ct_CC=$ac_cv_prog_ac_ct_CC
3990if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3992$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003993else
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3995$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003996fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 test -n "$ac_ct_CC" && break
4000done
Michael W. Hudson54241132001-12-07 15:38:26 +00004001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002 if test "x$ac_ct_CC" = x; then
4003 CC=""
4004 else
4005 case $cross_compiling:$ac_tool_warned in
4006yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009ac_tool_warned=yes ;;
4010esac
4011 CC=$ac_ct_CC
4012 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004013fi
4014
4015fi
4016
4017
Matthias Kloseb9621712010-04-24 17:59:49 +00004018test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004020as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004021See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004022
4023# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004024$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4025set X $ac_compile
4026ac_compiler=$2
4027for ac_option in --version -v -V -qversion; do
4028 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004029case "(($ac_try" in
4030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4031 *) ac_try_echo=$ac_try;;
4032esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4034$as_echo "$ac_try_echo"; } >&5
4035 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004036 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 if test -s conftest.err; then
4038 sed '10a\
4039... rest of stderr output deleted ...
4040 10q' conftest.err >conftest.er1
4041 cat conftest.er1 >&5
4042 fi
4043 rm -f conftest.er1 conftest.err
4044 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4045 test $ac_status = 0; }
4046done
Martin v. Löwis11437992002-04-12 09:54:03 +00004047
Matthias Kloseb9621712010-04-24 17:59:49 +00004048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004049/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004050
Martin v. Löwis11437992002-04-12 09:54:03 +00004051int
4052main ()
4053{
4054
4055 ;
4056 return 0;
4057}
4058_ACEOF
4059ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004060ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004061# Try to create an executable without -o first, disregard a.out.
4062# It will help us diagnose broken compilers, and finding out an intuition
4063# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4065$as_echo_n "checking whether the C compiler works... " >&6; }
4066ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4067
4068# The possible output files:
4069ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071ac_rmfiles=
4072for ac_file in $ac_files
4073do
4074 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4077 esac
4078done
4079rm -f $ac_rmfiles
4080
Matthias Kloseb9621712010-04-24 17:59:49 +00004081if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004089 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4093# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4094# in a Makefile. We should not override ac_cv_exeext if it was cached,
4095# so that the user can short-circuit this test for compilers unknown to
4096# Autoconf.
4097for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004098do
4099 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004102 ;;
4103 [ab].out )
4104 # We found the default executable, but exeext='' is most
4105 # certainly right.
4106 break;;
4107 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109 then :; else
4110 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4111 fi
4112 # We set ac_cv_exeext here because the later test for it is not
4113 # safe: cross compilers may not add the suffix if given an `-o'
4114 # argument, so we may need to know it at that point already.
4115 # Even if this section looks crufty: it has the advantage of
4116 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004117 break;;
4118 * )
4119 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 esac
4121done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122test "$ac_cv_exeext" = no && ac_cv_exeext=
4123
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004124else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 ac_file=''
4126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004127if test -z "$ac_file"; then :
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129$as_echo "no" >&6; }
4130$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004131sed 's/^/| /' conftest.$ac_ext >&5
4132
Matthias Kloseb9621712010-04-24 17:59:49 +00004133{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004135as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004136See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004137else
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4139$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4142$as_echo_n "checking for C compiler default output file name... " >&6; }
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4144$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004145ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146
Matthias Kloseb9621712010-04-24 17:59:49 +00004147rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004148ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4150$as_echo_n "checking for suffix of executables... " >&6; }
4151if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4163# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4164# work properly (i.e., refer to `conftest.exe'), while it won't with
4165# `rm'.
4166for ac_file in conftest.exe conftest conftest.*; do
4167 test -f "$ac_file" || continue
4168 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004170 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4171 break;;
4172 * ) break;;
4173 esac
4174done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175else
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004178as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004179See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004181rm -f conftest conftest$ac_cv_exeext
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4183$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004184
4185rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186EXEEXT=$ac_cv_exeext
4187ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4189/* end confdefs.h. */
4190#include <stdio.h>
4191int
4192main ()
4193{
4194FILE *f = fopen ("conftest.out", "w");
4195 return ferror (f) || fclose (f) != 0;
4196
4197 ;
4198 return 0;
4199}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201ac_clean_files="$ac_clean_files conftest.out"
4202# Check that the compiler produces executables we can run. If not, either
4203# the compiler is broken, or we cross compile.
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4205$as_echo_n "checking whether we are cross compiling... " >&6; }
4206if test "$cross_compiling" != yes; then
4207 { { ac_try="$ac_link"
4208case "(($ac_try" in
4209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4210 *) ac_try_echo=$ac_try;;
4211esac
4212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4213$as_echo "$ac_try_echo"; } >&5
4214 (eval "$ac_link") 2>&5
4215 ac_status=$?
4216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4217 test $ac_status = 0; }
4218 if { ac_try='./conftest$ac_cv_exeext'
4219 { { case "(($ac_try" in
4220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4221 *) ac_try_echo=$ac_try;;
4222esac
4223eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4224$as_echo "$ac_try_echo"; } >&5
4225 (eval "$ac_try") 2>&5
4226 ac_status=$?
4227 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4228 test $ac_status = 0; }; }; then
4229 cross_compiling=no
4230 else
4231 if test "$cross_compiling" = maybe; then
4232 cross_compiling=yes
4233 else
4234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004236as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004238See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 fi
4240 fi
4241fi
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4243$as_echo "$cross_compiling" >&6; }
4244
4245rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4246ac_clean_files=$ac_clean_files_save
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4248$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004249if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo_n "(cached) " >&6
4251else
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004253/* end confdefs.h. */
4254
4255int
4256main ()
4257{
4258
4259 ;
4260 return 0;
4261}
4262_ACEOF
4263rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265case "(($ac_try" in
4266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4267 *) ac_try_echo=$ac_try;;
4268esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004269eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4270$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4274 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 for ac_file in conftest.o conftest.obj conftest.*; do
4276 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4280 break;;
4281 esac
4282done
4283else
Matthias Kloseb9621712010-04-24 17:59:49 +00004284 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004285sed 's/^/| /' conftest.$ac_ext >&5
4286
Matthias Kloseb9621712010-04-24 17:59:49 +00004287{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004289as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004290See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004291fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004292rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4295$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004296OBJEXT=$ac_cv_objext
4297ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4299$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004300if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004302else
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004305
Martin v. Löwis11437992002-04-12 09:54:03 +00004306int
4307main ()
4308{
4309#ifndef __GNUC__
4310 choke me
4311#endif
4312
4313 ;
4314 return 0;
4315}
4316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 ac_compiler_gnu=yes
4319else
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004323ac_cv_c_compiler_gnu=$ac_compiler_gnu
4324
4325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4327$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4328if test $ac_compiler_gnu = yes; then
4329 GCC=yes
4330else
4331 GCC=
4332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004333ac_test_CFLAGS=${CFLAGS+set}
4334ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4336$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004337if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004339else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 ac_save_c_werror_flag=$ac_c_werror_flag
4341 ac_c_werror_flag=yes
4342 ac_cv_prog_cc_g=no
4343 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004346
Martin v. Löwis11437992002-04-12 09:54:03 +00004347int
4348main ()
4349{
4350
4351 ;
4352 return 0;
4353}
4354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004355if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004356 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357else
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 CFLAGS=""
4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360/* end confdefs.h. */
4361
4362int
4363main ()
4364{
4365
4366 ;
4367 return 0;
4368}
4369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004370if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372else
4373 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376/* end confdefs.h. */
4377
4378int
4379main ()
4380{
4381
4382 ;
4383 return 0;
4384}
4385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004386if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4394 ac_c_werror_flag=$ac_save_c_werror_flag
4395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4397$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004398if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004399 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004400elif test $ac_cv_prog_cc_g = yes; then
4401 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004402 CFLAGS="-g -O2"
4403 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004404 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405 fi
4406else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004407 if test "$GCC" = yes; then
4408 CFLAGS="-O2"
4409 else
4410 CFLAGS=
4411 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4414$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004415if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004416 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004417else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004419ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004421/* end confdefs.h. */
4422#include <stdarg.h>
4423#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004424struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004425/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4426struct buf { int x; };
4427FILE * (*rcsopen) (struct buf *, struct stat *, int);
4428static char *e (p, i)
4429 char **p;
4430 int i;
4431{
4432 return p[i];
4433}
4434static char *f (char * (*g) (char **, int), char **p, ...)
4435{
4436 char *s;
4437 va_list v;
4438 va_start (v,p);
4439 s = g (p, va_arg (v,int));
4440 va_end (v);
4441 return s;
4442}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004443
4444/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4445 function prototypes and stuff, but not '\xHH' hex character constants.
4446 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004448 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4449 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004451int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004453/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4454 inside strings and character constants. */
4455#define FOO(x) 'x'
4456int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4457
Skip Montanaro6dead952003-09-25 14:50:04 +00004458int test (int i, double x);
4459struct s1 {int (*f) (int a);};
4460struct s2 {int (*f) (double a);};
4461int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4462int argc;
4463char **argv;
4464int
4465main ()
4466{
4467return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4468 ;
4469 return 0;
4470}
4471_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4473 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004474do
4475 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004477 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004479rm -f core conftest.err conftest.$ac_objext
4480 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004481done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004483CC=$ac_save_CC
4484
4485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004486# AC_CACHE_VAL
4487case "x$ac_cv_prog_cc_c89" in
4488 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4490$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4493$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004494 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004495 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4497$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004498esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004499if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004500
Matthias Kloseb9621712010-04-24 17:59:49 +00004501fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004502
Martin v. Löwis11437992002-04-12 09:54:03 +00004503ac_ext=c
4504ac_cpp='$CPP $CPPFLAGS'
4505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4507ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004509ac_ext=c
4510ac_cpp='$CPP $CPPFLAGS'
4511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4513ac_compiler_gnu=$ac_cv_c_compiler_gnu
4514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4515$as_echo_n "checking how to run the C preprocessor... " >&6; }
4516# On Suns, sometimes $CPP names a directory.
4517if test -n "$CPP" && test -d "$CPP"; then
4518 CPP=
4519fi
4520if test -z "$CPP"; then
4521 if ${ac_cv_prog_CPP+:} false; then :
4522 $as_echo_n "(cached) " >&6
4523else
4524 # Double quotes because CPP needs to be expanded
4525 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4526 do
4527 ac_preproc_ok=false
4528for ac_c_preproc_warn_flag in '' yes
4529do
4530 # Use a header file that comes with gcc, so configuring glibc
4531 # with a fresh cross-compiler works.
4532 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4533 # <limits.h> exists even on freestanding compilers.
4534 # On the NeXT, cc -E runs the code through the compiler's parser,
4535 # not just through cpp. "Syntax error" is here to catch this case.
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537/* end confdefs.h. */
4538#ifdef __STDC__
4539# include <limits.h>
4540#else
4541# include <assert.h>
4542#endif
4543 Syntax error
4544_ACEOF
4545if ac_fn_c_try_cpp "$LINENO"; then :
4546
4547else
4548 # Broken: fails on valid input.
4549continue
4550fi
4551rm -f conftest.err conftest.i conftest.$ac_ext
4552
4553 # OK, works on sane cases. Now check whether nonexistent headers
4554 # can be detected and how.
4555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4556/* end confdefs.h. */
4557#include <ac_nonexistent.h>
4558_ACEOF
4559if ac_fn_c_try_cpp "$LINENO"; then :
4560 # Broken: success on invalid input.
4561continue
4562else
4563 # Passes both tests.
4564ac_preproc_ok=:
4565break
4566fi
4567rm -f conftest.err conftest.i conftest.$ac_ext
4568
4569done
4570# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4571rm -f conftest.i conftest.err conftest.$ac_ext
4572if $ac_preproc_ok; then :
4573 break
4574fi
4575
4576 done
4577 ac_cv_prog_CPP=$CPP
4578
4579fi
4580 CPP=$ac_cv_prog_CPP
4581else
4582 ac_cv_prog_CPP=$CPP
4583fi
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4585$as_echo "$CPP" >&6; }
4586ac_preproc_ok=false
4587for ac_c_preproc_warn_flag in '' yes
4588do
4589 # Use a header file that comes with gcc, so configuring glibc
4590 # with a fresh cross-compiler works.
4591 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4592 # <limits.h> exists even on freestanding compilers.
4593 # On the NeXT, cc -E runs the code through the compiler's parser,
4594 # not just through cpp. "Syntax error" is here to catch this case.
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597#ifdef __STDC__
4598# include <limits.h>
4599#else
4600# include <assert.h>
4601#endif
4602 Syntax error
4603_ACEOF
4604if ac_fn_c_try_cpp "$LINENO"; then :
4605
4606else
4607 # Broken: fails on valid input.
4608continue
4609fi
4610rm -f conftest.err conftest.i conftest.$ac_ext
4611
4612 # OK, works on sane cases. Now check whether nonexistent headers
4613 # can be detected and how.
4614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h. */
4616#include <ac_nonexistent.h>
4617_ACEOF
4618if ac_fn_c_try_cpp "$LINENO"; then :
4619 # Broken: success on invalid input.
4620continue
4621else
4622 # Passes both tests.
4623ac_preproc_ok=:
4624break
4625fi
4626rm -f conftest.err conftest.i conftest.$ac_ext
4627
4628done
4629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4630rm -f conftest.i conftest.err conftest.$ac_ext
4631if $ac_preproc_ok; then :
4632
4633else
4634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4636as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4637See \`config.log' for more details" "$LINENO" 5; }
4638fi
4639
4640ac_ext=c
4641ac_cpp='$CPP $CPPFLAGS'
4642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4644ac_compiler_gnu=$ac_cv_c_compiler_gnu
4645
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4647$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4648if ${ac_cv_path_GREP+:} false; then :
4649 $as_echo_n "(cached) " >&6
4650else
4651 if test -z "$GREP"; then
4652 ac_path_GREP_found=false
4653 # Loop through the user's path and test for each of PROGNAME-LIST
4654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4656do
4657 IFS=$as_save_IFS
4658 test -z "$as_dir" && as_dir=.
4659 for ac_prog in grep ggrep; do
4660 for ac_exec_ext in '' $ac_executable_extensions; do
4661 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4662 as_fn_executable_p "$ac_path_GREP" || continue
4663# Check for GNU ac_path_GREP and select it if it is found.
4664 # Check for GNU $ac_path_GREP
4665case `"$ac_path_GREP" --version 2>&1` in
4666*GNU*)
4667 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4668*)
4669 ac_count=0
4670 $as_echo_n 0123456789 >"conftest.in"
4671 while :
4672 do
4673 cat "conftest.in" "conftest.in" >"conftest.tmp"
4674 mv "conftest.tmp" "conftest.in"
4675 cp "conftest.in" "conftest.nl"
4676 $as_echo 'GREP' >> "conftest.nl"
4677 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4678 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4679 as_fn_arith $ac_count + 1 && ac_count=$as_val
4680 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4681 # Best one so far, save it but keep looking for a better one
4682 ac_cv_path_GREP="$ac_path_GREP"
4683 ac_path_GREP_max=$ac_count
4684 fi
4685 # 10*(2^10) chars as input seems more than enough
4686 test $ac_count -gt 10 && break
4687 done
4688 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4689esac
4690
4691 $ac_path_GREP_found && break 3
4692 done
4693 done
4694 done
4695IFS=$as_save_IFS
4696 if test -z "$ac_cv_path_GREP"; then
4697 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4698 fi
4699else
4700 ac_cv_path_GREP=$GREP
4701fi
4702
4703fi
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4705$as_echo "$ac_cv_path_GREP" >&6; }
4706 GREP="$ac_cv_path_GREP"
4707
4708
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004709
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710
4711
Matthias Kloseb9621712010-04-24 17:59:49 +00004712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4713$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004715# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004716if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004717 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718
4719 case $withval in
4720 no) with_cxx_main=no
4721 MAINCC='$(CC)';;
4722 yes) with_cxx_main=yes
4723 MAINCC='$(CXX)';;
4724 *) with_cxx_main=yes
4725 MAINCC=$withval
4726 if test -z "$CXX"
4727 then
4728 CXX=$withval
4729 fi;;
4730 esac
4731else
4732
4733 with_cxx_main=no
4734 MAINCC='$(CC)'
4735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004736fi
4737
Matthias Kloseb9621712010-04-24 17:59:49 +00004738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4739$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740
4741preset_cxx="$CXX"
4742if test -z "$CXX"
4743then
4744 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745 gcc) if test -n "$ac_tool_prefix"; then
4746 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4747set dummy ${ac_tool_prefix}g++; ac_word=$2
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
4750if ${ac_cv_path_CXX+:} false; then :
4751 $as_echo_n "(cached) " >&6
4752else
4753 case $CXX in
4754 [\\/]* | ?:[\\/]*)
4755 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4756 ;;
4757 *)
4758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4759for as_dir in notfound
4760do
4761 IFS=$as_save_IFS
4762 test -z "$as_dir" && as_dir=.
4763 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4767 break 2
4768 fi
4769done
4770 done
4771IFS=$as_save_IFS
4772
4773 ;;
4774esac
4775fi
4776CXX=$ac_cv_path_CXX
4777if test -n "$CXX"; then
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4779$as_echo "$CXX" >&6; }
4780else
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782$as_echo "no" >&6; }
4783fi
4784
4785
4786fi
4787if test -z "$ac_cv_path_CXX"; then
4788 ac_pt_CXX=$CXX
4789 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4792$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004793if ${ac_cv_path_ac_pt_CXX+:} false; then :
4794 $as_echo_n "(cached) " >&6
4795else
4796 case $ac_pt_CXX in
4797 [\\/]* | ?:[\\/]*)
4798 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4799 ;;
4800 *)
4801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in notfound
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
4806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810 break 2
4811 fi
4812done
4813 done
4814IFS=$as_save_IFS
4815
4816 ;;
4817esac
4818fi
4819ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4820if test -n "$ac_pt_CXX"; then
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4822$as_echo "$ac_pt_CXX" >&6; }
4823else
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4825$as_echo "no" >&6; }
4826fi
4827
4828 if test "x$ac_pt_CXX" = x; then
4829 CXX="g++"
4830 else
4831 case $cross_compiling:$ac_tool_warned in
4832yes:)
4833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4835ac_tool_warned=yes ;;
4836esac
4837 CXX=$ac_pt_CXX
4838 fi
4839else
4840 CXX="$ac_cv_path_CXX"
4841fi
4842 ;;
4843 cc) if test -n "$ac_tool_prefix"; then
4844 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4845set dummy ${ac_tool_prefix}c++; ac_word=$2
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004848if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850else
4851 case $CXX in
4852 [\\/]* | ?:[\\/]*)
4853 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4854 ;;
4855 *)
4856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857for as_dir in notfound
4858do
4859 IFS=$as_save_IFS
4860 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865 break 2
4866 fi
4867done
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004869IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004870
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004871 ;;
4872esac
4873fi
4874CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004875if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4877$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004878else
Matthias Kloseb9621712010-04-24 17:59:49 +00004879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004882
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004883
4884fi
4885if test -z "$ac_cv_path_CXX"; then
4886 ac_pt_CXX=$CXX
4887 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004888set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004891if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004893else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004894 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004895 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004896 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 +00004897 ;;
4898 *)
4899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900for as_dir in notfound
4901do
4902 IFS=$as_save_IFS
4903 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004904 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004906 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004908 break 2
4909 fi
4910done
Matthias Kloseb9621712010-04-24 17:59:49 +00004911 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004912IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004913
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004914 ;;
4915esac
4916fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004917ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4918if test -n "$ac_pt_CXX"; then
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4920$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004921else
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004925
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004926 if test "x$ac_pt_CXX" = x; then
4927 CXX="c++"
4928 else
4929 case $cross_compiling:$ac_tool_warned in
4930yes:)
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4932$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4933ac_tool_warned=yes ;;
4934esac
4935 CXX=$ac_pt_CXX
4936 fi
4937else
4938 CXX="$ac_cv_path_CXX"
4939fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004940 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004941 clang|*/clang) if test -n "$ac_tool_prefix"; then
4942 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4943set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4945$as_echo_n "checking for $ac_word... " >&6; }
4946if ${ac_cv_path_CXX+:} false; then :
4947 $as_echo_n "(cached) " >&6
4948else
4949 case $CXX in
4950 [\\/]* | ?:[\\/]*)
4951 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4952 ;;
4953 *)
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in notfound
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004961 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963 break 2
4964 fi
4965done
4966 done
4967IFS=$as_save_IFS
4968
Ned Deilycbfb9a52012-06-23 16:02:19 -07004969 ;;
4970esac
4971fi
4972CXX=$ac_cv_path_CXX
4973if test -n "$CXX"; then
4974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4975$as_echo "$CXX" >&6; }
4976else
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4978$as_echo "no" >&6; }
4979fi
4980
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004981
4982fi
4983if test -z "$ac_cv_path_CXX"; then
4984 ac_pt_CXX=$CXX
4985 # Extract the first word of "clang++", so it can be a program name with args.
4986set dummy clang++; ac_word=$2
4987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4988$as_echo_n "checking for $ac_word... " >&6; }
4989if ${ac_cv_path_ac_pt_CXX+:} false; then :
4990 $as_echo_n "(cached) " >&6
4991else
4992 case $ac_pt_CXX in
4993 [\\/]* | ?:[\\/]*)
4994 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4995 ;;
4996 *)
4997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in notfound
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
5002 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005004 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5006 break 2
5007 fi
5008done
5009 done
5010IFS=$as_save_IFS
5011
5012 ;;
5013esac
5014fi
5015ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5016if test -n "$ac_pt_CXX"; then
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5018$as_echo "$ac_pt_CXX" >&6; }
5019else
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021$as_echo "no" >&6; }
5022fi
5023
5024 if test "x$ac_pt_CXX" = x; then
5025 CXX="clang++"
5026 else
5027 case $cross_compiling:$ac_tool_warned in
5028yes:)
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5031ac_tool_warned=yes ;;
5032esac
5033 CXX=$ac_pt_CXX
5034 fi
5035else
5036 CXX="$ac_cv_path_CXX"
5037fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005038 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005039 icc|*/icc) if test -n "$ac_tool_prefix"; then
5040 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5041set dummy ${ac_tool_prefix}icpc; ac_word=$2
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5043$as_echo_n "checking for $ac_word... " >&6; }
5044if ${ac_cv_path_CXX+:} false; then :
5045 $as_echo_n "(cached) " >&6
5046else
5047 case $CXX in
5048 [\\/]* | ?:[\\/]*)
5049 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5050 ;;
5051 *)
5052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5053for as_dir in notfound
5054do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
5057 for ac_exec_ext in '' $ac_executable_extensions; do
5058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5059 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5061 break 2
5062 fi
5063done
5064 done
5065IFS=$as_save_IFS
5066
5067 ;;
5068esac
5069fi
5070CXX=$ac_cv_path_CXX
5071if test -n "$CXX"; then
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5073$as_echo "$CXX" >&6; }
5074else
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
5077fi
5078
5079
5080fi
5081if test -z "$ac_cv_path_CXX"; then
5082 ac_pt_CXX=$CXX
5083 # Extract the first word of "icpc", so it can be a program name with args.
5084set dummy icpc; ac_word=$2
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
5087if ${ac_cv_path_ac_pt_CXX+:} false; then :
5088 $as_echo_n "(cached) " >&6
5089else
5090 case $ac_pt_CXX in
5091 [\\/]* | ?:[\\/]*)
5092 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5093 ;;
5094 *)
5095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in notfound
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5102 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104 break 2
5105 fi
5106done
5107 done
5108IFS=$as_save_IFS
5109
5110 ;;
5111esac
5112fi
5113ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5114if test -n "$ac_pt_CXX"; then
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5116$as_echo "$ac_pt_CXX" >&6; }
5117else
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5119$as_echo "no" >&6; }
5120fi
5121
5122 if test "x$ac_pt_CXX" = x; then
5123 CXX="icpc"
5124 else
5125 case $cross_compiling:$ac_tool_warned in
5126yes:)
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5129ac_tool_warned=yes ;;
5130esac
5131 CXX=$ac_pt_CXX
5132 fi
5133else
5134 CXX="$ac_cv_path_CXX"
5135fi
5136 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005137 esac
5138 if test "$CXX" = "notfound"
5139 then
5140 CXX=""
5141 fi
5142fi
5143if test -z "$CXX"
5144then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005145 if test -n "$ac_tool_prefix"; then
5146 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5147 do
5148 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5149set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5151$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005152if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005153 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154else
5155 if test -n "$CXX"; then
5156 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5157else
5158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159for as_dir in $PATH
5160do
5161 IFS=$as_save_IFS
5162 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005163 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005164 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005165 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167 break 2
5168 fi
5169done
Matthias Kloseb9621712010-04-24 17:59:49 +00005170 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005171IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172
5173fi
5174fi
5175CXX=$ac_cv_prog_CXX
5176if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5178$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179else
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5181$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182fi
5183
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005184
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005185 test -n "$CXX" && break
5186 done
5187fi
5188if test -z "$CXX"; then
5189 ac_ct_CXX=$CXX
5190 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5191do
5192 # Extract the first word of "$ac_prog", so it can be a program name with args.
5193set dummy $ac_prog; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5197 $as_echo_n "(cached) " >&6
5198else
5199 if test -n "$ac_ct_CXX"; then
5200 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5201else
5202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5203for as_dir in $PATH
5204do
5205 IFS=$as_save_IFS
5206 test -z "$as_dir" && as_dir=.
5207 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005209 ac_cv_prog_ac_ct_CXX="$ac_prog"
5210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5211 break 2
5212 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005213done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005214 done
5215IFS=$as_save_IFS
5216
5217fi
5218fi
5219ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5220if test -n "$ac_ct_CXX"; then
5221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5222$as_echo "$ac_ct_CXX" >&6; }
5223else
5224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5225$as_echo "no" >&6; }
5226fi
5227
5228
5229 test -n "$ac_ct_CXX" && break
5230done
5231
5232 if test "x$ac_ct_CXX" = x; then
5233 CXX="notfound"
5234 else
5235 case $cross_compiling:$ac_tool_warned in
5236yes:)
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5239ac_tool_warned=yes ;;
5240esac
5241 CXX=$ac_ct_CXX
5242 fi
5243fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005244
5245 if test "$CXX" = "notfound"
5246 then
5247 CXX=""
5248 fi
5249fi
5250if test "$preset_cxx" != "$CXX"
5251then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005252 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005253
5254 By default, distutils will build C++ extension modules with \"$CXX\".
5255 If this is not intended, then set CXX on the configure command line.
5256 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005257$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005258
5259 By default, distutils will build C++ extension modules with \"$CXX\".
5260 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005261 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005262fi
5263
5264
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5266
5267
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5269$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5270cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005271#undef bfin
5272#undef cris
5273#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005274#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005275#undef hppa
5276#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005278#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005279#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005280#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005281#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005282#if defined(__ANDROID__)
5283# if defined(__x86_64__) && defined(__LP64__)
5284 x86_64-linux-android
5285# elif defined(__i386__)
5286 i686-linux-android
5287# elif defined(__aarch64__) && defined(__AARCH64EL__)
5288# if defined(__ILP32__)
5289 aarch64_ilp32-linux-android
5290# else
5291 aarch64-linux-android
5292# endif
5293# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5294 arm-linux-androideabi
5295# elif defined(__mips_hard_float) && defined(_MIPSEL)
5296# if _MIPS_SIM == _ABIO32
5297 mipsel-linux-android
5298# elif _MIPS_SIM == _ABI64
5299 mips64el-linux-android
5300# else
5301# error unknown platform triplet
5302# endif
5303# else
5304# error unknown platform triplet
5305# endif
5306#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005307# if defined(__x86_64__) && defined(__LP64__)
5308 x86_64-linux-gnu
5309# elif defined(__x86_64__) && defined(__ILP32__)
5310 x86_64-linux-gnux32
5311# elif defined(__i386__)
5312 i386-linux-gnu
5313# elif defined(__aarch64__) && defined(__AARCH64EL__)
5314# if defined(__ILP32__)
5315 aarch64_ilp32-linux-gnu
5316# else
5317 aarch64-linux-gnu
5318# endif
5319# elif defined(__aarch64__) && defined(__AARCH64EB__)
5320# if defined(__ILP32__)
5321 aarch64_be_ilp32-linux-gnu
5322# else
5323 aarch64_be-linux-gnu
5324# endif
5325# elif defined(__alpha__)
5326 alpha-linux-gnu
5327# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5328# if defined(__ARMEL__)
5329 arm-linux-gnueabihf
5330# else
5331 armeb-linux-gnueabihf
5332# endif
5333# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5334# if defined(__ARMEL__)
5335 arm-linux-gnueabi
5336# else
5337 armeb-linux-gnueabi
5338# endif
5339# elif defined(__hppa__)
5340 hppa-linux-gnu
5341# elif defined(__ia64__)
5342 ia64-linux-gnu
5343# elif defined(__m68k__) && !defined(__mcoldfire__)
5344 m68k-linux-gnu
5345# elif defined(__mips_hard_float) && defined(_MIPSEL)
5346# if _MIPS_SIM == _ABIO32
5347 mipsel-linux-gnu
5348# elif _MIPS_SIM == _ABIN32
5349 mips64el-linux-gnuabin32
5350# elif _MIPS_SIM == _ABI64
5351 mips64el-linux-gnuabi64
5352# else
5353# error unknown platform triplet
5354# endif
5355# elif defined(__mips_hard_float)
5356# if _MIPS_SIM == _ABIO32
5357 mips-linux-gnu
5358# elif _MIPS_SIM == _ABIN32
5359 mips64-linux-gnuabin32
5360# elif _MIPS_SIM == _ABI64
5361 mips64-linux-gnuabi64
5362# else
5363# error unknown platform triplet
5364# endif
5365# elif defined(__or1k__)
5366 or1k-linux-gnu
5367# elif defined(__powerpc__) && defined(__SPE__)
5368 powerpc-linux-gnuspe
5369# elif defined(__powerpc64__)
5370# if defined(__LITTLE_ENDIAN__)
5371 powerpc64le-linux-gnu
5372# else
5373 powerpc64-linux-gnu
5374# endif
5375# elif defined(__powerpc__)
5376 powerpc-linux-gnu
5377# elif defined(__s390x__)
5378 s390x-linux-gnu
5379# elif defined(__s390__)
5380 s390-linux-gnu
5381# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5382 sh4-linux-gnu
5383# elif defined(__sparc__) && defined(__arch64__)
5384 sparc64-linux-gnu
5385# elif defined(__sparc__)
5386 sparc-linux-gnu
5387# else
5388# error unknown platform triplet
5389# endif
5390#elif defined(__FreeBSD_kernel__)
5391# if defined(__LP64__)
5392 x86_64-kfreebsd-gnu
5393# elif defined(__i386__)
5394 i386-kfreebsd-gnu
5395# else
5396# error unknown platform triplet
5397# endif
5398#elif defined(__gnu_hurd__)
5399 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005400#elif defined(__APPLE__)
5401 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005402#else
5403# error unknown platform triplet
5404#endif
5405
5406EOF
5407
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005408if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005409 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5411$as_echo "$PLATFORM_TRIPLET" >&6; }
5412else
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5414$as_echo "none" >&6; }
5415fi
5416rm -f conftest.c conftest.out
5417
5418if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5419 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5420 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5421 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005422elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5423 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005424fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005425if test x$PLATFORM_TRIPLET = x; then
5426 PLATDIR=plat-$MACHDEP
5427else
5428 PLATDIR=plat-$PLATFORM_TRIPLET
5429fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005430
5431
doko@ubuntu.com55532312016-06-14 08:55:19 +02005432if test x$MULTIARCH != x; then
5433 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5434fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005435
5436
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5438$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5439save_LDFLAGS="$LDFLAGS"
5440LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005441
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5443/* end confdefs.h. */
5444
5445int
5446main ()
5447{
5448
5449 ;
5450 return 0;
5451}
5452_ACEOF
5453if ac_fn_c_try_link "$LINENO"; then :
5454 NO_AS_NEEDED="-Wl,--no-as-needed"
5455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5456$as_echo "yes" >&6; }
5457else
5458 NO_AS_NEEDED=""
5459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5460$as_echo "no" >&6; }
5461fi
5462rm -f core conftest.err conftest.$ac_objext \
5463 conftest$ac_exeext conftest.$ac_ext
5464LDFLAGS="$save_LDFLAGS"
5465
5466
5467
5468# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005469
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5471$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005472if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005474else
5475 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5476 then ac_cv_path_EGREP="$GREP -E"
5477 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005478 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005479 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005480 # Loop through the user's path and test for each of PROGNAME-LIST
5481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005482for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5483do
5484 IFS=$as_save_IFS
5485 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005486 for ac_prog in egrep; do
5487 for ac_exec_ext in '' $ac_executable_extensions; do
5488 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005489 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005490# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005491 # Check for GNU $ac_path_EGREP
5492case `"$ac_path_EGREP" --version 2>&1` in
5493*GNU*)
5494 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5495*)
5496 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005498 while :
5499 do
5500 cat "conftest.in" "conftest.in" >"conftest.tmp"
5501 mv "conftest.tmp" "conftest.in"
5502 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005504 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5505 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005507 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5508 # Best one so far, save it but keep looking for a better one
5509 ac_cv_path_EGREP="$ac_path_EGREP"
5510 ac_path_EGREP_max=$ac_count
5511 fi
5512 # 10*(2^10) chars as input seems more than enough
5513 test $ac_count -gt 10 && break
5514 done
5515 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5516esac
5517
Matthias Kloseb9621712010-04-24 17:59:49 +00005518 $ac_path_EGREP_found && break 3
5519 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005520 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005521 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005522IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005523 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005524 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 +00005525 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005526else
5527 ac_cv_path_EGREP=$EGREP
5528fi
5529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005530 fi
5531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5533$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005534 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005535
5536
Matthias Kloseb9621712010-04-24 17:59:49 +00005537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5538$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005539if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 $as_echo_n "(cached) " >&6
5541else
5542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005543/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005544#include <stdlib.h>
5545#include <stdarg.h>
5546#include <string.h>
5547#include <float.h>
5548
5549int
5550main ()
5551{
5552
5553 ;
5554 return 0;
5555}
5556_ACEOF
5557if ac_fn_c_try_compile "$LINENO"; then :
5558 ac_cv_header_stdc=yes
5559else
5560 ac_cv_header_stdc=no
5561fi
5562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5563
5564if test $ac_cv_header_stdc = yes; then
5565 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5567/* end confdefs.h. */
5568#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005569
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005570_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005572 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005574else
Matthias Kloseb9621712010-04-24 17:59:49 +00005575 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005576fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005577rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578
Matthias Kloseb9621712010-04-24 17:59:49 +00005579fi
5580
5581if test $ac_cv_header_stdc = yes; then
5582 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5584/* end confdefs.h. */
5585#include <stdlib.h>
5586
5587_ACEOF
5588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5589 $EGREP "free" >/dev/null 2>&1; then :
5590
5591else
5592 ac_cv_header_stdc=no
5593fi
5594rm -f conftest*
5595
5596fi
5597
5598if test $ac_cv_header_stdc = yes; then
5599 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5600 if test "$cross_compiling" = yes; then :
5601 :
5602else
5603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5604/* end confdefs.h. */
5605#include <ctype.h>
5606#include <stdlib.h>
5607#if ((' ' & 0x0FF) == 0x020)
5608# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5609# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5610#else
5611# define ISLOWER(c) \
5612 (('a' <= (c) && (c) <= 'i') \
5613 || ('j' <= (c) && (c) <= 'r') \
5614 || ('s' <= (c) && (c) <= 'z'))
5615# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5616#endif
5617
5618#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5619int
5620main ()
5621{
5622 int i;
5623 for (i = 0; i < 256; i++)
5624 if (XOR (islower (i), ISLOWER (i))
5625 || toupper (i) != TOUPPER (i))
5626 return 2;
5627 return 0;
5628}
5629_ACEOF
5630if ac_fn_c_try_run "$LINENO"; then :
5631
5632else
5633 ac_cv_header_stdc=no
5634fi
5635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5636 conftest.$ac_objext conftest.beam conftest.$ac_ext
5637fi
5638
5639fi
5640fi
5641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5642$as_echo "$ac_cv_header_stdc" >&6; }
5643if test $ac_cv_header_stdc = yes; then
5644
5645$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5646
5647fi
5648
5649# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5650for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5651 inttypes.h stdint.h unistd.h
5652do :
5653 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5654ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5655"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005656if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 cat >>confdefs.h <<_ACEOF
5658#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5659_ACEOF
5660
5661fi
5662
5663done
5664
5665
5666
5667 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 +02005668if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 MINIX=yes
5670else
5671 MINIX=
5672fi
5673
5674
5675 if test "$MINIX" = yes; then
5676
5677$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5678
5679
5680$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5681
5682
5683$as_echo "#define _MINIX 1" >>confdefs.h
5684
5685 fi
5686
5687
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5689$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005690if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 $as_echo_n "(cached) " >&6
5692else
5693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5694/* end confdefs.h. */
5695
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005696# define __EXTENSIONS__ 1
5697 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005698int
5699main ()
5700{
5701
5702 ;
5703 return 0;
5704}
5705_ACEOF
5706if ac_fn_c_try_compile "$LINENO"; then :
5707 ac_cv_safe_to_define___extensions__=yes
5708else
5709 ac_cv_safe_to_define___extensions__=no
5710fi
5711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5712fi
5713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5714$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5715 test $ac_cv_safe_to_define___extensions__ = yes &&
5716 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5717
5718 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5719
5720 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5721
5722 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5723
5724 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5725
5726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
Xavier de Gaye95750b12016-07-09 11:05:42 +02005728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5729$as_echo_n "checking for the Android API level... " >&6; }
5730cat >> conftest.c <<EOF
5731#ifdef __ANDROID__
5732#include <android/api-level.h>
5733__ANDROID_API__
5734#else
5735#error not Android
5736#endif
5737EOF
5738
5739if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5740 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5742$as_echo "$ANDROID_API_LEVEL" >&6; }
5743
5744cat >>confdefs.h <<_ACEOF
5745#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5746_ACEOF
5747
5748else
5749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5750$as_echo "not Android" >&6; }
5751fi
5752rm -f conftest.c conftest.out
5753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754# Check for unsupported systems
5755case $ac_sys_system/$ac_sys_release in
5756atheos*|Linux*/1*)
5757 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5758 echo See README for details.
5759 exit 1;;
5760esac
5761
5762
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5764$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005767if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768 withval=$with_suffix;
5769 case $withval in
5770 no) EXEEXT=;;
5771 yes) EXEEXT=.exe;;
5772 *) EXEEXT=$withval;;
5773 esac
5774fi
5775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5777$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779# Test whether we're running on a non-case-sensitive system, in which
5780# case we give a warning if no ext is given
5781
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5783$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784if test ! -d CaseSensitiveTestDir; then
5785mkdir CaseSensitiveTestDir
5786fi
5787
5788if test -d casesensitivetestdir
5789then
Matthias Kloseb9621712010-04-24 17:59:49 +00005790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5791$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792 BUILDEXEEXT=.exe
5793else
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796 BUILDEXEEXT=$EXEEXT
5797fi
5798rmdir CaseSensitiveTestDir
5799
5800case $MACHDEP in
5801bsdos*)
5802 case $CC in
5803 gcc) CC="$CC -D_HAVE_BSDI";;
5804 esac;;
5805esac
5806
5807case $ac_sys_system in
5808hp*|HP*)
5809 case $CC in
5810 cc|*/cc) CC="$CC -Ae";;
5811 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812esac
5813
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5816$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817if test -z "$LIBRARY"
5818then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005819 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5822$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823
5824# LDLIBRARY is the name of the library to link against (as opposed to the
5825# name of the library into which to insert object files). BLDLIBRARY is also
5826# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5827# is blank as the main program is not linked directly against LDLIBRARY.
5828# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5829# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5830# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5831# DLLLIBRARY is the shared (i.e., DLL) library.
5832#
5833# RUNSHARED is used to run shared python without installed libraries
5834#
5835# INSTSONAME is the name of the shared library that will be use to install
5836# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005837#
5838# LDVERSION is the shared library version number, normally the Python version
5839# with the ABI build flags appended.
5840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841
5842
5843
5844
5845
5846
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848LDLIBRARY="$LIBRARY"
5849BLDLIBRARY='$(LDLIBRARY)'
5850INSTSONAME='$(LDLIBRARY)'
5851DLLLIBRARY=''
5852LDLIBRARYDIR=''
5853RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005854LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855
5856# LINKCC is the command that links the python executable -- default is $(CC).
5857# If CXX is set, and if it is needed to link a main function that was
5858# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5859# python might then depend on the C++ runtime
5860# This is altered for AIX in order to build the export list before
5861# linking.
5862
Matthias Kloseb9621712010-04-24 17:59:49 +00005863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5864$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865if test -z "$LINKCC"
5866then
5867 LINKCC='$(PURIFY) $(MAINCC)'
5868 case $ac_sys_system in
5869 AIX*)
5870 exp_extra="\"\""
5871 if test $ac_sys_release -ge 5 -o \
5872 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5873 exp_extra="."
5874 fi
5875 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 QNX*)
5877 # qcc must be used because the other compilers do not
5878 # support -N.
5879 LINKCC=qcc;;
5880 esac
5881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5883$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
5885# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5886# make sure we default having it set to "no": this is used by
5887# distutils.unixccompiler to know if it should add --enable-new-dtags
5888# to linker command lines, and failing to detect GNU ld simply results
5889# in the same bahaviour as before.
5890
Matthias Kloseb9621712010-04-24 17:59:49 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5892$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893ac_prog=ld
5894if test "$GCC" = yes; then
5895 ac_prog=`$CC -print-prog-name=ld`
5896fi
5897case `"$ac_prog" -V 2>&1 < /dev/null` in
5898 *GNU*)
5899 GNULD=yes;;
5900 *)
5901 GNULD=no;;
5902esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5904$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5907$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005908if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005909 $as_echo_n "(cached) " >&6
5910else
5911 ac_cv_c_inline=no
5912for ac_kw in inline __inline__ __inline; do
5913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5914/* end confdefs.h. */
5915#ifndef __cplusplus
5916typedef int foo_t;
5917static $ac_kw foo_t static_foo () {return 0; }
5918$ac_kw foo_t foo () {return 0; }
5919#endif
5920
5921_ACEOF
5922if ac_fn_c_try_compile "$LINENO"; then :
5923 ac_cv_c_inline=$ac_kw
5924fi
5925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5926 test "$ac_cv_c_inline" != no && break
5927done
5928
5929fi
5930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5931$as_echo "$ac_cv_c_inline" >&6; }
5932
5933case $ac_cv_c_inline in
5934 inline | yes) ;;
5935 *)
5936 case $ac_cv_c_inline in
5937 no) ac_val=;;
5938 *) ac_val=$ac_cv_c_inline;;
5939 esac
5940 cat >>confdefs.h <<_ACEOF
5941#ifndef __cplusplus
5942#define inline $ac_val
5943#endif
5944_ACEOF
5945 ;;
5946esac
5947
5948if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005949
5950$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005951
5952
5953fi
5954
5955
Matthias Kloseb9621712010-04-24 17:59:49 +00005956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5957$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005959if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 enableval=$enable_shared;
5961fi
5962
5963
5964if test -z "$enable_shared"
5965then
5966 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005967 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 enable_shared="yes";;
5969 *)
5970 enable_shared="no";;
5971 esac
5972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5974$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5977$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005979if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005980 enableval=$enable_profiling;
5981fi
5982
5983if test "x$enable_profiling" = xyes; then
5984 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005985 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987/* end confdefs.h. */
5988int main() { return 0; }
5989_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005990if ac_fn_c_try_link "$LINENO"; then :
5991
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005993 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005995rm -f core conftest.err conftest.$ac_objext \
5996 conftest$ac_exeext conftest.$ac_ext
5997 CC="$ac_save_cc"
5998else
5999 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02006001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
6002$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003
doko@ubuntu.comba015832012-06-30 16:52:05 +02006004if test "x$enable_profiling" = xyes; then
6005 BASECFLAGS="-pg $BASECFLAGS"
6006 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007fi
6008
Matthias Kloseb9621712010-04-24 17:59:49 +00006009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
6010$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011
6012# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
6013# library that we build, but we do not want to link against it (we
6014# will find it with a -framework option). For this reason there is an
6015# extra variable BLDLIBRARY against which Python and the extension
6016# modules are linked, BLDLIBRARY. This is normally the same as
6017# LDLIBRARY, but empty for MacOSX framework builds.
6018if test "$enable_framework"
6019then
6020 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006021 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022 BLDLIBRARY=''
6023else
6024 BLDLIBRARY='$(LDLIBRARY)'
6025fi
6026
6027# Other platforms follow
6028if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01006029 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030
Matthias Kloseb9621712010-04-24 17:59:49 +00006031$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032
6033 case $ac_sys_system in
6034 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006035 LDLIBRARY='libpython$(LDVERSION).dll.a'
6036 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037 ;;
6038 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006039 LDLIBRARY='libpython$(LDVERSION).so'
6040 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006041 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006043 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006044 then
6045 PY3LIBRARY=libpython3.so
6046 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02006048 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006049 LDLIBRARY='libpython$(LDVERSION).so'
6050 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006051 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006053 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006054 then
6055 PY3LIBRARY=libpython3.so
6056 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057 ;;
6058 hp*|HP*)
6059 case `uname -m` in
6060 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006061 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 ;;
6063 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006064 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065 ;;
6066 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006067 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006068 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006071 LDLIBRARY='libpython$(LDVERSION).dylib'
6072 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006073 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006075 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006076 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006077 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006078 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079
6080 esac
6081else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006082 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083 case $ac_sys_system in
6084 CYGWIN*)
6085 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006086 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087 ;;
6088 esac
6089fi
6090
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006091if test "$cross_compiling" = yes; then
6092 RUNSHARED=
6093fi
6094
Matthias Kloseb9621712010-04-24 17:59:49 +00006095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6096$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097
6098if test -n "$ac_tool_prefix"; then
6099 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6100set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6102$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006103if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105else
6106 if test -n "$RANLIB"; then
6107 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6108else
6109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6110for as_dir in $PATH
6111do
6112 IFS=$as_save_IFS
6113 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006115 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006116 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006117 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118 break 2
6119 fi
6120done
Matthias Kloseb9621712010-04-24 17:59:49 +00006121 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122IFS=$as_save_IFS
6123
6124fi
6125fi
6126RANLIB=$ac_cv_prog_RANLIB
6127if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6129$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130else
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133fi
6134
6135
6136fi
6137if test -z "$ac_cv_prog_RANLIB"; then
6138 ac_ct_RANLIB=$RANLIB
6139 # Extract the first word of "ranlib", so it can be a program name with args.
6140set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6142$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006143if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145else
6146 if test -n "$ac_ct_RANLIB"; then
6147 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6148else
6149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6150for as_dir in $PATH
6151do
6152 IFS=$as_save_IFS
6153 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158 break 2
6159 fi
6160done
Matthias Kloseb9621712010-04-24 17:59:49 +00006161 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162IFS=$as_save_IFS
6163
6164fi
6165fi
6166ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6167if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6169$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170else
Matthias Kloseb9621712010-04-24 17:59:49 +00006171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6172$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173fi
6174
6175 if test "x$ac_ct_RANLIB" = x; then
6176 RANLIB=":"
6177 else
6178 case $cross_compiling:$ac_tool_warned in
6179yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182ac_tool_warned=yes ;;
6183esac
6184 RANLIB=$ac_ct_RANLIB
6185 fi
6186else
6187 RANLIB="$ac_cv_prog_RANLIB"
6188fi
6189
6190
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006191if test -n "$ac_tool_prefix"; then
6192 for ac_prog in ar aal
6193 do
6194 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6197$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006198if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006199 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200else
6201 if test -n "$AR"; then
6202 ac_cv_prog_AR="$AR" # Let the user override the test.
6203else
6204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6205for as_dir in $PATH
6206do
6207 IFS=$as_save_IFS
6208 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006211 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213 break 2
6214 fi
6215done
Matthias Kloseb9621712010-04-24 17:59:49 +00006216 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217IFS=$as_save_IFS
6218
6219fi
6220fi
6221AR=$ac_cv_prog_AR
6222if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6224$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225else
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6227$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228fi
6229
6230
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006231 test -n "$AR" && break
6232 done
6233fi
6234if test -z "$AR"; then
6235 ac_ct_AR=$AR
6236 for ac_prog in ar aal
6237do
6238 # Extract the first word of "$ac_prog", so it can be a program name with args.
6239set dummy $ac_prog; ac_word=$2
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6241$as_echo_n "checking for $ac_word... " >&6; }
6242if ${ac_cv_prog_ac_ct_AR+:} false; then :
6243 $as_echo_n "(cached) " >&6
6244else
6245 if test -n "$ac_ct_AR"; then
6246 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6247else
6248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6249for as_dir in $PATH
6250do
6251 IFS=$as_save_IFS
6252 test -z "$as_dir" && as_dir=.
6253 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006255 ac_cv_prog_ac_ct_AR="$ac_prog"
6256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6257 break 2
6258 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006259done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006260 done
6261IFS=$as_save_IFS
6262
6263fi
6264fi
6265ac_ct_AR=$ac_cv_prog_ac_ct_AR
6266if test -n "$ac_ct_AR"; then
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6268$as_echo "$ac_ct_AR" >&6; }
6269else
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271$as_echo "no" >&6; }
6272fi
6273
6274
6275 test -n "$ac_ct_AR" && break
6276done
6277
6278 if test "x$ac_ct_AR" = x; then
6279 AR="ar"
6280 else
6281 case $cross_compiling:$ac_tool_warned in
6282yes:)
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6285ac_tool_warned=yes ;;
6286esac
6287 AR=$ac_ct_AR
6288 fi
6289fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290
6291
6292# tweak ARFLAGS only if the user didn't set it on the command line
6293
6294if test -z "$ARFLAGS"
6295then
6296 ARFLAGS="rc"
6297fi
6298
doko@ubuntu.com58844492012-06-30 18:25:32 +02006299if test -n "$ac_tool_prefix"; then
6300 for ac_prog in readelf
6301 do
6302 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6303set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6305$as_echo_n "checking for $ac_word... " >&6; }
6306if ${ac_cv_prog_READELF+:} false; then :
6307 $as_echo_n "(cached) " >&6
6308else
6309 if test -n "$READELF"; then
6310 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6311else
6312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315 IFS=$as_save_IFS
6316 test -z "$as_dir" && as_dir=.
6317 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006318 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006319 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6321 break 2
6322 fi
6323done
6324 done
6325IFS=$as_save_IFS
6326
6327fi
6328fi
6329READELF=$ac_cv_prog_READELF
6330if test -n "$READELF"; then
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6332$as_echo "$READELF" >&6; }
6333else
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }
6336fi
6337
6338
6339 test -n "$READELF" && break
6340 done
6341fi
6342if test -z "$READELF"; then
6343 ac_ct_READELF=$READELF
6344 for ac_prog in readelf
6345do
6346 # Extract the first word of "$ac_prog", so it can be a program name with args.
6347set dummy $ac_prog; ac_word=$2
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6349$as_echo_n "checking for $ac_word... " >&6; }
6350if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6351 $as_echo_n "(cached) " >&6
6352else
6353 if test -n "$ac_ct_READELF"; then
6354 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6355else
6356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6357for as_dir in $PATH
6358do
6359 IFS=$as_save_IFS
6360 test -z "$as_dir" && as_dir=.
6361 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006363 ac_cv_prog_ac_ct_READELF="$ac_prog"
6364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6365 break 2
6366 fi
6367done
6368 done
6369IFS=$as_save_IFS
6370
6371fi
6372fi
6373ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6374if test -n "$ac_ct_READELF"; then
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6376$as_echo "$ac_ct_READELF" >&6; }
6377else
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379$as_echo "no" >&6; }
6380fi
6381
6382
6383 test -n "$ac_ct_READELF" && break
6384done
6385
6386 if test "x$ac_ct_READELF" = x; then
6387 READELF=":"
6388 else
6389 case $cross_compiling:$ac_tool_warned in
6390yes:)
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6392$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6393ac_tool_warned=yes ;;
6394esac
6395 READELF=$ac_ct_READELF
6396 fi
6397fi
6398
6399if test "$cross_compiling" = yes; then
6400 case "$READELF" in
6401 readelf|:)
6402 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6403 ;;
6404 esac
6405fi
6406
6407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409case $MACHDEP in
6410bsdos*|hp*|HP*)
6411 # install -d does not work on BSDI or HP-UX
6412 if test -z "$INSTALL"
6413 then
6414 INSTALL="${srcdir}/install-sh -c"
6415 fi
6416esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417# Find a good install program. We prefer a C program (faster),
6418# so one script is as good as another. But avoid the broken or
6419# incompatible versions:
6420# SysV /etc/install, /usr/sbin/install
6421# SunOS /usr/etc/install
6422# IRIX /sbin/install
6423# AIX /bin/install
6424# AmigaOS /C/install, which installs bootblocks on floppy discs
6425# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6426# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6427# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6428# OS/2's system install, which has a completely different semantic
6429# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006430# Reject install programs that cannot install multiple files.
6431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6432$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006434if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006435 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436else
6437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6438for as_dir in $PATH
6439do
6440 IFS=$as_save_IFS
6441 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006442 # Account for people who put trailing slashes in PATH elements.
6443case $as_dir/ in #((
6444 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006446 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447 /usr/ucb/* ) ;;
6448 *)
6449 # OSF1 and SCO ODT 3.0 have their own names for install.
6450 # Don't use installbsd from OSF since it installs stuff as root
6451 # by default.
6452 for ac_prog in ginstall scoinst install; do
6453 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006454 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455 if test $ac_prog = install &&
6456 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6457 # AIX install. It has an incompatible calling convention.
6458 :
6459 elif test $ac_prog = install &&
6460 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6461 # program-specific install script used by HP pwplus--don't use.
6462 :
6463 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006464 rm -rf conftest.one conftest.two conftest.dir
6465 echo one > conftest.one
6466 echo two > conftest.two
6467 mkdir conftest.dir
6468 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6469 test -s conftest.one && test -s conftest.two &&
6470 test -s conftest.dir/conftest.one &&
6471 test -s conftest.dir/conftest.two
6472 then
6473 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6474 break 3
6475 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476 fi
6477 fi
6478 done
6479 done
6480 ;;
6481esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006482
6483 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006484IFS=$as_save_IFS
6485
Matthias Kloseb9621712010-04-24 17:59:49 +00006486rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006487
6488fi
6489 if test "${ac_cv_path_install+set}" = set; then
6490 INSTALL=$ac_cv_path_install
6491 else
6492 # As a last resort, use the slow shell script. Don't cache a
6493 # value for INSTALL within a source directory, because that will
6494 # break other packages using the cache if that directory is
6495 # removed, or if the value is a relative name.
6496 INSTALL=$ac_install_sh
6497 fi
6498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6500$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501
6502# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6503# It thinks the first close brace ends the variable substitution.
6504test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6505
6506test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6507
6508test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6509
Matthias Klose93a0ef12012-03-15 18:08:34 +01006510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6511$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6512if test -z "$MKDIR_P"; then
6513 if ${ac_cv_path_mkdir+:} false; then :
6514 $as_echo_n "(cached) " >&6
6515else
6516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6518do
6519 IFS=$as_save_IFS
6520 test -z "$as_dir" && as_dir=.
6521 for ac_prog in mkdir gmkdir; do
6522 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006523 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006524 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6525 'mkdir (GNU coreutils) '* | \
6526 'mkdir (coreutils) '* | \
6527 'mkdir (fileutils) '4.1*)
6528 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6529 break 3;;
6530 esac
6531 done
6532 done
6533 done
6534IFS=$as_save_IFS
6535
6536fi
6537
6538 test -d ./--version && rmdir ./--version
6539 if test "${ac_cv_path_mkdir+set}" = set; then
6540 MKDIR_P="$ac_cv_path_mkdir -p"
6541 else
6542 # As a last resort, use the slow shell script. Don't cache a
6543 # value for MKDIR_P within a source directory, because that will
6544 # break other packages using the cache if that directory is
6545 # removed, or if the value is a relative name.
6546 MKDIR_P="$ac_install_sh -d"
6547 fi
6548fi
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6550$as_echo "$MKDIR_P" >&6; }
6551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006552
6553# Not every filesystem supports hard links
6554
6555if test -z "$LN" ; then
6556 case $ac_sys_system in
6557 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558 *) LN=ln;;
6559 esac
6560fi
6561
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006562# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006563
6564ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006565
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6568$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006569
6570# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006571if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006572 withval=$with_pydebug;
6573if test "$withval" != no
6574then
6575
Matthias Kloseb9621712010-04-24 17:59:49 +00006576$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577
Matthias Kloseb9621712010-04-24 17:59:49 +00006578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6579$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006580 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006581 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006582else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6583$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006584fi
6585else
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006588fi
6589
6590
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006591# Enable LTO flags
6592
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6594$as_echo_n "checking for --with-lto... " >&6; }
6595
6596# Check whether --with-lto was given.
6597if test "${with_lto+set}" = set; then :
6598 withval=$with_lto;
6599if test "$withval" != no
6600then
6601 Py_LTO='true'
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6603$as_echo "yes" >&6; };
6604else
6605 Py_LTO='false'
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; };
6608fi
6609else
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611$as_echo "no" >&6; }
6612fi
6613
6614if test "$Py_LTO" = 'true' ; then
6615 case $CC in
6616 *clang*)
6617 # Any changes made here should be reflected in the GCC+Darwin case below
6618 LTOFLAGS="-flto"
6619 ;;
6620 *gcc*)
6621 case $ac_sys_system in
6622 Darwin*)
6623 LTOFLAGS="-flto"
6624 ;;
6625 *)
6626 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6627 ;;
6628 esac
6629 ;;
6630 esac
6631fi
6632
Brett Cannon7188a3e2015-09-18 15:13:44 -07006633# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006634
6635
6636
6637
6638
6639
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640# Extract the first word of "llvm-profdata", so it can be a program name with args.
6641set dummy llvm-profdata; ac_word=$2
6642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6643$as_echo_n "checking for $ac_word... " >&6; }
6644if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6645 $as_echo_n "(cached) " >&6
6646else
6647 if test -n "$LLVM_PROF_FOUND"; then
6648 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6649else
6650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651for as_dir in $PATH
6652do
6653 IFS=$as_save_IFS
6654 test -z "$as_dir" && as_dir=.
6655 for ac_exec_ext in '' $ac_executable_extensions; do
6656 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6657 ac_cv_prog_LLVM_PROF_FOUND="found"
6658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659 break 2
6660 fi
6661done
6662 done
6663IFS=$as_save_IFS
6664
6665 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6666fi
6667fi
6668LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6669if test -n "$LLVM_PROF_FOUND"; then
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6671$as_echo "$LLVM_PROF_FOUND" >&6; }
6672else
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6674$as_echo "no" >&6; }
6675fi
6676
6677
6678LLVM_PROF_ERR=no
6679case $CC in
6680 *clang*)
6681 # Any changes made here should be reflected in the GCC+Darwin case below
6682 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6683 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6684 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6685 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6686 if test $LLVM_PROF_FOUND = not-found
6687 then
6688 LLVM_PROF_ERR=yes
6689 fi
6690 ;;
6691 *gcc*)
6692 case $ac_sys_system in
6693 Darwin*)
6694 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6695 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6696 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6697 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6698 if test $LLVM_PROF_FOUND = not-found
6699 then
6700 LLVM_PROF_ERR=yes
6701 fi
6702 ;;
6703 *)
6704 PGO_PROF_GEN_FLAG="-fprofile-generate"
6705 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6706 LLVM_PROF_MERGER="true"
6707 LLVM_PROF_FILE=""
6708 ;;
6709 esac
6710 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006711 *icc*)
6712 PGO_PROF_GEN_FLAG="-prof-gen"
6713 PGO_PROF_USE_FLAG="-prof-use"
6714 LLVM_PROF_MERGER="true"
6715 LLVM_PROF_FILE=""
6716 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006717esac
6718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006719# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6720# merged with this chunk of code?
6721
6722# Optimizer/debugger flags
6723# ------------------------
6724# (The following bit of code is complicated enough - please keep things
6725# indented properly. Just pretend you're editing Python code. ;-)
6726
6727# There are two parallel sets of case statements below, one that checks to
6728# see if OPT was set and one that does BASECFLAGS setting based upon
6729# compiler and platform. BASECFLAGS tweaks need to be made even if the
6730# user set OPT.
6731
6732# tweak OPT based on compiler and platform, only if the user didn't set
6733# it on the command line
6734
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006735if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736then
6737 case $GCC in
6738 yes)
6739 if test "$CC" != 'g++' ; then
6740 STRICT_PROTO="-Wstrict-prototypes"
6741 fi
6742 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6743 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6744 WRAP="-fwrapv"
6745 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006746
6747 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006748 case $CC in
6749 *clang*) WRAP="-fwrapv"
6750 ;;
6751 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753 case $ac_cv_prog_cc_g in
6754 yes)
6755 if test "$Py_DEBUG" = 'true' ; then
6756 # Optimization messes up debuggers, so turn it off for
6757 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006758 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6759 OPT="-g -Og -Wall $STRICT_PROTO"
6760 else
6761 OPT="-g -O0 -Wall $STRICT_PROTO"
6762 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763 else
6764 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6765 fi
6766 ;;
6767 *)
6768 OPT="-O3 -Wall $STRICT_PROTO"
6769 ;;
6770 esac
6771 case $ac_sys_system in
6772 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6773 ;;
6774 esac
6775 ;;
6776
6777 *)
6778 OPT="-O"
6779 ;;
6780 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781fi
6782
6783
6784
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786# The -arch flags for universal builds on OSX
6787UNIVERSAL_ARCH_FLAGS=
6788
6789
6790# tweak BASECFLAGS based on compiler and platform
6791case $GCC in
6792yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006793 # Python doesn't violate C99 aliasing rules, but older versions of
6794 # GCC produce warnings for legal Python code. Enable
6795 # -fno-strict-aliasing on versions of GCC that support but produce
6796 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6798$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799 ac_save_cc="$CC"
6800 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006801 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006802 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006804else
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006807
Matthias Kloseb159a552010-04-25 21:00:44 +00006808
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006809int
6810main ()
6811{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006812
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006813 ;
6814 return 0;
6815}
Matthias Kloseb159a552010-04-25 21:00:44 +00006816
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006818if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006819
6820 CC="$ac_save_cc -fstrict-aliasing"
6821 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006823/* end confdefs.h. */
6824
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006825 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006826int
6827main ()
6828{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006829double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006830 ;
6831 return 0;
6832}
Matthias Kloseb159a552010-04-25 21:00:44 +00006833
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006835if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006836
6837 ac_cv_no_strict_aliasing=no
6838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839else
Matthias Kloseb159a552010-04-25 21:00:44 +00006840
6841 ac_cv_no_strict_aliasing=yes
6842
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006843fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006845
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006846else
Matthias Kloseb159a552010-04-25 21:00:44 +00006847
6848 ac_cv_no_strict_aliasing=no
6849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006852fi
6853
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006854 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6857$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006858 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859 then
6860 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6861 fi
6862
Zachary Ware5af85642015-12-21 12:09:17 -06006863 # ICC doesn't recognize the option, but only emits a warning
6864 ## XXX does it emit an unused result warning and can it be disabled?
6865 case "$CC" in
6866 *icc*)
6867 ac_cv_disable_unused_result_warning=no
6868 ;;
6869 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6871$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6872 ac_save_cc="$CC"
6873 CC="$CC -Wunused-result -Werror"
6874 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006875 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006876 $as_echo_n "(cached) " >&6
6877else
6878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6879/* end confdefs.h. */
6880
6881
6882int
6883main ()
6884{
6885
6886 ;
6887 return 0;
6888}
6889
6890_ACEOF
6891if ac_fn_c_try_compile "$LINENO"; then :
6892
6893 ac_cv_disable_unused_result_warning=yes
6894
6895else
6896
6897 ac_cv_disable_unused_result_warning=no
6898
6899fi
6900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6901fi
6902
6903 CFLAGS="$save_CFLAGS"
6904 CC="$ac_save_cc"
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6906$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006907 ;;
6908 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006909
6910 if test $ac_cv_disable_unused_result_warning = yes
6911 then
6912 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6913 fi
6914
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6916$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6917 ac_save_cc="$CC"
6918 CC="$CC -Werror=declaration-after-statement"
6919 save_CFLAGS="$CFLAGS"
6920 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6921 $as_echo_n "(cached) " >&6
6922else
6923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6924/* end confdefs.h. */
6925
6926
6927int
6928main ()
6929{
6930
6931 ;
6932 return 0;
6933}
6934
6935_ACEOF
6936if ac_fn_c_try_compile "$LINENO"; then :
6937
6938 ac_cv_declaration_after_statement_warning=yes
6939
6940else
6941
6942 ac_cv_declaration_after_statement_warning=no
6943
6944fi
6945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6946fi
6947
6948 CFLAGS="$save_CFLAGS"
6949 CC="$ac_save_cc"
6950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6951$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6952
6953 if test $ac_cv_declaration_after_statement_warning = yes
6954 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006955 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006956 fi
6957
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6959$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6960 ac_save_cc="$CC"
6961 CC="$CC -Wsign-compare"
6962 save_CFLAGS="$CFLAGS"
6963 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6964 $as_echo_n "(cached) " >&6
6965else
6966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6967/* end confdefs.h. */
6968
6969
6970int
6971main ()
6972{
6973
6974 ;
6975 return 0;
6976}
6977
6978_ACEOF
6979if ac_fn_c_try_compile "$LINENO"; then :
6980
6981 ac_cv_enable_sign_compare_warning=yes
6982
6983else
6984
6985 ac_cv_enable_sign_compare_warning=no
6986
6987fi
6988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6989fi
6990
6991 CFLAGS="$save_CFLAGS"
6992 CC="$ac_save_cc"
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6994$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6995
6996 if test $ac_cv_enable_sign_compare_warning = yes
6997 then
6998 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6999 fi
7000
7001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7002$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7003 ac_save_cc="$CC"
7004 CC="$CC -Wunreachable-code"
7005 save_CFLAGS="$CFLAGS"
7006 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7007 $as_echo_n "(cached) " >&6
7008else
7009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7010/* end confdefs.h. */
7011
7012
7013int
7014main ()
7015{
7016
7017 ;
7018 return 0;
7019}
7020
7021_ACEOF
7022if ac_fn_c_try_compile "$LINENO"; then :
7023
7024 ac_cv_enable_unreachable_code_warning=yes
7025
7026else
7027
7028 ac_cv_enable_unreachable_code_warning=no
7029
7030fi
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7032fi
7033
7034 CFLAGS="$save_CFLAGS"
7035 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007036
7037 # Don't enable unreachable code warning in debug mode, since it usually
7038 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007039 # Issue #24324: Unfortunately, the unreachable code warning does not work
7040 # correctly on gcc and has been silently removed from the compiler.
7041 # It is supported on clang but on OS X systems gcc may be an alias
7042 # for clang. Try to determine if the compiler is not really gcc and,
7043 # if so, only then enable the warning.
7044 if test $ac_cv_enable_unreachable_code_warning = yes && \
7045 test "$Py_DEBUG" != "true" && \
7046 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007047 then
7048 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007049 else
7050 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007051 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7053$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007054
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7056 # support. Without this, treatment of subnormals doesn't follow
7057 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007058 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007059 alpha*)
7060 BASECFLAGS="$BASECFLAGS -mieee"
7061 ;;
7062 esac
7063
7064 case $ac_sys_system in
7065 SCO_SV*)
7066 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7067 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007068
7069 # is there any other compiler on Darwin besides gcc?
7070 Darwin*)
7071 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7072 # used to be here, but non-Apple gcc doesn't accept them.
7073 if test "${CC}" = gcc
7074 then
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007076$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007077 case "${UNIVERSALSDK}" in
7078 */MacOSX10.4u.sdk)
7079 # Build using 10.4 SDK, force usage of gcc when the
7080 # compiler is gcc, otherwise the user will get very
7081 # confusing error messages when building on OSX 10.6
7082 CC=gcc-4.0
7083 CPP=cpp-4.0
7084 ;;
7085 esac
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007087$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007088 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007089
Ned Deily87adb6e2013-10-18 21:09:56 -07007090 if test "${enable_universalsdk}"
7091 then
7092 case "$UNIVERSAL_ARCHS" in
7093 32-bit)
7094 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7095 LIPO_32BIT_FLAGS=""
7096 ARCH_RUN_32BIT=""
7097 ;;
7098 64-bit)
7099 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7100 LIPO_32BIT_FLAGS=""
7101 ARCH_RUN_32BIT="true"
7102 ;;
7103 all)
7104 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7105 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7106 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7107 ;;
7108 intel)
7109 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7110 LIPO_32BIT_FLAGS="-extract i386"
7111 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7112 ;;
7113 intel-32)
7114 UNIVERSAL_ARCH_FLAGS="-arch i386"
7115 LIPO_32BIT_FLAGS=""
7116 ARCH_RUN_32BIT=""
7117 ;;
7118 3-way)
7119 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7120 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7121 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7122 ;;
7123 *)
7124 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7125 ;;
7126 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007127
Ned Deily87adb6e2013-10-18 21:09:56 -07007128 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7129 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7130 if test "${UNIVERSALSDK}" != "/"
7131 then
7132 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7133 fi
7134 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007135
Ned Deily87adb6e2013-10-18 21:09:56 -07007136 # Calculate an appropriate deployment target for this build:
7137 # The deployment target value is used explicitly to enable certain
7138 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007139 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007140 # component of the string returned by distutils.get_platform().
7141 #
7142 # Use the value from:
7143 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7144 # 2. the operating system version of the build machine if >= 10.6
7145 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7146 # below to pick either 10.3, 10.4, or 10.5 as the target.
7147 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007148
Ned Deily87adb6e2013-10-18 21:09:56 -07007149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7150$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007151 cur_target_major=`sw_vers -productVersion | \
7152 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7153 cur_target_minor=`sw_vers -productVersion | \
7154 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7155 cur_target="${cur_target_major}.${cur_target_minor}"
7156 if test ${cur_target_major} -eq 10 && \
7157 test ${cur_target_minor} -ge 3 && \
7158 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007159 then
Ned Deily36820b62014-06-25 13:44:22 -07007160 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007161 cur_target=10.3
7162 if test ${enable_universalsdk}
7163 then
7164 case "$UNIVERSAL_ARCHS" in
7165 all|3-way|intel|64-bit)
7166 # These configurations were first supported in 10.5
7167 cur_target='10.5'
7168 ;;
7169 esac
7170 else
7171 if test `/usr/bin/arch` = "i386"
7172 then
7173 # 10.4 was the first release to support Intel archs
7174 cur_target="10.4"
7175 fi
7176 fi
7177 fi
7178 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007179
Ned Deily87adb6e2013-10-18 21:09:56 -07007180 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7181 # environment with a value that is the same as what we'll use
7182 # in the Makefile to ensure that we'll get the same compiler
7183 # environment during configure and build time.
7184 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7185 export MACOSX_DEPLOYMENT_TARGET
7186 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7188$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007189
Ned Deily87adb6e2013-10-18 21:09:56 -07007190 # end of Darwin* tests
7191 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007192 esac
7193 ;;
7194
7195*)
7196 case $ac_sys_system in
7197 OpenUNIX*|UnixWare*)
7198 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7199 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007200 SCO_SV*)
7201 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7202 ;;
7203 esac
7204 ;;
7205esac
7206
Zachary Ware5af85642015-12-21 12:09:17 -06007207# ICC needs -fp-model strict or floats behave badly
7208case "$CC" in
7209*icc*)
7210 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7211 ;;
7212esac
7213
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007214if test "$Py_DEBUG" = 'true'; then
7215 :
7216else
7217 OPT="-DNDEBUG $OPT"
7218fi
7219
7220if test "$ac_arch_flags"
7221then
7222 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7223fi
7224
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007225# On some compilers, pthreads are available without further options
7226# (e.g. MacOS X). On some of these systems, the compiler will not
7227# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7228# So we have to see first whether pthreads are available without
7229# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7231$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007232if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007234else
Matthias Kloseb9621712010-04-24 17:59:49 +00007235 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007236 ac_cv_pthread_is_default=no
7237else
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007239/* end confdefs.h. */
7240
Stefan Krah7dba5942012-11-22 22:49:11 +01007241#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242#include <pthread.h>
7243
7244void* routine(void* p){return NULL;}
7245
7246int main(){
7247 pthread_t p;
7248 if(pthread_create(&p,NULL,routine,NULL)!=0)
7249 return 1;
7250 (void)pthread_detach(p);
7251 return 0;
7252}
7253
7254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007255if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007256
7257 ac_cv_pthread_is_default=yes
7258 ac_cv_kthread=no
7259 ac_cv_pthread=no
7260
7261else
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7265 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266fi
7267
7268
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269fi
7270
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7272$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007273
7274
7275if test $ac_cv_pthread_is_default = yes
7276then
7277 ac_cv_kpthread=no
7278else
7279# -Kpthread, if available, provides the right #defines
7280# and linker options to make pthread_create available
7281# Some compilers won't report that they do not support -Kpthread,
7282# so we need to run a program to see whether it really made the
7283# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7285$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007286if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007287 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288else
7289 ac_save_cc="$CC"
7290CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007291if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292 ac_cv_kpthread=no
7293else
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295/* end confdefs.h. */
7296
Stefan Krah7dba5942012-11-22 22:49:11 +01007297#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298#include <pthread.h>
7299
7300void* routine(void* p){return NULL;}
7301
7302int main(){
7303 pthread_t p;
7304 if(pthread_create(&p,NULL,routine,NULL)!=0)
7305 return 1;
7306 (void)pthread_detach(p);
7307 return 0;
7308}
7309
7310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007311if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007312 ac_cv_kpthread=yes
7313else
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318fi
7319
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320CC="$ac_save_cc"
7321fi
7322
Matthias Kloseb9621712010-04-24 17:59:49 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7324$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007325fi
7326
7327if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7328then
7329# -Kthread, if available, provides the right #defines
7330# and linker options to make pthread_create available
7331# Some compilers won't report that they do not support -Kthread,
7332# so we need to run a program to see whether it really made the
7333# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7335$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007336if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338else
7339 ac_save_cc="$CC"
7340CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007341if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342 ac_cv_kthread=no
7343else
Matthias Kloseb9621712010-04-24 17:59:49 +00007344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345/* end confdefs.h. */
7346
Stefan Krah7dba5942012-11-22 22:49:11 +01007347#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348#include <pthread.h>
7349
7350void* routine(void* p){return NULL;}
7351
7352int main(){
7353 pthread_t p;
7354 if(pthread_create(&p,NULL,routine,NULL)!=0)
7355 return 1;
7356 (void)pthread_detach(p);
7357 return 0;
7358}
7359
7360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007361if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362 ac_cv_kthread=yes
7363else
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7367 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368fi
7369
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370CC="$ac_save_cc"
7371fi
7372
Matthias Kloseb9621712010-04-24 17:59:49 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7374$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375fi
7376
7377if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7378then
7379# -pthread, if available, provides the right #defines
7380# and linker options to make pthread_create available
7381# Some compilers won't report that they do not support -pthread,
7382# so we need to run a program to see whether it really made the
7383# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7385$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007386if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388else
7389 ac_save_cc="$CC"
7390CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007391if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392 ac_cv_pthread=no
7393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395/* end confdefs.h. */
7396
Stefan Krah7dba5942012-11-22 22:49:11 +01007397#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398#include <pthread.h>
7399
7400void* routine(void* p){return NULL;}
7401
7402int main(){
7403 pthread_t p;
7404 if(pthread_create(&p,NULL,routine,NULL)!=0)
7405 return 1;
7406 (void)pthread_detach(p);
7407 return 0;
7408}
7409
7410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007411if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007412 ac_cv_pthread=yes
7413else
Matthias Kloseb9621712010-04-24 17:59:49 +00007414 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7417 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418fi
7419
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420CC="$ac_save_cc"
7421fi
7422
Matthias Kloseb9621712010-04-24 17:59:49 +00007423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7424$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007425fi
7426
7427# If we have set a CC compiler flag for thread support then
7428# check if it works for CXX, too.
7429ac_cv_cxx_thread=no
7430if test ! -z "$CXX"
7431then
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7433$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434ac_save_cxx="$CXX"
7435
7436if test "$ac_cv_kpthread" = "yes"
7437then
7438 CXX="$CXX -Kpthread"
7439 ac_cv_cxx_thread=yes
7440elif test "$ac_cv_kthread" = "yes"
7441then
7442 CXX="$CXX -Kthread"
7443 ac_cv_cxx_thread=yes
7444elif test "$ac_cv_pthread" = "yes"
7445then
7446 CXX="$CXX -pthread"
7447 ac_cv_cxx_thread=yes
7448fi
7449
7450if test $ac_cv_cxx_thread = yes
7451then
7452 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7453 $CXX -c conftest.$ac_ext 2>&5
7454 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7455 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7456 then
7457 ac_cv_cxx_thread=yes
7458 else
7459 ac_cv_cxx_thread=no
7460 fi
7461 rm -fr conftest*
7462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7464$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465fi
7466CXX="$ac_save_cxx"
7467
7468
7469# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7471$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007472if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476/* end confdefs.h. */
7477#include <stdlib.h>
7478#include <stdarg.h>
7479#include <string.h>
7480#include <float.h>
7481
7482int
7483main ()
7484{
7485
7486 ;
7487 return 0;
7488}
7489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007490if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491 ac_cv_header_stdc=yes
7492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7496
7497if test $ac_cv_header_stdc = yes; then
7498 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500/* end confdefs.h. */
7501#include <string.h>
7502
7503_ACEOF
7504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 $EGREP "memchr" >/dev/null 2>&1; then :
7506
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507else
7508 ac_cv_header_stdc=no
7509fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007510rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511
7512fi
7513
7514if test $ac_cv_header_stdc = yes; then
7515 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517/* end confdefs.h. */
7518#include <stdlib.h>
7519
7520_ACEOF
7521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 $EGREP "free" >/dev/null 2>&1; then :
7523
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524else
7525 ac_cv_header_stdc=no
7526fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007527rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528
7529fi
7530
7531if test $ac_cv_header_stdc = yes; then
7532 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534 :
7535else
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537/* end confdefs.h. */
7538#include <ctype.h>
7539#include <stdlib.h>
7540#if ((' ' & 0x0FF) == 0x020)
7541# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7542# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7543#else
7544# define ISLOWER(c) \
7545 (('a' <= (c) && (c) <= 'i') \
7546 || ('j' <= (c) && (c) <= 'r') \
7547 || ('s' <= (c) && (c) <= 'z'))
7548# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7549#endif
7550
7551#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7552int
7553main ()
7554{
7555 int i;
7556 for (i = 0; i < 256; i++)
7557 if (XOR (islower (i), ISLOWER (i))
7558 || toupper (i) != TOUPPER (i))
7559 return 2;
7560 return 0;
7561}
7562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007563if ac_fn_c_try_run "$LINENO"; then :
7564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565else
Matthias Kloseb9621712010-04-24 17:59:49 +00007566 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7569 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570fi
7571
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572fi
7573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7575$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576if test $ac_cv_header_stdc = yes; then
7577
Matthias Kloseb9621712010-04-24 17:59:49 +00007578$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579
7580fi
7581
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007582for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007583fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007584ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007585sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007586unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007587poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007588sys/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 +01007589sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007590sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007591sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007592sys/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 -07007593libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007594bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007595sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007596do :
7597 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7598ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007599if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007600 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007601#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007602_ACEOF
7603
7604fi
7605
Guido van Rossum627b2d71993-12-24 10:39:16 +00007606done
7607
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007608ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007609for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7612$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007613if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007615else
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007617/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007618#include <sys/types.h>
7619#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007620
Martin v. Löwis11437992002-04-12 09:54:03 +00007621int
7622main ()
7623{
7624if ((DIR *) 0)
7625return 0;
7626 ;
7627 return 0;
7628}
7629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007631 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007632else
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007637eval ac_res=\$$as_ac_Header
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7639$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007640if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007641 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007642#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007643_ACEOF
7644
7645ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007646fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007648done
7649# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7650if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7652$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007653if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007654 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007655else
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660/* Override any GCC internal prototype to avoid an error.
7661 Use char because int might match the return type of a GCC
7662 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007663#ifdef __cplusplus
7664extern "C"
7665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007666char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007667int
7668main ()
7669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 ;
7672 return 0;
7673}
7674_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675for ac_lib in '' dir; do
7676 if test -z "$ac_lib"; then
7677 ac_res="none required"
7678 else
7679 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007680 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007683 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007685rm -f core conftest.err conftest.$ac_objext \
7686 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007687 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690done
Victor Stinnere0be4232011-10-25 13:06:09 +02007691if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693else
7694 ac_cv_search_opendir=no
7695fi
7696rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007697LIBS=$ac_func_search_save_LIBS
7698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7700$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007702if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007704
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007705fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007706
Michael W. Hudson54241132001-12-07 15:38:26 +00007707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7709$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007710if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007711 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007712else
7713 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717/* Override any GCC internal prototype to avoid an error.
7718 Use char because int might match the return type of a GCC
7719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007720#ifdef __cplusplus
7721extern "C"
7722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007723char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007724int
7725main ()
7726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 ;
7729 return 0;
7730}
7731_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732for ac_lib in '' x; do
7733 if test -z "$ac_lib"; then
7734 ac_res="none required"
7735 else
7736 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007737 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742rm -f core conftest.err conftest.$ac_objext \
7743 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007744 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747done
Victor Stinnere0be4232011-10-25 13:06:09 +02007748if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750else
7751 ac_cv_search_opendir=no
7752fi
7753rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007754LIBS=$ac_func_search_save_LIBS
7755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7757$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007759if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007761
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762fi
7763
7764fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007765
Matthias Kloseb9621712010-04-24 17:59:49 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7767$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007768if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007770else
Matthias Kloseb9621712010-04-24 17:59:49 +00007771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007772/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007773#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007774int
7775main ()
7776{
7777return makedev(0, 0);
7778 ;
7779 return 0;
7780}
7781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007782if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007783 ac_cv_header_sys_types_h_makedev=yes
7784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007787rm -f core conftest.err conftest.$ac_objext \
7788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007789
7790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7792$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007793
7794if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007795ac_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 +02007796if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007797
Matthias Kloseb9621712010-04-24 17:59:49 +00007798$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007799
7800fi
7801
7802
7803
7804 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 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 +02007806if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007807
Matthias Kloseb9621712010-04-24 17:59:49 +00007808$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007809
7810fi
7811
7812
7813 fi
7814fi
7815
Michael W. Hudson54241132001-12-07 15:38:26 +00007816
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007817# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7818for ac_header in net/if.h
7819do :
7820 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7821#ifdef STDC_HEADERS
7822# include <stdlib.h>
7823# include <stddef.h>
7824#else
7825# ifdef HAVE_STDLIB_H
7826# include <stdlib.h>
7827# endif
7828#endif
7829#ifdef HAVE_SYS_SOCKET_H
7830# include <sys/socket.h>
7831#endif
7832
7833"
Victor Stinnere0be4232011-10-25 13:06:09 +02007834if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007835 cat >>confdefs.h <<_ACEOF
7836#define HAVE_NET_IF_H 1
7837_ACEOF
7838
7839fi
7840
7841done
7842
7843
Martin v. Löwis11017b12006-01-14 18:12:57 +00007844# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007845for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007846do :
7847 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 +00007848#ifdef HAVE_ASM_TYPES_H
7849#include <asm/types.h>
7850#endif
7851#ifdef HAVE_SYS_SOCKET_H
7852#include <sys/socket.h>
7853#endif
7854
Matthias Kloseb9621712010-04-24 17:59:49 +00007855"
Victor Stinnere0be4232011-10-25 13:06:09 +02007856if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007857 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007858#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007859_ACEOF
7860
7861fi
7862
7863done
7864
7865
Charles-François Natali47413c12011-10-06 19:47:44 +02007866# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007867for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007868do :
7869 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7870ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7871#ifdef HAVE_SYS_SOCKET_H
7872#include <sys/socket.h>
7873#endif
7874
7875"
7876if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7877 cat >>confdefs.h <<_ACEOF
7878#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7879_ACEOF
7880
7881fi
7882
7883done
7884
7885
Guido van Rossum627b2d71993-12-24 10:39:16 +00007886# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007887was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7889$as_echo_n "checking for clock_t in time.h... " >&6; }
7890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007891/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007892#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007893
7894_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007897 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007898else
Martin v. Löwis11437992002-04-12 09:54:03 +00007899
7900
Matthias Kloseb9621712010-04-24 17:59:49 +00007901$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007902
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007903
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007905rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007906
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7908$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007909
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7911$as_echo_n "checking for makedev... " >&6; }
7912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007914
Jesus Cea740f53a2010-04-28 11:35:30 +00007915#if defined(MAJOR_IN_MKDEV)
7916#include <sys/mkdev.h>
7917#elif defined(MAJOR_IN_SYSMACROS)
7918#include <sys/sysmacros.h>
7919#else
7920#include <sys/types.h>
7921#endif
7922
Neal Norwitz11690112002-07-30 01:08:28 +00007923int
7924main ()
7925{
Jesus Cea740f53a2010-04-28 11:35:30 +00007926
7927 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007928 ;
7929 return 0;
7930}
Matthias Kloseb159a552010-04-25 21:00:44 +00007931
Neal Norwitz11690112002-07-30 01:08:28 +00007932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007933if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007934 ac_cv_has_makedev=yes
7935else
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938rm -f core conftest.err conftest.$ac_objext \
7939 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7941$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007942if test "$ac_cv_has_makedev" = "yes"; then
7943
Matthias Kloseb9621712010-04-24 17:59:49 +00007944$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007945
7946fi
7947
Christian Heimes985ecdc2013-11-20 11:46:18 +01007948# byte swapping
7949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7950$as_echo_n "checking for le64toh... " >&6; }
7951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7952/* end confdefs.h. */
7953
7954#ifdef HAVE_ENDIAN_H
7955#include <endian.h>
7956#elif defined(HAVE_SYS_ENDIAN_H)
7957#include <sys/endian.h>
7958#endif
7959
7960int
7961main ()
7962{
7963
7964 le64toh(1)
7965 ;
7966 return 0;
7967}
7968
7969_ACEOF
7970if ac_fn_c_try_link "$LINENO"; then :
7971 ac_cv_has_le64toh=yes
7972else
7973 ac_cv_has_le64toh=no
7974fi
7975rm -f core conftest.err conftest.$ac_objext \
7976 conftest$ac_exeext conftest.$ac_ext
7977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7978$as_echo "$ac_cv_has_le64toh" >&6; }
7979if test "$ac_cv_has_le64toh" = "yes"; then
7980
7981$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7982
7983fi
7984
Martin v. Löwis399a6892002-10-04 10:22:02 +00007985# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7986# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7987# defined, but the compiler does not support pragma redefine_extname,
7988# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7989# structures (such as rlimit64) without declaring them. As a
7990# work-around, disable LFS on such configurations
7991
7992use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7994$as_echo_n "checking Solaris LFS bug... " >&6; }
7995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007996/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007997
7998#define _LARGEFILE_SOURCE 1
7999#define _FILE_OFFSET_BITS 64
8000#include <sys/resource.h>
8001
Martin v. Löwis399a6892002-10-04 10:22:02 +00008002int
8003main ()
8004{
8005struct rlimit foo;
8006 ;
8007 return 0;
8008}
8009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008010if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008011 sol_lfs_bug=no
8012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8017$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008018if test "$sol_lfs_bug" = "yes"; then
8019 use_lfs=no
8020fi
8021
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008022# Don't use largefile support for GNU/Hurd
8023case $ac_sys_system in GNU*)
8024 use_lfs=no
8025esac
8026
Martin v. Löwis399a6892002-10-04 10:22:02 +00008027if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008028# Two defines needed to enable largefile support on various platforms
8029# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008030case $ac_sys_system/$ac_sys_release in
8031AIX*)
8032
8033$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8034
8035 ;;
8036esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008039
8040
Matthias Kloseb9621712010-04-24 17:59:49 +00008041$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008042
Martin v. Löwis399a6892002-10-04 10:22:02 +00008043fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008044
Guido van Rossum84e7b241996-08-19 21:59:00 +00008045# Add some code to confdefs.h so that the test for off_t works on SCO
8046cat >> confdefs.h <<\EOF
8047#if defined(SCO_DS)
8048#undef _OFF_T
8049#endif
8050EOF
8051
Guido van Rossumef2255b2000-03-10 22:30:29 +00008052# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008053ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008054if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008055
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008056else
Martin v. Löwis11437992002-04-12 09:54:03 +00008057
8058cat >>confdefs.h <<_ACEOF
8059#define mode_t int
8060_ACEOF
8061
8062fi
8063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008065if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008067else
Martin v. Löwis11437992002-04-12 09:54:03 +00008068
8069cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008071_ACEOF
8072
8073fi
8074
Matthias Kloseb9621712010-04-24 17:59:49 +00008075ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008076if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008078else
Martin v. Löwis11437992002-04-12 09:54:03 +00008079
8080cat >>confdefs.h <<_ACEOF
8081#define pid_t int
8082_ACEOF
8083
8084fi
8085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008086
Martin v. Löwis11437992002-04-12 09:54:03 +00008087cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008088#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008089_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008092if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008094else
Martin v. Löwis11437992002-04-12 09:54:03 +00008095
8096cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008098_ACEOF
8099
8100fi
8101
Matthias Kloseb9621712010-04-24 17:59:49 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8103$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008104if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008106else
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008108/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008109#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008110
8111_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008114 ac_cv_type_uid_t=yes
8115else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008116 ac_cv_type_uid_t=no
8117fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008118rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8122$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008123if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008124
Matthias Kloseb9621712010-04-24 17:59:49 +00008125$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008126
8127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008129
8130fi
8131
Mark Dickinson983bc162012-12-02 12:11:38 +00008132
8133# There are two separate checks for each of the exact-width integer types we
8134# need. First we check whether the type is available using the usual
8135# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8136# and <stdint.h> where available). We then also use the special type checks of
8137# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8138# directly, #define's uint32_t to be a suitable type.
8139
8140ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8141if test "x$ac_cv_type_uint32_t" = xyes; then :
8142
8143$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8144
8145fi
8146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8148case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008149 no|yes) ;; #(
8150 *)
8151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008153
8154
8155cat >>confdefs.h <<_ACEOF
8156#define uint32_t $ac_cv_c_uint32_t
8157_ACEOF
8158;;
8159 esac
8160
Mark Dickinson983bc162012-12-02 12:11:38 +00008161
8162ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8163if test "x$ac_cv_type_uint64_t" = xyes; then :
8164
8165$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8166
8167fi
8168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8170case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008171 no|yes) ;; #(
8172 *)
8173
Matthias Kloseb9621712010-04-24 17:59:49 +00008174$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008175
8176
8177cat >>confdefs.h <<_ACEOF
8178#define uint64_t $ac_cv_c_uint64_t
8179_ACEOF
8180;;
8181 esac
8182
Mark Dickinson983bc162012-12-02 12:11:38 +00008183
8184ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8185if test "x$ac_cv_type_int32_t" = xyes; then :
8186
8187$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8188
8189fi
8190
Matthias Kloseb9621712010-04-24 17:59:49 +00008191ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8192case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008193 no|yes) ;; #(
8194 *)
8195
8196cat >>confdefs.h <<_ACEOF
8197#define int32_t $ac_cv_c_int32_t
8198_ACEOF
8199;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008200esac
8201
Mark Dickinson983bc162012-12-02 12:11:38 +00008202
8203ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8204if test "x$ac_cv_type_int64_t" = xyes; then :
8205
8206$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8207
8208fi
8209
Matthias Kloseb9621712010-04-24 17:59:49 +00008210ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8211case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008212 no|yes) ;; #(
8213 *)
8214
8215cat >>confdefs.h <<_ACEOF
8216#define int64_t $ac_cv_c_int64_t
8217_ACEOF
8218;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008219esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008220
Mark Dickinson983bc162012-12-02 12:11:38 +00008221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008223if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008226
8227fi
8228
Stefan Krah1919b7e2012-03-21 18:25:23 +01008229ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8230if test "x$ac_cv_type___uint128_t" = xyes; then :
8231
8232$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8233
8234fi
8235
Jack Jansendd19cf82001-12-06 22:36:17 +00008236
Michael W. Hudson54241132001-12-07 15:38:26 +00008237# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008238# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239# The cast to long int works around a bug in the HP C Compiler
8240# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8241# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8242# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8244$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008245if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008247else
Matthias Kloseb9621712010-04-24 17:59:49 +00008248 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 +00008249
Martin v. Löwis11437992002-04-12 09:54:03 +00008250else
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 if test "$ac_cv_type_int" = yes; then
8252 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008254as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008255See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 else
8257 ac_cv_sizeof_int=0
8258 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008260
Martin v. Löwis11437992002-04-12 09:54:03 +00008261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8263$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264
8265
8266
Martin v. Löwis11437992002-04-12 09:54:03 +00008267cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008268#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008269_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008270
8271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272# The cast to long int works around a bug in the HP C Compiler
8273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8275# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8277$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008278if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008280else
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 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 +00008282
Martin v. Löwis11437992002-04-12 09:54:03 +00008283else
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 if test "$ac_cv_type_long" = yes; then
8285 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008287as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008288See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289 else
8290 ac_cv_sizeof_long=0
8291 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008293
Martin v. Löwis11437992002-04-12 09:54:03 +00008294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8296$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297
8298
8299
Martin v. Löwis11437992002-04-12 09:54:03 +00008300cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008301#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008302_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008303
8304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305# The cast to long int works around a bug in the HP C Compiler
8306# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8307# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8308# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8310$as_echo_n "checking size of long long... " >&6; }
8311if ${ac_cv_sizeof_long_long+:} false; then :
8312 $as_echo_n "(cached) " >&6
8313else
8314 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8315
8316else
8317 if test "$ac_cv_type_long_long" = yes; then
8318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8320as_fn_error 77 "cannot compute sizeof (long long)
8321See \`config.log' for more details" "$LINENO" 5; }
8322 else
8323 ac_cv_sizeof_long_long=0
8324 fi
8325fi
8326
8327fi
8328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8329$as_echo "$ac_cv_sizeof_long_long" >&6; }
8330
8331
8332
8333cat >>confdefs.h <<_ACEOF
8334#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8335_ACEOF
8336
8337
8338# The cast to long int works around a bug in the HP C Compiler
8339# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8340# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8341# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8343$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008344if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008346else
Matthias Kloseb9621712010-04-24 17:59:49 +00008347 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 +00008348
Martin v. Löwis11437992002-04-12 09:54:03 +00008349else
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 if test "$ac_cv_type_void_p" = yes; then
8351 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8352$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008353as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008354See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355 else
8356 ac_cv_sizeof_void_p=0
8357 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008359
Martin v. Löwis11437992002-04-12 09:54:03 +00008360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8362$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363
8364
8365
Martin v. Löwis11437992002-04-12 09:54:03 +00008366cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008367#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008368_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008369
8370
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008371# The cast to long int works around a bug in the HP C Compiler
8372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8373# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8374# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8376$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008377if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008379else
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 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 +00008381
Martin v. Löwis11437992002-04-12 09:54:03 +00008382else
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 if test "$ac_cv_type_short" = yes; then
8384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008386as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008387See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388 else
8389 ac_cv_sizeof_short=0
8390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008392
Martin v. Löwis11437992002-04-12 09:54:03 +00008393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8395$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396
8397
8398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008400#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008401_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008402
8403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404# The cast to long int works around a bug in the HP C Compiler
8405# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8406# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8407# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8409$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008410if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008412else
Matthias Kloseb9621712010-04-24 17:59:49 +00008413 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 +00008414
Martin v. Löwis11437992002-04-12 09:54:03 +00008415else
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 if test "$ac_cv_type_float" = yes; then
8417 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008419as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008420See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421 else
8422 ac_cv_sizeof_float=0
8423 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8428$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429
8430
8431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008433#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008434_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008435
8436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437# The cast to long int works around a bug in the HP C Compiler
8438# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8439# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8440# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8442$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008443if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008445else
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 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 +00008447
Martin v. Löwis11437992002-04-12 09:54:03 +00008448else
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 if test "$ac_cv_type_double" = yes; then
8450 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008452as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008453See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008454 else
8455 ac_cv_sizeof_double=0
8456 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008458
Martin v. Löwis11437992002-04-12 09:54:03 +00008459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8461$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008462
8463
8464
Martin v. Löwis11437992002-04-12 09:54:03 +00008465cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008466#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008467_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008468
8469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470# The cast to long int works around a bug in the HP C Compiler
8471# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8472# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8473# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8475$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008476if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008478else
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 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 +00008480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481else
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 if test "$ac_cv_type_fpos_t" = yes; then
8483 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008485as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008486See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487 else
8488 ac_cv_sizeof_fpos_t=0
8489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8494$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495
8496
8497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008499#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008500_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008501
Michael W. Hudson54241132001-12-07 15:38:26 +00008502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503# The cast to long int works around a bug in the HP C Compiler
8504# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8505# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8506# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8508$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008509if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008511else
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 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 +00008513
Martin v. Löwis18e16552006-02-15 17:27:45 +00008514else
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 if test "$ac_cv_type_size_t" = yes; then
8516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008518as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008519See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520 else
8521 ac_cv_sizeof_size_t=0
8522 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524
Martin v. Löwis18e16552006-02-15 17:27:45 +00008525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8527$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528
8529
8530
Martin v. Löwis18e16552006-02-15 17:27:45 +00008531cat >>confdefs.h <<_ACEOF
8532#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8533_ACEOF
8534
8535
Christian Heimes400adb02008-02-01 08:12:03 +00008536# The cast to long int works around a bug in the HP C Compiler
8537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8539# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8541$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008542if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008544else
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 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 +00008546
Christian Heimes400adb02008-02-01 08:12:03 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 if test "$ac_cv_type_pid_t" = yes; then
8549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008551as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008552See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008553 else
8554 ac_cv_sizeof_pid_t=0
8555 fi
8556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008557
Christian Heimes400adb02008-02-01 08:12:03 +00008558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8560$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008561
8562
8563
8564cat >>confdefs.h <<_ACEOF
8565#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8566_ACEOF
8567
8568
Michael W. Hudson54241132001-12-07 15:38:26 +00008569
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8571$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008572have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008574/* end confdefs.h. */
8575
8576int
8577main ()
8578{
8579long double x; x = (long double)0;
8580 ;
8581 return 0;
8582}
8583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008584if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008585
8586
Matthias Kloseb9621712010-04-24 17:59:49 +00008587$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008588
8589 have_long_double=yes
8590
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008591fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8594$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008595if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008596# The cast to long int works around a bug in the HP C Compiler
8597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8601$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008602if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008604else
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 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 +00008606
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008607else
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 if test "$ac_cv_type_long_double" = yes; then
8609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008611as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008612See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008613 else
8614 ac_cv_sizeof_long_double=0
8615 fi
8616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8620$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008621
8622
8623
8624cat >>confdefs.h <<_ACEOF
8625#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8626_ACEOF
8627
8628
8629fi
8630
8631
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8633$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008634have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008636/* end confdefs.h. */
8637
8638int
8639main ()
8640{
8641_Bool x; x = (_Bool)0;
8642 ;
8643 return 0;
8644}
8645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008646if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008647
8648
Matthias Kloseb9621712010-04-24 17:59:49 +00008649$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008650
8651 have_c99_bool=yes
8652
Thomas Woutersb2137042007-02-01 18:02:27 +00008653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8656$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008657if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658# The cast to long int works around a bug in the HP C Compiler
8659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8661# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8663$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008664if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 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 +00008668
Thomas Woutersb2137042007-02-01 18:02:27 +00008669else
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 if test "$ac_cv_type__Bool" = yes; then
8671 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008673as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008674See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675 else
8676 ac_cv_sizeof__Bool=0
8677 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679
Thomas Woutersb2137042007-02-01 18:02:27 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8682$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683
8684
8685
Thomas Woutersb2137042007-02-01 18:02:27 +00008686cat >>confdefs.h <<_ACEOF
8687#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8688_ACEOF
8689
8690
8691fi
8692
Matthias Kloseb9621712010-04-24 17:59:49 +00008693ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008694 #include <stdint.h>
8695 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008696 #ifdef HAVE_INTTYPES_H
8697 #include <inttypes.h>
8698 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008699"
Victor Stinnere0be4232011-10-25 13:06:09 +02008700if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008701
8702cat >>confdefs.h <<_ACEOF
8703#define HAVE_UINTPTR_T 1
8704_ACEOF
8705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706# The cast to long int works around a bug in the HP C Compiler
8707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8709# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8711$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008712if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008714else
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$ac_cv_type_uintptr_t" = yes; then
8719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008722See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723 else
8724 ac_cv_sizeof_uintptr_t=0
8725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8730$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731
8732
8733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008735#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008736_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008737
Michael W. Hudson54241132001-12-07 15:38:26 +00008738
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008739fi
8740
Thomas Wouters89f507f2006-12-13 04:49:30 +00008741
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008742# The cast to long int works around a bug in the HP C Compiler
8743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8745# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8747$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008748if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008752#ifdef HAVE_SYS_TYPES_H
8753#include <sys/types.h>
8754#endif
8755
Matthias Kloseb9621712010-04-24 17:59:49 +00008756"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008757
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 if test "$ac_cv_type_off_t" = yes; then
8760 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008762as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008763See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764 else
8765 ac_cv_sizeof_off_t=0
8766 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008768
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8771$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008772
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008773
8774
Martin v. Löwis11437992002-04-12 09:54:03 +00008775cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008776#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008777_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008778
Michael W. Hudson54241132001-12-07 15:38:26 +00008779
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8782$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008783if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008784 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008785
Matthias Kloseb9621712010-04-24 17:59:49 +00008786$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008787
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8789$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8792$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008793fi
8794
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008795# The cast to long int works around a bug in the HP C Compiler
8796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8798# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8800$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008801if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008803else
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008805#ifdef HAVE_SYS_TYPES_H
8806#include <sys/types.h>
8807#endif
8808#ifdef HAVE_TIME_H
8809#include <time.h>
8810#endif
8811
Matthias Kloseb9621712010-04-24 17:59:49 +00008812"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008813
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$ac_cv_type_time_t" = yes; then
8816 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008818as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008819See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008820 else
8821 ac_cv_sizeof_time_t=0
8822 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8827$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008828
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829
8830
Martin v. Löwis11437992002-04-12 09:54:03 +00008831cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008832#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008833_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008834
Michael W. Hudson54241132001-12-07 15:38:26 +00008835
8836
Trent Mick635f6fb2000-08-23 21:33:05 +00008837# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008838ac_save_cc="$CC"
8839if test "$ac_cv_kpthread" = "yes"
8840then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008841elif test "$ac_cv_kthread" = "yes"
8842then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008843elif test "$ac_cv_pthread" = "yes"
8844then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008845fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008846
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8848$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008849have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008851/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008852
8853 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008854int
8855main ()
8856{
Guido van Rossum12580492000-09-24 16:47:19 +00008857pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ;
8859 return 0;
8860}
Matthias Kloseb159a552010-04-25 21:00:44 +00008861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008863if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008864 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8868$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008869if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008870 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8873# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8875$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008876if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880#ifdef HAVE_PTHREAD_H
8881#include <pthread.h>
8882#endif
8883
Matthias Kloseb9621712010-04-24 17:59:49 +00008884"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008885
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008886else
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 if test "$ac_cv_type_pthread_t" = yes; then
8888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008890as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008891See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892 else
8893 ac_cv_sizeof_pthread_t=0
8894 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008896
Trent Mick635f6fb2000-08-23 21:33:05 +00008897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8899$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901
8902
Martin v. Löwis11437992002-04-12 09:54:03 +00008903cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008904#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008905_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008906
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008907
Trent Mick635f6fb2000-08-23 21:33:05 +00008908fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008909CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008910
Michael W. Hudson54241132001-12-07 15:38:26 +00008911
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008912case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008913 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008914 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8915 ;;
8916 Darwin/*)
8917 OTHER_LIBTOOL_OPT=""
8918 ;;
8919esac
8920
8921
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008922
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008923case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008924 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008925 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8926 if test "${enable_universalsdk}"; then
8927 :
8928 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008929 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008930 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008931 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008932 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008933 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008934 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008935 if test ${gcc_version} '<' 4.0
8936 then
8937 LIBTOOL_CRUFT="-lcc_dynamic"
8938 else
8939 LIBTOOL_CRUFT=""
8940 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008942 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008943else
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008945/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008946
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008947 #include <unistd.h>
8948 int main(int argc, char*argv[])
8949 {
8950 if (sizeof(long) == 4) {
8951 return 0;
8952 } else {
8953 return 1;
8954 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008955 }
8956
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008958if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008959 ac_osx_32bit=yes
8960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8964 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008965fi
8966
8967
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008968 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008969 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008970 i386)
8971 MACOSX_DEFAULT_ARCH="i386"
8972 ;;
8973 ppc)
8974 MACOSX_DEFAULT_ARCH="ppc"
8975 ;;
8976 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008977 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008978 ;;
8979 esac
8980 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008981 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008982 i386)
8983 MACOSX_DEFAULT_ARCH="x86_64"
8984 ;;
8985 ppc)
8986 MACOSX_DEFAULT_ARCH="ppc64"
8987 ;;
8988 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008989 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990 ;;
8991 esac
8992
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008993 fi
8994
8995 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008996 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008997 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008998esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9000$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009001if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009002then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009003 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009005 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009006
Matthias Kloseb9621712010-04-24 17:59:49 +00009007$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009008
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9010$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009011 if test $enable_shared = "yes"
9012 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009013 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 +00009014 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009015else
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009018fi
9019
Matthias Kloseb9621712010-04-24 17:59:49 +00009020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9021$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009022case $ac_sys_system/$ac_sys_release in
9023 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009024
Matthias Kloseb9621712010-04-24 17:59:49 +00009025$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009026
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9028$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009029 ;;
9030 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009033 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009034esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009035
Guido van Rossum0a516c91994-09-12 10:58:40 +00009036# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009037
Michael W. Hudson54241132001-12-07 15:38:26 +00009038
9039
9040
9041
Benjamin Peterson99f03762010-04-11 22:15:28 +00009042
Thomas Wouters477c8d52006-05-27 19:21:47 +00009043
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009044# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9045# -- usually .so, .sl on HP-UX, .dll on Cygwin
9046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9047$as_echo_n "checking the extension of shared libraries... " >&6; }
9048if test -z "$SHLIB_SUFFIX"; then
9049 case $ac_sys_system in
9050 hp*|HP*)
9051 case `uname -m` in
9052 ia64) SHLIB_SUFFIX=.so;;
9053 *) SHLIB_SUFFIX=.sl;;
9054 esac
9055 ;;
9056 CYGWIN*) SHLIB_SUFFIX=.dll;;
9057 *) SHLIB_SUFFIX=.so;;
9058 esac
9059fi
9060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9061$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009062
Guido van Rossum0a516c91994-09-12 10:58:40 +00009063# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009064# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009065# (Shared libraries in this instance are shared modules to be loaded into
9066# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9068$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009069if test -z "$LDSHARED"
9070then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009071 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009072 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009073 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009074 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009075 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009076 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009077 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009079 if test "$GCC" = "yes" ; then
9080 LDSHARED='$(CC) -shared'
9081 LDCXXSHARED='$(CXX) -shared'
9082 else
9083 LDSHARED='$(CC) -G'
9084 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009085 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009086 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009087 if test "$GCC" = "yes" ; then
9088 LDSHARED='$(CC) -shared'
9089 LDCXXSHARED='$(CXX) -shared'
9090 else
9091 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009092 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009093 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009094 LDSHARED='$(CC) -bundle'
9095 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009096 if test "$enable_framework" ; then
9097 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009098 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9099 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009100 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009101 else
9102 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009103 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009104 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009105 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009106 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009107 LDSHARED='$(CC) -bundle'
9108 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009109 if test "$enable_framework" ; then
9110 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009111 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9112 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009113 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009114 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009115 # No framework, use the Python app as bundle-loader
9116 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009117 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009118 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009119 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009120 Darwin/*)
9121 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9122 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009123
Ned Deily36820b62014-06-25 13:44:22 -07009124 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9125 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9126 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9127 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9128 if test ${dep_target_major} -eq 10 && \
9129 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009130 then
Ned Deily36820b62014-06-25 13:44:22 -07009131 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009132 LDSHARED='$(CC) -bundle'
9133 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009134 if test "$enable_framework" ; then
9135 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009136 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9137 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009138 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009139 else
9140 # No framework, use the Python app as bundle-loader
9141 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9142 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009143 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009144 fi
Ned Deily36820b62014-06-25 13:44:22 -07009145 else
9146 # building for OS X 10.3 and later
9147 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9148 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9149 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009150 fi
9151 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009152 Linux*|GNU*|QNX*)
9153 LDSHARED='$(CC) -shared'
9154 LDCXXSHARED='$(CXX) -shared';;
9155 BSD/OS*/4*)
9156 LDSHARED="gcc -shared"
9157 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009158 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009159 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009160 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009161 LDSHARED='$(CC) -shared'
9162 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009163 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009164 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009165 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009166 OpenBSD*)
9167 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9168 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009169 LDSHARED='$(CC) -shared $(CCSHARED)'
9170 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009171 else
9172 case `uname -r` in
9173 [01].* | 2.[0-7] | 2.[0-7].*)
9174 LDSHARED="ld -Bshareable ${LDFLAGS}"
9175 ;;
9176 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009177 LDSHARED='$(CC) -shared $(CCSHARED)'
9178 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009179 ;;
9180 esac
9181 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009182 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009183 LDSHARED='$(CC) -shared'
9184 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009185 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009186 if test "$GCC" = "yes" ; then
9187 LDSHARED='$(CC) -shared'
9188 LDCXXSHARED='$(CXX) -shared'
9189 else
9190 LDSHARED='$(CC) -G'
9191 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009192 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009193 SCO_SV*)
9194 LDSHARED='$(CC) -Wl,-G,-Bexport'
9195 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9196 CYGWIN*)
9197 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9198 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009199 *) LDSHARED="ld";;
9200 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9203$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009204LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009205BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009206# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009207# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9209$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009210if test -z "$CCSHARED"
9211then
Guido van Rossum07397971997-04-29 21:49:50 +00009212 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009213 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009214 then CCSHARED="-fPIC";
9215 elif test `uname -p` = sparc;
9216 then CCSHARED="-xcode=pic32";
9217 else CCSHARED="-Kpic";
9218 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009219 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009220 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009221 else CCSHARED="+z";
9222 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009223 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009224 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009225 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009226 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009227 if test "$GCC" = "yes"
9228 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009229 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009230 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009231 SCO_SV*)
9232 if test "$GCC" = "yes"
9233 then CCSHARED="-fPIC"
9234 else CCSHARED="-Kpic -belf"
9235 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009236 IRIX*/6*) case $CC in
9237 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009238 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009239 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9243$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009244# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009245# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9247$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009248if test -z "$LINKFORSHARED"
9249then
Guido van Rossum07397971997-04-29 21:49:50 +00009250 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009251 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009252 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009253 LINKFORSHARED="-Wl,-E -Wl,+s";;
9254# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009255 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009256 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009257 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009258 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009259 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009260
9261 # Issue #18075: the default maximum stack size (8MBytes) is too
9262 # small for the default recursion limit. Increase the stack size
9263 # to ensure that tests don't crash
9264 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9265
Jack Jansene578a632001-08-15 01:27:14 +00009266 if test "$enable_framework"
9267 then
Jack Jansenda49e192005-01-07 13:08:22 +00009268 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009269 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009270 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009271 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009272 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009273 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009274 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009275 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9276 then
9277 LINKFORSHARED="-Wl,--export-dynamic"
9278 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009279 SunOS/5*) case $CC in
9280 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009281 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009282 then
9283 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009284 fi;;
9285 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009286 CYGWIN*)
9287 if test $enable_shared = "no"
9288 then
9289 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9290 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009291 QNX*)
9292 # -Wl,-E causes the symbols to be added to the dynamic
9293 # symbol table so that they can be found when a module
9294 # is loaded. -N 2048K causes the stack size to be set
9295 # to 2048 kilobytes so that the stack doesn't overflow
9296 # when running test_compile.py.
9297 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009298 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9301$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009302
Michael W. Hudson54241132001-12-07 15:38:26 +00009303
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009304
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9306$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009307if test ! "$LIBRARY" = "$LDLIBRARY"
9308then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009309 case $ac_sys_system in
9310 CYGWIN*)
9311 # Cygwin needs CCSHARED when building extension DLLs
9312 # but not when building the interpreter DLL.
9313 CFLAGSFORSHARED='';;
9314 *)
9315 CFLAGSFORSHARED='$(CCSHARED)'
9316 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9319$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009320
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009321# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9322# library (with --enable-shared).
9323# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009324# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9325# if it is not required, since it creates a dependency of the shared library
9326# to LIBS. This, in turn, means that applications linking the shared libpython
9327# don't need to link LIBS explicitly. The default should be only changed
9328# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009329
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9331$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009332case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009333 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009334 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009335esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9337$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009338
9339
Guido van Rossum627b2d71993-12-24 10:39:16 +00009340# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9342$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009343if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009344 $as_echo_n "(cached) " >&6
9345else
9346 ac_check_lib_save_LIBS=$LIBS
9347LIBS="-lsendfile $LIBS"
9348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9349/* end confdefs.h. */
9350
9351/* Override any GCC internal prototype to avoid an error.
9352 Use char because int might match the return type of a GCC
9353 builtin and then its argument prototype would still apply. */
9354#ifdef __cplusplus
9355extern "C"
9356#endif
9357char sendfile ();
9358int
9359main ()
9360{
9361return sendfile ();
9362 ;
9363 return 0;
9364}
9365_ACEOF
9366if ac_fn_c_try_link "$LINENO"; then :
9367 ac_cv_lib_sendfile_sendfile=yes
9368else
9369 ac_cv_lib_sendfile_sendfile=no
9370fi
9371rm -f core conftest.err conftest.$ac_objext \
9372 conftest$ac_exeext conftest.$ac_ext
9373LIBS=$ac_check_lib_save_LIBS
9374fi
9375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9376$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009377if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009378 cat >>confdefs.h <<_ACEOF
9379#define HAVE_LIBSENDFILE 1
9380_ACEOF
9381
9382 LIBS="-lsendfile $LIBS"
9383
9384fi
9385
Matthias Kloseb9621712010-04-24 17:59:49 +00009386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9387$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009388if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009389 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009390else
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009392LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009396/* Override any GCC internal prototype to avoid an error.
9397 Use char because int might match the return type of a GCC
9398 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009399#ifdef __cplusplus
9400extern "C"
9401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009402char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009403int
9404main ()
9405{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009407 ;
9408 return 0;
9409}
9410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009411if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009413else
Matthias Kloseb9621712010-04-24 17:59:49 +00009414 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009416rm -f core conftest.err conftest.$ac_objext \
9417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009418LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9421$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009422if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 cat >>confdefs.h <<_ACEOF
9424#define HAVE_LIBDL 1
9425_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009426
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009427 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009428
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009429fi
9430 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9432$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009433if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009434 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009435else
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009437LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441/* Override any GCC internal prototype to avoid an error.
9442 Use char because int might match the return type of a GCC
9443 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009444#ifdef __cplusplus
9445extern "C"
9446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009447char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009448int
9449main ()
9450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009451return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ;
9453 return 0;
9454}
9455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009456if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009458else
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009461rm -f core conftest.err conftest.$ac_objext \
9462 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009463LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9466$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009467if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 cat >>confdefs.h <<_ACEOF
9469#define HAVE_LIBDLD 1
9470_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009471
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009472 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009473
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009474fi
9475 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009476
Georg Brandlb1441c72009-01-03 22:33:39 +00009477# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009478if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9480$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009481if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009483else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009484 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488/* Override any GCC internal prototype to avoid an error.
9489 Use char because int might match the return type of a GCC
9490 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009491#ifdef __cplusplus
9492extern "C"
9493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009494char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009495int
9496main ()
9497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 ;
9500 return 0;
9501}
9502_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503for ac_lib in '' pthread rt posix4; do
9504 if test -z "$ac_lib"; then
9505 ac_res="none required"
9506 else
9507 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009508 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009510 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009513rm -f core conftest.err conftest.$ac_objext \
9514 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009515 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009516 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518done
Victor Stinnere0be4232011-10-25 13:06:09 +02009519if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521else
9522 ac_cv_search_sem_init=no
9523fi
9524rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009525LIBS=$ac_func_search_save_LIBS
9526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9528$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009530if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009532
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009533fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009534 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009535 # posix4 on Solaris 2.6
9536 # pthread (first!) on Linux
9537fi
9538
Martin v. Löwis19d17342003-06-14 21:03:05 +00009539# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9541$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009542if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009544else
9545 ac_check_lib_save_LIBS=$LIBS
9546LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009548/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550/* Override any GCC internal prototype to avoid an error.
9551 Use char because int might match the return type of a GCC
9552 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009553#ifdef __cplusplus
9554extern "C"
9555#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009556char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009557int
9558main ()
9559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009561 ;
9562 return 0;
9563}
9564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009565if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009566 ac_cv_lib_intl_textdomain=yes
9567else
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570rm -f core conftest.err conftest.$ac_objext \
9571 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009572LIBS=$ac_check_lib_save_LIBS
9573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9575$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009576if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009577
Matthias Kloseb9621712010-04-24 17:59:49 +00009578$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009579
Brett Cannonc6d936e2009-06-07 20:09:53 +00009580 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009581fi
9582
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009583
9584# checks for system dependent C++ extensions support
9585case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009586 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9587$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009589/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009590
Georg Brandl59e87bd2011-02-15 19:48:59 +00009591 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009592int
9593main ()
9594{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009595loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ;
9597 return 0;
9598}
Matthias Kloseb159a552010-04-25 21:00:44 +00009599
Martin v. Löwis11437992002-04-12 09:54:03 +00009600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009601if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009602
Matthias Kloseb159a552010-04-25 21:00:44 +00009603
Matthias Kloseb9621712010-04-24 17:59:49 +00009604$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
Matthias Kloseb159a552010-04-25 21:00:44 +00009606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009607$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009608
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009609else
Matthias Kloseb159a552010-04-25 21:00:44 +00009610
9611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009612$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009613
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009615rm -f core conftest.err conftest.$ac_objext \
9616 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009617 *) ;;
9618esac
9619
Christian Heimes985ecdc2013-11-20 11:46:18 +01009620# check for systems that require aligned memory access
9621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9622$as_echo_n "checking aligned memory access is required... " >&6; }
9623if test "$cross_compiling" = yes; then :
9624 aligned_required=yes
9625else
9626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9627/* end confdefs.h. */
9628
9629int main()
9630{
9631 char s[16];
9632 int i, *p1, *p2;
9633 for (i=0; i < 16; i++)
9634 s[i] = i;
9635 p1 = (int*)(s+1);
9636 p2 = (int*)(s+2);
9637 if (*p1 == *p2)
9638 return 1;
9639 return 0;
9640}
9641
9642_ACEOF
9643if ac_fn_c_try_run "$LINENO"; then :
9644 aligned_required=no
9645else
9646 aligned_required=yes
9647fi
9648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9649 conftest.$ac_objext conftest.beam conftest.$ac_ext
9650fi
9651
9652
9653if test "$aligned_required" = yes ; then
9654
9655$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9656
9657fi
9658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9659$as_echo "$aligned_required" >&6; }
9660
9661
9662# str, bytes and memoryview hash algorithm
9663
9664
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9666$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9667
9668# Check whether --with-hash_algorithm was given.
9669if test "${with_hash_algorithm+set}" = set; then :
9670 withval=$with_hash_algorithm;
9671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9672$as_echo "$withval" >&6; }
9673case "$withval" in
9674 siphash24)
9675 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9676
9677 ;;
9678 fnv)
9679 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9680
9681 ;;
9682 *)
9683 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9684 ;;
9685esac
9686
9687else
9688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9689$as_echo "default" >&6; }
9690fi
9691
9692
Charles-François Natalid30b0222014-05-08 23:08:51 +01009693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9694$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9695
9696# Check whether --with-address_sanitizer was given.
9697if test "${with_address_sanitizer+set}" = set; then :
9698 withval=$with_address_sanitizer;
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9700$as_echo "$withval" >&6; }
9701BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9702LDFLAGS="-fsanitize=address $LDFLAGS"
9703
9704else
9705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706$as_echo "no" >&6; }
9707fi
9708
9709
Guido van Rossum70c7f481998-03-26 18:44:10 +00009710# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9712$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009713if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009715else
Martin v. Löwis11437992002-04-12 09:54:03 +00009716 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009717LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009721/* Override any GCC internal prototype to avoid an error.
9722 Use char because int might match the return type of a GCC
9723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009724#ifdef __cplusplus
9725extern "C"
9726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009727char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009728int
9729main ()
9730{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009731return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ;
9733 return 0;
9734}
9735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009736if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009738else
Matthias Kloseb9621712010-04-24 17:59:49 +00009739 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009741rm -f core conftest.err conftest.$ac_objext \
9742 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009743LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9746$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009747if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009748 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009749fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009750 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9752$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009753if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009755else
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009757LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761/* Override any GCC internal prototype to avoid an error.
9762 Use char because int might match the return type of a GCC
9763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009764#ifdef __cplusplus
9765extern "C"
9766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009767char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009768int
9769main ()
9770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ;
9773 return 0;
9774}
9775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009778else
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009781rm -f core conftest.err conftest.$ac_objext \
9782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009783LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9786$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009787if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009788 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009789fi
9790 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009791
Matthias Kloseb9621712010-04-24 17:59:49 +00009792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9793$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009795# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009796if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9799$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009800LIBS="$withval $LIBS"
9801
9802else
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805fi
9806
Guido van Rossum7f43da71994-08-01 12:15:30 +00009807
Victor Stinner8291b5e2015-03-20 16:03:14 +01009808
9809
9810
9811
9812
9813
9814
9815if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9816 if test -n "$ac_tool_prefix"; then
9817 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9818set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9820$as_echo_n "checking for $ac_word... " >&6; }
9821if ${ac_cv_path_PKG_CONFIG+:} false; then :
9822 $as_echo_n "(cached) " >&6
9823else
9824 case $PKG_CONFIG in
9825 [\\/]* | ?:[\\/]*)
9826 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9827 ;;
9828 *)
9829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9830for as_dir in $PATH
9831do
9832 IFS=$as_save_IFS
9833 test -z "$as_dir" && as_dir=.
9834 for ac_exec_ext in '' $ac_executable_extensions; do
9835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9836 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9838 break 2
9839 fi
9840done
9841 done
9842IFS=$as_save_IFS
9843
9844 ;;
9845esac
9846fi
9847PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9848if test -n "$PKG_CONFIG"; then
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9850$as_echo "$PKG_CONFIG" >&6; }
9851else
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
9854fi
9855
9856
9857fi
9858if test -z "$ac_cv_path_PKG_CONFIG"; then
9859 ac_pt_PKG_CONFIG=$PKG_CONFIG
9860 # Extract the first word of "pkg-config", so it can be a program name with args.
9861set dummy pkg-config; ac_word=$2
9862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9863$as_echo_n "checking for $ac_word... " >&6; }
9864if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9865 $as_echo_n "(cached) " >&6
9866else
9867 case $ac_pt_PKG_CONFIG in
9868 [\\/]* | ?:[\\/]*)
9869 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9870 ;;
9871 *)
9872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9873for as_dir in $PATH
9874do
9875 IFS=$as_save_IFS
9876 test -z "$as_dir" && as_dir=.
9877 for ac_exec_ext in '' $ac_executable_extensions; do
9878 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9879 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9881 break 2
9882 fi
9883done
9884 done
9885IFS=$as_save_IFS
9886
9887 ;;
9888esac
9889fi
9890ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9891if test -n "$ac_pt_PKG_CONFIG"; then
9892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9893$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9894else
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9896$as_echo "no" >&6; }
9897fi
9898
9899 if test "x$ac_pt_PKG_CONFIG" = x; then
9900 PKG_CONFIG=""
9901 else
9902 case $cross_compiling:$ac_tool_warned in
9903yes:)
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9906ac_tool_warned=yes ;;
9907esac
9908 PKG_CONFIG=$ac_pt_PKG_CONFIG
9909 fi
9910else
9911 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9912fi
9913
9914fi
9915if test -n "$PKG_CONFIG"; then
9916 _pkg_min_version=0.9.0
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9918$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9919 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9921$as_echo "yes" >&6; }
9922 else
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9924$as_echo "no" >&6; }
9925 PKG_CONFIG=""
9926 fi
9927fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009928
9929# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9931$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009932
9933# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009934if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009935 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009936else
9937 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009938fi
9939
9940
Matthias Kloseb9621712010-04-24 17:59:49 +00009941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9942$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009943
9944# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9946$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009947
9948# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009949if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009950 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009951else
9952 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009953fi
9954
9955
9956if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009957 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9958else
9959 LIBFFI_INCLUDEDIR=""
9960fi
9961
9962
Matthias Kloseb9621712010-04-24 17:59:49 +00009963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9964$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009965
Stefan Krah60187b52012-03-23 19:06:27 +01009966# Check for use of the system libmpdec library
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9968$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9969
9970# Check whether --with-system_libmpdec was given.
9971if test "${with_system_libmpdec+set}" = set; then :
9972 withval=$with_system_libmpdec;
9973else
9974 with_system_libmpdec="no"
9975fi
9976
9977
9978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9979$as_echo "$with_system_libmpdec" >&6; }
9980
Benjamin Peterson076ed002010-10-31 17:11:02 +00009981# Check for support for loadable sqlite extensions
9982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9983$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9984# Check whether --enable-loadable-sqlite-extensions was given.
9985if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9986 enableval=$enable_loadable_sqlite_extensions;
9987else
9988 enable_loadable_sqlite_extensions="no"
9989fi
9990
9991
9992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9993$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9994
Ned Deilyd819b932013-09-06 01:07:05 -07009995# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9996
9997
9998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9999$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10000
10001# Check whether --with-tcltk-includes was given.
10002if test "${with_tcltk_includes+set}" = set; then :
10003 withval=$with_tcltk_includes;
10004else
10005 with_tcltk_includes="default"
10006fi
10007
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10009$as_echo "$with_tcltk_includes" >&6; }
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10011$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10012
10013# Check whether --with-tcltk-libs was given.
10014if test "${with_tcltk_libs+set}" = set; then :
10015 withval=$with_tcltk_libs;
10016else
10017 with_tcltk_libs="default"
10018fi
10019
10020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10021$as_echo "$with_tcltk_libs" >&6; }
10022if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10023then
10024 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10025 then
10026 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10027 fi
10028 TCLTK_INCLUDES=""
10029 TCLTK_LIBS=""
10030else
10031 TCLTK_INCLUDES="$with_tcltk_includes"
10032 TCLTK_LIBS="$with_tcltk_libs"
10033fi
10034
Matthias Klose55708cc2009-04-30 08:06:49 +000010035# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10037$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010038
10039# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010040if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010041 withval=$with_dbmliborder;
10042if test x$with_dbmliborder = xyes
10043then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010044as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010045else
10046 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10047 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10048 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010049 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010050 fi
10051 done
10052fi
10053fi
10054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10056$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010057
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010058# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010059
10060
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10062$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010065if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066 withval=$with_signal_module;
10067fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010068
10069
10070if test -z "$with_signal_module"
10071then with_signal_module="yes"
10072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10074$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010075
10076if test "${with_signal_module}" = "yes"; then
10077 USE_SIGNAL_MODULE=""
10078 SIGNAL_OBJS=""
10079else
10080 USE_SIGNAL_MODULE="#"
10081 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10082fi
10083
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010084# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010085
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010086USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010088
Martin v. Löwis11437992002-04-12 09:54:03 +000010089
10090# Templates for things AC_DEFINEd more than once.
10091# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010092
10093
Martin v. Löwis11437992002-04-12 09:54:03 +000010094
Matthias Kloseb9621712010-04-24 17:59:49 +000010095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10096$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010099if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100 withval=$with_threads;
10101fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010102
10103
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010104# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010107if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108 withval=$with_thread; with_threads=$with_thread
10109fi
10110
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010111
10112if test -z "$with_threads"
10113then with_threads="yes"
10114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10116$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010117
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010118
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010119if test "$with_threads" = "no"
10120then
10121 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010122elif test "$ac_cv_pthread_is_default" = yes
10123then
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010125
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010126 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010127 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010128
10129 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010131elif test "$ac_cv_kpthread" = "yes"
10132then
10133 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010134 if test "$ac_cv_cxx_thread" = "yes"; then
10135 CXX="$CXX -Kpthread"
10136 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010137 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010138
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010139 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010140 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010141elif test "$ac_cv_kthread" = "yes"
10142then
10143 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010144 if test "$ac_cv_cxx_thread" = "yes"; then
10145 CXX="$CXX -Kthread"
10146 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010148
10149 posix_threads=yes
10150 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010151elif test "$ac_cv_pthread" = "yes"
10152then
10153 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010154 if test "$ac_cv_cxx_thread" = "yes"; then
10155 CXX="$CXX -pthread"
10156 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010158
10159 posix_threads=yes
10160 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010161else
10162 if test ! -z "$with_threads" -a -d "$with_threads"
10163 then LDFLAGS="$LDFLAGS -L$with_threads"
10164 fi
10165 if test ! -z "$withval" -a -d "$withval"
10166 then LDFLAGS="$LDFLAGS -L$withval"
10167 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010168
10169 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010170 # define _POSIX_THREADS in unistd.h. Some apparently don't
10171 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10173$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010175/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010176
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010177#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010178#ifdef _POSIX_THREADS
10179yes
10180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010181
10182_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010183if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010185 unistd_defines_pthreads=yes
10186else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010187 unistd_defines_pthreads=no
10188fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010189rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010190
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10192$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010193
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010195
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010196 # Just looking for pthread_create in libpthread is not enough:
10197 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10198 # So we really have to include pthread.h, and then link.
10199 _libs=$LIBS
10200 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10202$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010204/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010205
10206#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010207#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010208
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010209void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010210int
10211main ()
10212{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010213
10214pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 ;
10216 return 0;
10217}
10218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010219if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010220
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10222$as_echo "yes" >&6; }
10223 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010224
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010225 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010226 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010227else
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010229 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010230 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010231if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010233
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010234 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010235 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010236else
Guido van Rossumad678af1998-10-02 14:42:15 +000010237
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10239$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010240if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010242else
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010244LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248/* Override any GCC internal prototype to avoid an error.
10249 Use char because int might match the return type of a GCC
10250 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010251#ifdef __cplusplus
10252extern "C"
10253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010254char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010255int
10256main ()
10257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ;
10260 return 0;
10261}
10262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010263if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010265else
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010268rm -f core conftest.err conftest.$ac_objext \
10269 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010270LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10273$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010274if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010276
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010277 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010278 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010279 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010280else
Greg Steinadf63d62000-07-05 10:38:09 +000010281
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10283$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010284if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010286else
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010288LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010292/* Override any GCC internal prototype to avoid an error.
10293 Use char because int might match the return type of a GCC
10294 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010295#ifdef __cplusplus
10296extern "C"
10297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010298char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010299int
10300main ()
10301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 ;
10304 return 0;
10305}
10306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010309else
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010312rm -f core conftest.err conftest.$ac_objext \
10313 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010314LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10317$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010318if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010320
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010321 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010322 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010323 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010324else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010325
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10327$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010328if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010330else
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010332LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336/* Override any GCC internal prototype to avoid an error.
10337 Use char because int might match the return type of a GCC
10338 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010339#ifdef __cplusplus
10340extern "C"
10341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010342char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010343int
10344main ()
10345{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 ;
10348 return 0;
10349}
10350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010351if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010353else
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010356rm -f core conftest.err conftest.$ac_objext \
10357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010358LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10361$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010362if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010364
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010365 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010366 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010367 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010368else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010369
Matthias Kloseb9621712010-04-24 17:59:49 +000010370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10371$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010372if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010373 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010374else
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010376LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380/* Override any GCC internal prototype to avoid an error.
10381 Use char because int might match the return type of a GCC
10382 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010383#ifdef __cplusplus
10384extern "C"
10385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010386char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010387int
10388main ()
10389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010390return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 ;
10392 return 0;
10393}
10394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010395if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010397else
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010400rm -f core conftest.err conftest.$ac_objext \
10401 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010402LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10405$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010406if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010407 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010408
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010409 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010410 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010411 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010412else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010413
Martin v. Löwis130fb172001-07-19 11:00:41 +000010414 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010415fi
10416
Guido van Rossum627b2d71993-12-24 10:39:16 +000010417
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010418fi
10419
Guido van Rossum0be3e491997-05-22 20:33:33 +000010420fi
10421
Guido van Rossum49545951997-12-02 19:28:29 +000010422fi
10423
Guido van Rossumb93a8621998-05-07 13:27:32 +000010424fi
10425
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010427rm -f core conftest.err conftest.$ac_objext \
10428 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010429
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10431$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010432if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010434else
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010436LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440/* Override any GCC internal prototype to avoid an error.
10441 Use char because int might match the return type of a GCC
10442 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010443#ifdef __cplusplus
10444extern "C"
10445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010446char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010447int
10448main ()
10449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 ;
10452 return 0;
10453}
10454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010455if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010457else
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010460rm -f core conftest.err conftest.$ac_objext \
10461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010462LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10465$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010466if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010468
Martin v. Löwis130fb172001-07-19 11:00:41 +000010469 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010470 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010471 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010472fi
10473
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010474
Neal Norwitza978ab02002-11-02 16:58:05 +000010475 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10477$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010478if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010480else
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010482LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486/* Override any GCC internal prototype to avoid an error.
10487 Use char because int might match the return type of a GCC
10488 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010489#ifdef __cplusplus
10490extern "C"
10491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010492char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010493int
10494main ()
10495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010497 ;
10498 return 0;
10499}
10500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010501if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010503else
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010506rm -f core conftest.err conftest.$ac_objext \
10507 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010508LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10511$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010512if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010514
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010515 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010516 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010517 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010518fi
10519
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010520 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010521fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010522
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010523if test "$posix_threads" = "yes"; then
10524 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010525
Matthias Kloseb9621712010-04-24 17:59:49 +000010526$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010527
10528 fi
10529
10530 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10531 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010532 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010533$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010534
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535 ;;
10536 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010537$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010538
10539 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010540 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010541$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010542
10543 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010544 esac
10545
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10547$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010548 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010549 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010550else
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552 ac_cv_pthread_system_supported=no
10553else
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010555/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010556
10557 #include <stdio.h>
10558 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010559 void *foo(void *parm) {
10560 return NULL;
10561 }
10562 main() {
10563 pthread_attr_t attr;
10564 pthread_t id;
10565 if (pthread_attr_init(&attr)) exit(-1);
10566 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10567 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10568 exit(0);
10569 }
10570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010571if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572 ac_cv_pthread_system_supported=yes
10573else
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010578fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580
Guido van Rossum627b2d71993-12-24 10:39:16 +000010581fi
10582
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10584$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010585 if test "$ac_cv_pthread_system_supported" = "yes"; then
10586
Matthias Kloseb9621712010-04-24 17:59:49 +000010587$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010588
10589 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 for ac_func in pthread_sigmask
10591do :
10592 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010593if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010594 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010595#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010597 case $ac_sys_system in
10598 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010601
10602 ;;
10603 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010604fi
10605done
10606
Christian Heimesf77b4b22013-08-21 13:26:05 +020010607 for ac_func in pthread_atfork
10608do :
10609 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10610if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10611 cat >>confdefs.h <<_ACEOF
10612#define HAVE_PTHREAD_ATFORK 1
10613_ACEOF
10614
10615fi
10616done
10617
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010618fi
10619
10620
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010621# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010622
Matthias Kloseb9621712010-04-24 17:59:49 +000010623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10624$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010626if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010628 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010631 ipv6=no
10632 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10634$as_echo "yes" >&6; }
10635 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010636
10637 ipv6=yes
10638 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010640else
Martin v. Löwis11437992002-04-12 09:54:03 +000010641
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010644 /* AF_INET6 available check */
10645#include <sys/types.h>
10646#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010647int
10648main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010649{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010650int domain = AF_INET6;
10651 ;
10652 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653}
Martin v. Löwis11437992002-04-12 09:54:03 +000010654_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010655if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10658$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010660
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010661else
Matthias Kloseb159a552010-04-25 21:00:44 +000010662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10664$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010665 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010666
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010667fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010670if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10672$as_echo_n "checking if RFC2553 API is available... " >&6; }
10673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010674/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010675
10676 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010677#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010678int
10679main ()
10680{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010681struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010682 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010683 ;
10684 return 0;
10685}
Matthias Kloseb159a552010-04-25 21:00:44 +000010686
Martin v. Löwis11437992002-04-12 09:54:03 +000010687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010688if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010689
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010691$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010692 ipv6=yes
10693
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010694else
Matthias Kloseb159a552010-04-25 21:00:44 +000010695
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010698 ipv6=no
10699
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010702fi
10703
10704if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010706
10707fi
10708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709fi
10710
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711
10712ipv6type=unknown
10713ipv6lib=none
10714ipv6trylibc=no
10715
10716if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10718$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010719 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10720 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010721 case $i in
10722 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010724/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010725
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726#include <netinet/in.h>
10727#ifdef IPV6_INRIA_VERSION
10728yes
10729#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010730_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010733 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010735rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010736
10737 ;;
10738 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010740/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010741
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010742#include <netinet/in.h>
10743#ifdef __KAME__
10744yes
10745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010746_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010749 ipv6type=$i;
10750 ipv6lib=inet6
10751 ipv6libdir=/usr/local/v6/lib
10752 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010754rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755
10756 ;;
10757 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010759/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010760
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761#include <features.h>
10762#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10763yes
10764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010765_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768 ipv6type=$i;
10769 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010771rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772
10773 ;;
10774 linux-inet6)
10775 if test -d /usr/inet6; then
10776 ipv6type=$i
10777 ipv6lib=inet6
10778 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010779 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780 fi
10781 ;;
10782 solaris)
10783 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010784 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785 ipv6type=$i
10786 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787 fi
10788 fi
10789 ;;
10790 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010792/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010793
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794#include <sys/param.h>
10795#ifdef _TOSHIBA_INET6
10796yes
10797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010798_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801 ipv6type=$i;
10802 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010803 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010805rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806
10807 ;;
10808 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010810/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812#include </usr/local/v6/include/sys/v6config.h>
10813#ifdef __V6D__
10814yes
10815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010816_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819 ipv6type=$i;
10820 ipv6lib=v6;
10821 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010822 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010824rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825
10826 ;;
10827 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010830
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831#include <sys/param.h>
10832#ifdef _ZETA_MINAMI_INET6
10833yes
10834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010835_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838 ipv6type=$i;
10839 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010840 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010842rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843
10844 ;;
10845 esac
10846 if test "$ipv6type" != "unknown"; then
10847 break
10848 fi
10849 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10851$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852fi
10853
10854if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10855 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10856 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10857 echo "using lib$ipv6lib"
10858 else
10859 if test $ipv6trylibc = "yes"; then
10860 echo "using libc"
10861 else
10862 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10863 echo "You need to fetch lib$ipv6lib.a from appropriate"
10864 echo 'ipv6 kit and compile beforehand.'
10865 exit 1
10866 fi
10867 fi
10868fi
10869
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10871$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10873/* end confdefs.h. */
10874 /* CAN_RAW_FD_FRAMES available check */
10875#include <linux/can/raw.h>
10876int
10877main ()
10878{
10879int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10880 ;
10881 return 0;
10882}
10883_ACEOF
10884if ac_fn_c_try_compile "$LINENO"; then :
10885
10886
10887$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10888
10889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10890$as_echo "yes" >&6; }
10891
10892else
10893
10894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10895$as_echo "no" >&6; }
10896
10897fi
10898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10901$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010903/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010904
10905 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010906int
10907main ()
10908{
10909FSIORefNum fRef = 0
10910 ;
10911 return 0;
10912}
Matthias Kloseb159a552010-04-25 21:00:44 +000010913
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010915if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010916
Matthias Kloseb159a552010-04-25 21:00:44 +000010917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10921$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010922
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010923else
Matthias Kloseb159a552010-04-25 21:00:44 +000010924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10926$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010927
10928fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10930
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010931# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10933$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010935# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010936if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937 withval=$with_doc_strings;
10938fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010939
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010940
10941if test -z "$with_doc_strings"
10942then with_doc_strings="yes"
10943fi
10944if test "$with_doc_strings" != "no"
10945then
10946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010948
10949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10951$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010952
Antoine Pitrou042b1282010-08-13 21:15:58 +000010953# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10955$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010958if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010960if test "$withval" != no
10961then
10962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10966$as_echo "yes" >&6; }
10967else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10968$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010969fi
10970else
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010973fi
10974
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010975
10976# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10978$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010981if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982 withval=$with_pymalloc;
10983fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010984
Neil Schemenauera35c6882001-02-27 04:45:05 +000010985
Neil Schemenauer16c22972002-03-22 15:34:49 +000010986if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010987then
10988 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010989fi
10990if test "$with_pymalloc" != "no"
10991then
Martin v. Löwis11437992002-04-12 09:54:03 +000010992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010994
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010995 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10998$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010999
Benjamin Peterson05159c42009-12-03 03:01:27 +000011000# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11002$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011003
11004# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011005if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011006 withval=$with_valgrind;
11007else
11008 with_valgrind=no
11009fi
11010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11012$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011013if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 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 +020011015if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011016
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011018
11019else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011020 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011021
11022fi
11023
11024
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011025 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011026fi
11027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011028# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011029
Guido van Rossum98935bf2001-09-05 19:13:16 +000011030DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011031
Guido van Rossume97ee181999-12-20 21:27:22 +000011032# the dlopen() function means we might want to use dynload_shlib.o. some
11033# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011034for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011035do :
11036 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011037if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011039#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011040_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011041
Guido van Rossume97ee181999-12-20 21:27:22 +000011042fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011043done
Guido van Rossume97ee181999-12-20 21:27:22 +000011044
Michael W. Hudson54241132001-12-07 15:38:26 +000011045
Guido van Rossume97ee181999-12-20 21:27:22 +000011046# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11047# loading of modules.
11048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11050$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011051if test -z "$DYNLOADFILE"
11052then
11053 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011054 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11055 if test "$ac_cv_func_dlopen" = yes
11056 then DYNLOADFILE="dynload_shlib.o"
11057 else DYNLOADFILE="dynload_aix.o"
11058 fi
11059 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011060 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011061 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11062 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011063 *)
11064 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11065 # out any dynamic loading
11066 if test "$ac_cv_func_dlopen" = yes
11067 then DYNLOADFILE="dynload_shlib.o"
11068 else DYNLOADFILE="dynload_stub.o"
11069 fi
11070 ;;
11071 esac
11072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11074$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011075if test "$DYNLOADFILE" != "dynload_stub.o"
11076then
Martin v. Löwis11437992002-04-12 09:54:03 +000011077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011079
11080fi
11081
Neil Schemenauer4e425612001-06-19 15:44:15 +000011082# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11083
Michael W. Hudson54241132001-12-07 15:38:26 +000011084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11086$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011087if test -z "$MACHDEP_OBJS"
11088then
Jack Jansene578a632001-08-15 01:27:14 +000011089 MACHDEP_OBJS=$extra_machdep_objs
11090else
11091 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011092fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011093if test -z "$MACHDEP_OBJS"; then
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11095$as_echo "none" >&6; }
11096else
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11098$as_echo "$MACHDEP_OBJS" >&6; }
11099fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011100
Guido van Rossum627b2d71993-12-24 10:39:16 +000011101# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011102for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011103 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011104 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011105 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011106 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011107 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011108 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011109 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11110 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011111 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011112 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011113 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011114 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011115 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011116 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011117 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11118 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011119 sigaction sigaltstack siginterrupt sigpending sigrelse \
11120 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011121 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011122 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011123 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011124do :
11125 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11126ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011127if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011129#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011130_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011131
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011132fi
11133done
11134
Michael W. Hudson54241132001-12-07 15:38:26 +000011135
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011136ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11137 #include <dirent.h>
11138"
11139if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11140
11141$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11142
11143fi
11144
11145
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011146# For some functions, having a definition is not sufficient, since
11147# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11149$as_echo_n "checking for chroot... " >&6; }
11150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011151/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011152#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011153int
11154main ()
11155{
11156void *x=chroot
11157 ;
11158 return 0;
11159}
11160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011161if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011162
Matthias Kloseb9621712010-04-24 17:59:49 +000011163$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011164
Matthias Kloseb159a552010-04-25 21:00:44 +000011165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011166$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011167else
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11169$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011170
11171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11174$as_echo_n "checking for link... " >&6; }
11175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011176/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011177#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011178int
11179main ()
11180{
11181void *x=link
11182 ;
11183 return 0;
11184}
11185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011187
Matthias Kloseb9621712010-04-24 17:59:49 +000011188$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011189
Matthias Kloseb159a552010-04-25 21:00:44 +000011190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011191$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011192else
Matthias Kloseb9621712010-04-24 17:59:49 +000011193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11194$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011195
11196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11199$as_echo_n "checking for symlink... " >&6; }
11200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011201/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011202#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011203int
11204main ()
11205{
11206void *x=symlink
11207 ;
11208 return 0;
11209}
11210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011211if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011214
Matthias Kloseb159a552010-04-25 21:00:44 +000011215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011216$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011217else
Matthias Kloseb9621712010-04-24 17:59:49 +000011218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011220
11221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11224$as_echo_n "checking for fchdir... " >&6; }
11225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011226/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011227#include <unistd.h>
11228int
11229main ()
11230{
11231void *x=fchdir
11232 ;
11233 return 0;
11234}
11235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011236if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011237
Matthias Kloseb9621712010-04-24 17:59:49 +000011238$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011239
Matthias Kloseb159a552010-04-25 21:00:44 +000011240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011241$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011242else
Matthias Kloseb9621712010-04-24 17:59:49 +000011243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11244$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011245
11246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11249$as_echo_n "checking for fsync... " >&6; }
11250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011251/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011252#include <unistd.h>
11253int
11254main ()
11255{
11256void *x=fsync
11257 ;
11258 return 0;
11259}
11260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011261if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011264
Matthias Kloseb159a552010-04-25 21:00:44 +000011265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011266$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011267else
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11269$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011270
11271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11274$as_echo_n "checking for fdatasync... " >&6; }
11275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011276/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011277#include <unistd.h>
11278int
11279main ()
11280{
11281void *x=fdatasync
11282 ;
11283 return 0;
11284}
11285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011289
Matthias Kloseb159a552010-04-25 21:00:44 +000011290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011291$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011292else
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11294$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011295
11296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11299$as_echo_n "checking for epoll... " >&6; }
11300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011301/* end confdefs.h. */
11302#include <sys/epoll.h>
11303int
11304main ()
11305{
11306void *x=epoll_create
11307 ;
11308 return 0;
11309}
11310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011314
Matthias Kloseb159a552010-04-25 21:00:44 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011316$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011317else
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11319$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011320
11321fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11324$as_echo_n "checking for epoll_create1... " >&6; }
11325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11326/* end confdefs.h. */
11327#include <sys/epoll.h>
11328int
11329main ()
11330{
11331void *x=epoll_create1
11332 ;
11333 return 0;
11334}
11335_ACEOF
11336if ac_fn_c_try_compile "$LINENO"; then :
11337
11338$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11339
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11341$as_echo "yes" >&6; }
11342else
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344$as_echo "no" >&6; }
11345
11346fi
11347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11349$as_echo_n "checking for kqueue... " >&6; }
11350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011351/* end confdefs.h. */
11352
11353#include <sys/types.h>
11354#include <sys/event.h>
11355
11356int
11357main ()
11358{
11359int x=kqueue()
11360 ;
11361 return 0;
11362}
11363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011367
Matthias Kloseb159a552010-04-25 21:00:44 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011369$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011370else
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011373
11374fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11377$as_echo_n "checking for prlimit... " >&6; }
11378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379/* end confdefs.h. */
11380
11381#include <sys/time.h>
11382#include <sys/resource.h>
11383
11384int
11385main ()
11386{
11387void *x=prlimit
11388 ;
11389 return 0;
11390}
11391_ACEOF
11392if ac_fn_c_try_compile "$LINENO"; then :
11393
11394$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11395
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11397$as_echo "yes" >&6; }
11398else
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11400$as_echo "no" >&6; }
11401
11402fi
11403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11404
Martin v. Löwisd5843682002-11-21 20:41:28 +000011405# On some systems (eg. FreeBSD 5), we would find a definition of the
11406# functions ctermid_r, setgroups in the library, but no prototype
11407# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11408# address to avoid compiler warnings and potential miscompilations
11409# because of the missing prototypes.
11410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11412$as_echo_n "checking for ctermid_r... " >&6; }
11413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011414/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011415
Martin v. Löwisd5843682002-11-21 20:41:28 +000011416#include <stdio.h>
11417
Martin v. Löwisd5843682002-11-21 20:41:28 +000011418int
11419main ()
11420{
11421void* p = ctermid_r
11422 ;
11423 return 0;
11424}
11425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011427
Matthias Kloseb9621712010-04-24 17:59:49 +000011428$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011429
Matthias Kloseb159a552010-04-25 21:00:44 +000011430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011431$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011432else
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011435
11436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11438
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11440$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011441if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011442 $as_echo_n "(cached) " >&6
11443else
11444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011445/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011446#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011447int
11448main ()
11449{
11450void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011451
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011452 ;
11453 return 0;
11454}
11455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011456if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011457 ac_cv_flock_decl=yes
11458else
11459 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011460
11461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011463
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011464fi
11465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11466$as_echo "$ac_cv_flock_decl" >&6; }
11467if test "x${ac_cv_flock_decl}" = xyes; then
11468 for ac_func in flock
11469do :
11470 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011471if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011472 cat >>confdefs.h <<_ACEOF
11473#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011474_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011475
Antoine Pitroua3000072010-09-07 14:52:42 +000011476else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011478$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011479if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011480 $as_echo_n "(cached) " >&6
11481else
11482 ac_check_lib_save_LIBS=$LIBS
11483LIBS="-lbsd $LIBS"
11484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11485/* end confdefs.h. */
11486
11487/* Override any GCC internal prototype to avoid an error.
11488 Use char because int might match the return type of a GCC
11489 builtin and then its argument prototype would still apply. */
11490#ifdef __cplusplus
11491extern "C"
11492#endif
11493char flock ();
11494int
11495main ()
11496{
11497return flock ();
11498 ;
11499 return 0;
11500}
11501_ACEOF
11502if ac_fn_c_try_link "$LINENO"; then :
11503 ac_cv_lib_bsd_flock=yes
11504else
11505 ac_cv_lib_bsd_flock=no
11506fi
11507rm -f core conftest.err conftest.$ac_objext \
11508 conftest$ac_exeext conftest.$ac_ext
11509LIBS=$ac_check_lib_save_LIBS
11510fi
11511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11512$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011513if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011514 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011515
11516
11517$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11518
11519
11520fi
11521
11522
11523fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011524done
11525
Antoine Pitroua3000072010-09-07 14:52:42 +000011526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527
Matthias Kloseb9621712010-04-24 17:59:49 +000011528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11529$as_echo_n "checking for getpagesize... " >&6; }
11530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011531/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011532
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011533#include <unistd.h>
11534
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011535int
11536main ()
11537{
11538void* p = getpagesize
11539 ;
11540 return 0;
11541}
11542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011544
Matthias Kloseb9621712010-04-24 17:59:49 +000011545$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011546
Matthias Kloseb159a552010-04-25 21:00:44 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011548$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011549else
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011552
11553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011555
Victor Stinner984890f2011-11-24 13:53:38 +010011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11557$as_echo_n "checking for broken unsetenv... " >&6; }
11558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11559/* end confdefs.h. */
11560
11561#include <stdlib.h>
11562
11563int
11564main ()
11565{
11566int res = unsetenv("DUMMY")
11567 ;
11568 return 0;
11569}
11570_ACEOF
11571if ac_fn_c_try_compile "$LINENO"; then :
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11573$as_echo "no" >&6; }
11574else
11575
11576$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11577
11578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11579$as_echo "yes" >&6; }
11580
11581fi
11582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11583
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011584for ac_prog in true
11585do
11586 # Extract the first word of "$ac_prog", so it can be a program name with args.
11587set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11589$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011590if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011592else
11593 if test -n "$TRUE"; then
11594 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11595else
11596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11597for as_dir in $PATH
11598do
11599 IFS=$as_save_IFS
11600 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011603 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 $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 +000011605 break 2
11606 fi
11607done
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011609IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011610
11611fi
11612fi
11613TRUE=$ac_cv_prog_TRUE
11614if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11616$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011617else
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11619$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011620fi
11621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011622
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011623 test -n "$TRUE" && break
11624done
11625test -n "$TRUE" || TRUE="/bin/true"
11626
11627
Matthias Kloseb9621712010-04-24 17:59:49 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11629$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011630if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011631 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011632else
11633 ac_check_lib_save_LIBS=$LIBS
11634LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011636/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638/* Override any GCC internal prototype to avoid an error.
11639 Use char because int might match the return type of a GCC
11640 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011641#ifdef __cplusplus
11642extern "C"
11643#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011644char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011645int
11646main ()
11647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011649 ;
11650 return 0;
11651}
11652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011654 ac_cv_lib_c_inet_aton=yes
11655else
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011658rm -f core conftest.err conftest.$ac_objext \
11659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011660LIBS=$ac_check_lib_save_LIBS
11661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11663$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011664if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011665 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011666else
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11668$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011669if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011671else
11672 ac_check_lib_save_LIBS=$LIBS
11673LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011675/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011677/* Override any GCC internal prototype to avoid an error.
11678 Use char because int might match the return type of a GCC
11679 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011680#ifdef __cplusplus
11681extern "C"
11682#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011683char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011684int
11685main ()
11686{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011687return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011688 ;
11689 return 0;
11690}
11691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011692if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011693 ac_cv_lib_resolv_inet_aton=yes
11694else
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011697rm -f core conftest.err conftest.$ac_objext \
11698 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011699LIBS=$ac_check_lib_save_LIBS
11700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11702$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011703if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011704 cat >>confdefs.h <<_ACEOF
11705#define HAVE_LIBRESOLV 1
11706_ACEOF
11707
11708 LIBS="-lresolv $LIBS"
11709
11710fi
11711
11712
11713fi
11714
11715
Christian Heimesd0764e22007-12-04 15:00:33 +000011716# On Tru64, chflags seems to be present, but calling it will
11717# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11719$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011720if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011722else
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011724 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011725else
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011727/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011728
Christian Heimesd0764e22007-12-04 15:00:33 +000011729#include <sys/stat.h>
11730#include <unistd.h>
11731int main(int argc, char*argv[])
11732{
11733 if(chflags(argv[0], 0) != 0)
11734 return 1;
11735 return 0;
11736}
Ned Deily3eb67d52011-06-28 00:00:28 -070011737
Christian Heimesd0764e22007-12-04 15:00:33 +000011738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011739if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011740 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011741else
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011746fi
11747
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11751$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011752if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011754if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011755 ac_cv_have_chflags="yes"
11756else
11757 ac_cv_have_chflags="no"
11758fi
11759
11760fi
11761if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011764
11765fi
11766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11768$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011769if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011771else
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011773 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011774else
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011776/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011777
Christian Heimesd0764e22007-12-04 15:00:33 +000011778#include <sys/stat.h>
11779#include <unistd.h>
11780int main(int argc, char*argv[])
11781{
11782 if(lchflags(argv[0], 0) != 0)
11783 return 1;
11784 return 0;
11785}
Ned Deily3eb67d52011-06-28 00:00:28 -070011786
Christian Heimesd0764e22007-12-04 15:00:33 +000011787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011788if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011789 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011795fi
11796
11797
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11800$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011801if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011803if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011804 ac_cv_have_lchflags="yes"
11805else
11806 ac_cv_have_lchflags="no"
11807fi
11808
11809fi
11810if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011811
Matthias Kloseb9621712010-04-24 17:59:49 +000011812$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011813
11814fi
11815
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011816case $ac_sys_system/$ac_sys_release in
11817Darwin/*)
11818 _CUR_CFLAGS="${CFLAGS}"
11819 _CUR_LDFLAGS="${LDFLAGS}"
11820 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11821 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11822 ;;
11823esac
11824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11826$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011827if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011829else
11830 ac_check_lib_save_LIBS=$LIBS
11831LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011833/* end confdefs.h. */
11834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835/* Override any GCC internal prototype to avoid an error.
11836 Use char because int might match the return type of a GCC
11837 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011838#ifdef __cplusplus
11839extern "C"
11840#endif
11841char inflateCopy ();
11842int
11843main ()
11844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011845return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011846 ;
11847 return 0;
11848}
11849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011850if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011851 ac_cv_lib_z_inflateCopy=yes
11852else
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011855rm -f core conftest.err conftest.$ac_objext \
11856 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011857LIBS=$ac_check_lib_save_LIBS
11858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11860$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011861if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011862
Matthias Kloseb9621712010-04-24 17:59:49 +000011863$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011864
11865fi
11866
11867
11868case $ac_sys_system/$ac_sys_release in
11869Darwin/*)
11870 CFLAGS="${_CUR_CFLAGS}"
11871 LDFLAGS="${_CUR_LDFLAGS}"
11872 ;;
11873esac
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11876$as_echo_n "checking for hstrerror... " >&6; }
11877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011878/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011879
Martin v. Löwise9416172003-05-03 10:12:45 +000011880#include <netdb.h>
11881
Martin v. Löwise9416172003-05-03 10:12:45 +000011882int
11883main ()
11884{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011885void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011886 ;
11887 return 0;
11888}
11889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011890if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011893
Matthias Kloseb159a552010-04-25 21:00:44 +000011894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011895$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011896else
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11898$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011899
11900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901rm -f core conftest.err conftest.$ac_objext \
11902 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011903
Matthias Kloseb9621712010-04-24 17:59:49 +000011904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11905$as_echo_n "checking for inet_aton... " >&6; }
11906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011907/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011908
Martin v. Löwis86d66262006-02-17 08:40:11 +000011909#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011910#include <sys/socket.h>
11911#include <netinet/in.h>
11912#include <arpa/inet.h>
11913
Martin v. Löwise9416172003-05-03 10:12:45 +000011914int
11915main ()
11916{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011917void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011918 ;
11919 return 0;
11920}
11921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011922if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011925
Matthias Kloseb159a552010-04-25 21:00:44 +000011926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011927$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011931
11932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933rm -f core conftest.err conftest.$ac_objext \
11934 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011935
Matthias Kloseb9621712010-04-24 17:59:49 +000011936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11937$as_echo_n "checking for inet_pton... " >&6; }
11938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011939/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011940
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011941#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011942#include <sys/socket.h>
11943#include <netinet/in.h>
11944#include <arpa/inet.h>
11945
Martin v. Löwise9416172003-05-03 10:12:45 +000011946int
11947main ()
11948{
11949void* p = inet_pton
11950 ;
11951 return 0;
11952}
11953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011954if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011955
Matthias Kloseb9621712010-04-24 17:59:49 +000011956$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011957
Matthias Kloseb159a552010-04-25 21:00:44 +000011958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011959$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011960else
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011963
11964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011966
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011967# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11969$as_echo_n "checking for setgroups... " >&6; }
11970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011971/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011972
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011973#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011974#ifdef HAVE_GRP_H
11975#include <grp.h>
11976#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011977
Martin v. Löwisd5843682002-11-21 20:41:28 +000011978int
11979main ()
11980{
11981void* p = setgroups
11982 ;
11983 return 0;
11984}
11985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011987
Matthias Kloseb9621712010-04-24 17:59:49 +000011988$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011989
Matthias Kloseb159a552010-04-25 21:00:44 +000011990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011991$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011992else
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011995
11996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011998
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011999# check for openpty and forkpty
12000
12001for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012002do :
12003 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012004if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012006#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012007_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012008
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012009else
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12011$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012012if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012014else
Martin v. Löwis11437992002-04-12 09:54:03 +000012015 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012016LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020/* Override any GCC internal prototype to avoid an error.
12021 Use char because int might match the return type of a GCC
12022 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012023#ifdef __cplusplus
12024extern "C"
12025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012026char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012027int
12028main ()
12029{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012030return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 ;
12032 return 0;
12033}
12034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012035if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012036 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012037else
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012040rm -f core conftest.err conftest.$ac_objext \
12041 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012042LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12045$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012046if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012048 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012049else
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12051$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012052if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012053 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012054else
12055 ac_check_lib_save_LIBS=$LIBS
12056LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012058/* end confdefs.h. */
12059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060/* Override any GCC internal prototype to avoid an error.
12061 Use char because int might match the return type of a GCC
12062 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012063#ifdef __cplusplus
12064extern "C"
12065#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012066char openpty ();
12067int
12068main ()
12069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012071 ;
12072 return 0;
12073}
12074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012075if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012076 ac_cv_lib_bsd_openpty=yes
12077else
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012080rm -f core conftest.err conftest.$ac_objext \
12081 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012082LIBS=$ac_check_lib_save_LIBS
12083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12085$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012088 LIBS="$LIBS -lbsd"
12089fi
12090
12091
12092fi
12093
Fred Drake8cef4cf2000-06-28 16:40:38 +000012094
12095fi
12096done
12097
12098for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012099do :
12100 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012101if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012103#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012104_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012105
Fred Drake8cef4cf2000-06-28 16:40:38 +000012106else
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12108$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012109if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012111else
Martin v. Löwis11437992002-04-12 09:54:03 +000012112 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012113LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117/* Override any GCC internal prototype to avoid an error.
12118 Use char because int might match the return type of a GCC
12119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012120#ifdef __cplusplus
12121extern "C"
12122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012123char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012124int
12125main ()
12126{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 ;
12129 return 0;
12130}
12131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012132if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012134else
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012137rm -f core conftest.err conftest.$ac_objext \
12138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012139LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12142$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012143if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012145 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12148$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012149if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012151else
12152 ac_check_lib_save_LIBS=$LIBS
12153LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012155/* end confdefs.h. */
12156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012157/* Override any GCC internal prototype to avoid an error.
12158 Use char because int might match the return type of a GCC
12159 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012160#ifdef __cplusplus
12161extern "C"
12162#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012163char forkpty ();
12164int
12165main ()
12166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012167return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012168 ;
12169 return 0;
12170}
12171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012172if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012173 ac_cv_lib_bsd_forkpty=yes
12174else
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012177rm -f core conftest.err conftest.$ac_objext \
12178 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012179LIBS=$ac_check_lib_save_LIBS
12180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12182$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012183if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012185 LIBS="$LIBS -lbsd"
12186fi
12187
12188
12189fi
12190
Fred Drake8cef4cf2000-06-28 16:40:38 +000012191
12192fi
12193done
12194
Jack Jansendd19cf82001-12-06 22:36:17 +000012195
Christian Heimesb186d002008-03-18 15:15:01 +000012196# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012197for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012198do :
12199 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012200if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012201 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012202#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012203_ACEOF
12204
12205fi
12206done
12207
12208
Michael W. Hudson54241132001-12-07 15:38:26 +000012209# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012210for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012211do :
12212 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12213ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012214if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012216#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012217_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012218
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012219fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220done
12221
Michael W. Hudson54241132001-12-07 15:38:26 +000012222
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012223ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012224if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012225 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012226
Martin v. Löwis1142de32002-03-29 16:28:31 +000012227else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012229 *" dup2.$ac_objext "* ) ;;
12230 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012232esac
12233
Martin v. Löwis1142de32002-03-29 16:28:31 +000012234fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012235
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012236ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012237if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012238 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12239
12240else
12241 case " $LIBOBJS " in
12242 *" strdup.$ac_objext "* ) ;;
12243 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12244 ;;
12245esac
12246
12247fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012248
12249
12250for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012251do :
12252 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012253if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012255#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012258/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012259#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012260int
12261main ()
12262{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012263getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 ;
12265 return 0;
12266}
12267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012271
Guido van Rossum627b2d71993-12-24 10:39:16 +000012272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012274
Guido van Rossum627b2d71993-12-24 10:39:16 +000012275fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012276done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012277
Jack Jansen150753c2003-03-29 22:07:47 +000012278for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012279do :
12280 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012281if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012282 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012286/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012287#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012288int
12289main ()
12290{
12291setpgrp(0,0);
12292 ;
12293 return 0;
12294}
12295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012299
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012302
12303fi
12304done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012305
Thomas Wouters3a584202000-08-05 23:28:51 +000012306for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012307do :
12308 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012309if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012310 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012311#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012314/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012315#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012316int
12317main ()
12318{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012319gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012320 ;
12321 return 0;
12322}
12323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324if ac_fn_c_try_compile "$LINENO"; then :
12325
Guido van Rossum627b2d71993-12-24 10:39:16 +000012326else
Skip Montanaro6dead952003-09-25 14:50:04 +000012327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012329
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
Guido van Rossum627b2d71993-12-24 10:39:16 +000012331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012333
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012334fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012335done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012336
Michael W. Hudson54241132001-12-07 15:38:26 +000012337
Victor Stinnere0be4232011-10-25 13:06:09 +020012338for ac_func in clock_gettime
12339do :
12340 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12341if test "x$ac_cv_func_clock_gettime" = xyes; then :
12342 cat >>confdefs.h <<_ACEOF
12343#define HAVE_CLOCK_GETTIME 1
12344_ACEOF
12345
12346else
12347
12348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12349$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12350if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12351 $as_echo_n "(cached) " >&6
12352else
12353 ac_check_lib_save_LIBS=$LIBS
12354LIBS="-lrt $LIBS"
12355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12356/* end confdefs.h. */
12357
12358/* Override any GCC internal prototype to avoid an error.
12359 Use char because int might match the return type of a GCC
12360 builtin and then its argument prototype would still apply. */
12361#ifdef __cplusplus
12362extern "C"
12363#endif
12364char clock_gettime ();
12365int
12366main ()
12367{
12368return clock_gettime ();
12369 ;
12370 return 0;
12371}
12372_ACEOF
12373if ac_fn_c_try_link "$LINENO"; then :
12374 ac_cv_lib_rt_clock_gettime=yes
12375else
12376 ac_cv_lib_rt_clock_gettime=no
12377fi
12378rm -f core conftest.err conftest.$ac_objext \
12379 conftest$ac_exeext conftest.$ac_ext
12380LIBS=$ac_check_lib_save_LIBS
12381fi
12382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12383$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12384if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12385
Victor Stinner7efb8332014-08-29 15:41:08 +020012386 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012387 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12388
12389
12390$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12391
12392
12393fi
12394
12395
12396fi
12397done
12398
12399
12400for ac_func in clock_getres
12401do :
12402 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12403if test "x$ac_cv_func_clock_getres" = xyes; then :
12404 cat >>confdefs.h <<_ACEOF
12405#define HAVE_CLOCK_GETRES 1
12406_ACEOF
12407
12408else
12409
12410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12411$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12412if ${ac_cv_lib_rt_clock_getres+:} false; then :
12413 $as_echo_n "(cached) " >&6
12414else
12415 ac_check_lib_save_LIBS=$LIBS
12416LIBS="-lrt $LIBS"
12417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12418/* end confdefs.h. */
12419
12420/* Override any GCC internal prototype to avoid an error.
12421 Use char because int might match the return type of a GCC
12422 builtin and then its argument prototype would still apply. */
12423#ifdef __cplusplus
12424extern "C"
12425#endif
12426char clock_getres ();
12427int
12428main ()
12429{
12430return clock_getres ();
12431 ;
12432 return 0;
12433}
12434_ACEOF
12435if ac_fn_c_try_link "$LINENO"; then :
12436 ac_cv_lib_rt_clock_getres=yes
12437else
12438 ac_cv_lib_rt_clock_getres=no
12439fi
12440rm -f core conftest.err conftest.$ac_objext \
12441 conftest$ac_exeext conftest.$ac_ext
12442LIBS=$ac_check_lib_save_LIBS
12443fi
12444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12445$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12446if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12447
12448 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12449
12450
12451fi
12452
12453
12454fi
12455done
12456
12457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12459$as_echo_n "checking for major... " >&6; }
12460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012462
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012463#if defined(MAJOR_IN_MKDEV)
12464#include <sys/mkdev.h>
12465#elif defined(MAJOR_IN_SYSMACROS)
12466#include <sys/sysmacros.h>
12467#else
12468#include <sys/types.h>
12469#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012470
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012471int
12472main ()
12473{
12474
12475 makedev(major(0),minor(0));
12476
12477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012482
12483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12487$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012488
12489else
Skip Montanaro6dead952003-09-25 14:50:04 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12492$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012493
12494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012495rm -f core conftest.err conftest.$ac_objext \
12496 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012497
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012498# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012499# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12501$as_echo_n "checking for getaddrinfo... " >&6; }
12502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012503/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012504
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012505#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012506#include <sys/socket.h>
12507#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012508#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012509
Martin v. Löwis11437992002-04-12 09:54:03 +000012510int
12511main ()
12512{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012513getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ;
12515 return 0;
12516}
12517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012518if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012519 have_getaddrinfo=yes
12520else
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012523rm -f core conftest.err conftest.$ac_objext \
12524 conftest$ac_exeext conftest.$ac_ext
12525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12526$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012527if test $have_getaddrinfo = yes
12528then
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12530$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012531 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012535
12536if test "${enable_ipv6+set}" = set; then
12537 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12538else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012539 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012540fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012541else
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012543/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012544
Stefan Krah19c21392012-11-22 23:47:32 +010012545#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012546#include <sys/types.h>
12547#include <netdb.h>
12548#include <string.h>
12549#include <sys/socket.h>
12550#include <netinet/in.h>
12551
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012552int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012553{
12554 int passive, gaierr, inet4 = 0, inet6 = 0;
12555 struct addrinfo hints, *ai, *aitop;
12556 char straddr[INET6_ADDRSTRLEN], strport[16];
12557
12558 for (passive = 0; passive <= 1; passive++) {
12559 memset(&hints, 0, sizeof(hints));
12560 hints.ai_family = AF_UNSPEC;
12561 hints.ai_flags = passive ? AI_PASSIVE : 0;
12562 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012563 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012564 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12565 (void)gai_strerror(gaierr);
12566 goto bad;
12567 }
12568 for (ai = aitop; ai; ai = ai->ai_next) {
12569 if (ai->ai_addr == NULL ||
12570 ai->ai_addrlen == 0 ||
12571 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12572 straddr, sizeof(straddr), strport, sizeof(strport),
12573 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12574 goto bad;
12575 }
12576 switch (ai->ai_family) {
12577 case AF_INET:
12578 if (strcmp(strport, "54321") != 0) {
12579 goto bad;
12580 }
12581 if (passive) {
12582 if (strcmp(straddr, "0.0.0.0") != 0) {
12583 goto bad;
12584 }
12585 } else {
12586 if (strcmp(straddr, "127.0.0.1") != 0) {
12587 goto bad;
12588 }
12589 }
12590 inet4++;
12591 break;
12592 case AF_INET6:
12593 if (strcmp(strport, "54321") != 0) {
12594 goto bad;
12595 }
12596 if (passive) {
12597 if (strcmp(straddr, "::") != 0) {
12598 goto bad;
12599 }
12600 } else {
12601 if (strcmp(straddr, "::1") != 0) {
12602 goto bad;
12603 }
12604 }
12605 inet6++;
12606 break;
12607 case AF_UNSPEC:
12608 goto bad;
12609 break;
12610 default:
12611 /* another family support? */
12612 break;
12613 }
12614 }
12615 }
12616
12617 if (!(inet4 == 0 || inet4 == 2))
12618 goto bad;
12619 if (!(inet6 == 0 || inet6 == 2))
12620 goto bad;
12621
12622 if (aitop)
12623 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012624 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012625
12626 bad:
12627 if (aitop)
12628 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012629 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012630}
12631
Martin v. Löwis11437992002-04-12 09:54:03 +000012632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012634 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012635else
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012642fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012643
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12647$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12648
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012649if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012650then
12651 if test $ipv6 = yes
12652 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012653 echo 'Fatal: You must get working getaddrinfo() function.'
12654 echo ' or you can specify "--disable-ipv6"'.
12655 exit 1
12656 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012657else
Martin v. Löwis11437992002-04-12 09:54:03 +000012658
Matthias Kloseb9621712010-04-24 17:59:49 +000012659$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012660
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012661fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012662
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012663for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012664do :
12665 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012666if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012667 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012668#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012669_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012670
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012671fi
12672done
12673
Michael W. Hudson54241132001-12-07 15:38:26 +000012674
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012675# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12677$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012678if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012680else
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683#include <sys/types.h>
12684#include <sys/time.h>
12685#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Martin v. Löwis11437992002-04-12 09:54:03 +000012687int
12688main ()
12689{
12690if ((struct tm *) 0)
12691return 0;
12692 ;
12693 return 0;
12694}
12695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012696if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012697 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012698else
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12704$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012705if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012708
12709fi
12710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12712$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012713if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012714 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012715else
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012717/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718#include <sys/types.h>
12719#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Martin v. Löwis11437992002-04-12 09:54:03 +000012721int
12722main ()
12723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724struct tm tm;
12725 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ;
12728 return 0;
12729}
12730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012731if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012732 ac_cv_struct_tm=time.h
12733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12739$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012740if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012741
Matthias Kloseb9621712010-04-24 17:59:49 +000012742$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012743
12744fi
12745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746ac_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 +000012747#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749"
Victor Stinnere0be4232011-10-25 13:06:09 +020012750if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012751
12752cat >>confdefs.h <<_ACEOF
12753#define HAVE_STRUCT_TM_TM_ZONE 1
12754_ACEOF
12755
12756
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012757fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012758
Martin v. Löwis11437992002-04-12 09:54:03 +000012759if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762
12763else
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12765"
Victor Stinnere0be4232011-10-25 13:06:09 +020012766if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768else
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770fi
12771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012773#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774_ACEOF
12775
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12777$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012778if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780else
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012782/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012783#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784#if !HAVE_DECL_TZNAME
12785extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
Martin v. Löwis11437992002-04-12 09:54:03 +000012788int
12789main ()
12790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 ;
12793 return 0;
12794}
12795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012797 ac_cv_var_tzname=yes
12798else
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012801rm -f core conftest.err conftest.$ac_objext \
12802 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12805$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012806 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012809
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012810 fi
12811fi
12812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813ac_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 +020012814if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012815
12816cat >>confdefs.h <<_ACEOF
12817#define HAVE_STRUCT_STAT_ST_RDEV 1
12818_ACEOF
12819
12820
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012821fi
12822
Matthias Kloseb9621712010-04-24 17:59:49 +000012823ac_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 +020012824if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012825
Martin v. Löwis11437992002-04-12 09:54:03 +000012826cat >>confdefs.h <<_ACEOF
12827#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12828_ACEOF
12829
12830
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012831fi
12832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833ac_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 +020012834if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012835
12836cat >>confdefs.h <<_ACEOF
12837#define HAVE_STRUCT_STAT_ST_FLAGS 1
12838_ACEOF
12839
12840
12841fi
12842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843ac_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 +020012844if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012845
12846cat >>confdefs.h <<_ACEOF
12847#define HAVE_STRUCT_STAT_ST_GEN 1
12848_ACEOF
12849
12850
12851fi
12852
Matthias Kloseb9621712010-04-24 17:59:49 +000012853ac_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 +020012854if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012855
12856cat >>confdefs.h <<_ACEOF
12857#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12858_ACEOF
12859
12860
12861fi
12862
Matthias Kloseb9621712010-04-24 17:59:49 +000012863ac_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 +020012864if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012865
Martin v. Löwis11437992002-04-12 09:54:03 +000012866cat >>confdefs.h <<_ACEOF
12867#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12868_ACEOF
12869
12870
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012871fi
12872
Stefan Krah267b6392016-04-26 01:09:18 +020012873ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12874 #include <sys/types.h>
12875 #include <pwd.h>
12876
12877"
12878if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12879
12880cat >>confdefs.h <<_ACEOF
12881#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12882_ACEOF
12883
12884
12885fi
12886ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12887 #include <sys/types.h>
12888 #include <pwd.h>
12889
12890"
12891if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12892
12893cat >>confdefs.h <<_ACEOF
12894#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12895_ACEOF
12896
12897
12898fi
12899
Michael W. Hudson54241132001-12-07 15:38:26 +000012900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12902$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012903if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905else
Matthias Kloseb159a552010-04-25 21:00:44 +000012906
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012908/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012909#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012910int
12911main ()
12912{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012913return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 ;
12915 return 0;
12916}
12917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012918if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012919 ac_cv_header_time_altzone=yes
12920else
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925fi
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12928$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012932
12933fi
12934
Guido van Rossumda88dad1995-01-26 00:46:29 +000012935was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12937$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012939/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012940
12941#include <sys/types.h>
12942#include <sys/select.h>
12943#include <sys/time.h>
12944
Martin v. Löwis11437992002-04-12 09:54:03 +000012945int
12946main ()
12947{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948;
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 ;
12950 return 0;
12951}
12952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012953if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
12955
Matthias Kloseb9621712010-04-24 17:59:49 +000012956$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012958 was_it_defined=yes
12959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12963$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964
Matthias Kloseb9621712010-04-24 17:59:49 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12966$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012967if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012969else
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012971/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012972#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012973int
12974main ()
12975{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012976struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 ;
12978 return 0;
12979}
12980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012981if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012982 ac_cv_struct_addrinfo=yes
12983else
Matthias Kloseb9621712010-04-24 17:59:49 +000012984 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12987fi
12988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12990$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012991if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012992
Matthias Kloseb9621712010-04-24 17:59:49 +000012993$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012994
12995fi
12996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12998$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012999if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013001else
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013003/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004
13005# include <sys/types.h>
13006# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013007int
13008main ()
13009{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013010struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ;
13012 return 0;
13013}
13014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013015if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013016 ac_cv_struct_sockaddr_storage=yes
13017else
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13021fi
13022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13024$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013025if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013028
13029fi
13030
Christian Heimesdffa3942016-09-05 23:54:41 +020013031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13032$as_echo_n "checking for sockaddr_alg... " >&6; }
13033if ${ac_cv_struct_sockaddr_alg+:} false; then :
13034 $as_echo_n "(cached) " >&6
13035else
13036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13037/* end confdefs.h. */
13038
13039# include <sys/types.h>
13040# include <sys/socket.h>
13041# include <linux/if_alg.h>
13042int
13043main ()
13044{
13045struct sockaddr_alg s
13046 ;
13047 return 0;
13048}
13049_ACEOF
13050if ac_fn_c_try_compile "$LINENO"; then :
13051 ac_cv_struct_sockaddr_alg=yes
13052else
13053 ac_cv_struct_sockaddr_alg=no
13054fi
13055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13056fi
13057
13058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13059$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13060if test $ac_cv_struct_sockaddr_alg = yes; then
13061
13062$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13063
13064fi
13065
Guido van Rossum627b2d71993-12-24 10:39:16 +000013066# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013067
Matthias Kloseb9621712010-04-24 17:59:49 +000013068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13069$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013070if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013072else
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013075$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013076int
13077main ()
13078{
13079static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013080test_array [0] = 0;
13081return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013082
13083 ;
13084 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013085}
Martin v. Löwis11437992002-04-12 09:54:03 +000013086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013087if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013088 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013089else
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13095$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013096if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013098
13099fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13102$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013103if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013104 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013105else
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013107/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108
Martin v. Löwis11437992002-04-12 09:54:03 +000013109int
13110main ()
13111{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013112
Martin v. Löwis11437992002-04-12 09:54:03 +000013113#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013114 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013116 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013117 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013118 char const *const *pcpcc;
13119 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 /* NEC SVR4.0.2 mips cc rejects this. */
13121 struct point {int x, y;};
13122 static struct point const zero = {0,0};
13123 /* AIX XL C 1.02.0.0 rejects this.
13124 It does not let you subtract one const X* pointer from another in
13125 an arm of an if-expression whose if-part is not a constant
13126 expression */
13127 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013128 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130 ++pcpcc;
13131 ppc = (char**) pcpcc;
13132 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013133 { /* SCO 3.2v4 cc rejects this sort of thing. */
13134 char tx;
13135 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013137
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013139 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 }
13141 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13142 int x[] = {25, 17};
13143 const int *foo = &x[0];
13144 ++foo;
13145 }
13146 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13147 typedef const int *iptr;
13148 iptr p = 0;
13149 ++p;
13150 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013151 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013153 struct s { int j; const int *ap[3]; } bx;
13154 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 }
13156 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13157 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013158 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013161#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013162
Martin v. Löwis11437992002-04-12 09:54:03 +000013163 ;
13164 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013165}
Martin v. Löwis11437992002-04-12 09:54:03 +000013166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013167if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013168 ac_cv_c_const=yes
13169else
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13175$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013179
13180fi
13181
Michael W. Hudson54241132001-12-07 15:38:26 +000013182
Guido van Rossumda88dad1995-01-26 00:46:29 +000013183works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13185$as_echo_n "checking for working volatile... " >&6; }
13186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013187/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013188
Martin v. Löwis11437992002-04-12 09:54:03 +000013189int
13190main ()
13191{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013192volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 ;
13194 return 0;
13195}
13196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013197if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013198 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013199else
Skip Montanaro6dead952003-09-25 14:50:04 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013202
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013203
Guido van Rossum627b2d71993-12-24 10:39:16 +000013204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13207$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013208
Guido van Rossumda88dad1995-01-26 00:46:29 +000013209works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13211$as_echo_n "checking for working signed char... " >&6; }
13212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013214
Martin v. Löwis11437992002-04-12 09:54:03 +000013215int
13216main ()
13217{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013218signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 ;
13220 return 0;
13221}
13222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013223if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013224 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013225else
Skip Montanaro6dead952003-09-25 14:50:04 +000013226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013228
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013229
Guido van Rossum7f43da71994-08-01 12:15:30 +000013230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13233$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013234
Guido van Rossumda88dad1995-01-26 00:46:29 +000013235have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13237$as_echo_n "checking for prototypes... " >&6; }
13238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013239/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013240int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013241int
13242main ()
13243{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013244return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013245 ;
13246 return 0;
13247}
13248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013252
Matthias Kloseb159a552010-04-25 21:00:44 +000013253 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13257$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013258
Guido van Rossumda88dad1995-01-26 00:46:29 +000013259works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13261$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013264
13265#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013266int foo(int x, ...) {
13267 va_list va;
13268 va_start(va, x);
13269 va_arg(va, int);
13270 va_arg(va, char *);
13271 va_arg(va, double);
13272 return 0;
13273}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013274
Martin v. Löwis11437992002-04-12 09:54:03 +000013275int
13276main ()
13277{
Guido van Rossum90eea071996-08-30 20:58:57 +000013278return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013279 ;
13280 return 0;
13281}
13282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
13285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013288 works=yes
13289
Guido van Rossum627b2d71993-12-24 10:39:16 +000013290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13293$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294
Martin v. Löwisd6320502004-08-12 13:45:08 +000013295# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13297$as_echo_n "checking for socketpair... " >&6; }
13298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013299/* end confdefs.h. */
13300
13301#include <sys/types.h>
13302#include <sys/socket.h>
13303
13304int
13305main ()
13306{
13307void *x=socketpair
13308 ;
13309 return 0;
13310}
13311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013315
Matthias Kloseb159a552010-04-25 21:00:44 +000013316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013317$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13320$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013321
13322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013324
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013325# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13327$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013329/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013330#include <sys/types.h>
13331#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013332int
13333main ()
13334{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013335struct sockaddr x;
13336x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013337 ;
13338 return 0;
13339}
13340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013341if ac_fn_c_try_compile "$LINENO"; then :
13342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13343$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013346
13347else
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13349$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013350
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013353
Guido van Rossumda88dad1995-01-26 00:46:29 +000013354va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13356$as_echo_n "checking whether va_list is an array... " >&6; }
13357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013358/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013359
13360#ifdef HAVE_STDARG_PROTOTYPES
13361#include <stdarg.h>
13362#else
13363#include <varargs.h>
13364#endif
13365
Martin v. Löwis11437992002-04-12 09:54:03 +000013366int
13367main ()
13368{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013369va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013370 ;
13371 return 0;
13372}
13373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013374if ac_fn_c_try_compile "$LINENO"; then :
13375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013376else
Skip Montanaro6dead952003-09-25 14:50:04 +000013377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013380
Guido van Rossumda88dad1995-01-26 00:46:29 +000013381 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013382
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13386$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013387
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013388# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
13390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013392if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013393
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13397$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013398 OLD_CFLAGS=$CFLAGS
13399 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013401/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013402
13403# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405int
13406main ()
13407{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013408
13409 char *name;
13410 struct hostent *he, *res;
13411 char buffer[2048];
13412 int buflen = 2048;
13413 int h_errnop;
13414
13415 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
13417 ;
13418 return 0;
13419}
13420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013424
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13429$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013431else
Skip Montanaro6dead952003-09-25 14:50:04 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13434$as_echo "no" >&6; }
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13436$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013438/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013439
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013440# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013441
Martin v. Löwis11437992002-04-12 09:54:03 +000013442int
13443main ()
13444{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013445
13446 char *name;
13447 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013448 char buffer[2048];
13449 int buflen = 2048;
13450 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013451
Matthias Kloseb159a552010-04-25 21:00:44 +000013452 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
13454 ;
13455 return 0;
13456}
13457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462
Matthias Kloseb159a552010-04-25 21:00:44 +000013463$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13466$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013468else
Skip Montanaro6dead952003-09-25 14:50:04 +000013469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13471$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13473$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13475/* end confdefs.h. */
13476
13477# include <netdb.h>
13478
13479int
13480main ()
13481{
13482
13483 char *name;
13484 struct hostent *he;
13485 struct hostent_data data;
13486
13487 (void) gethostbyname_r(name, he, &data);
13488
13489 ;
13490 return 0;
13491}
13492_ACEOF
13493if ac_fn_c_try_compile "$LINENO"; then :
13494
13495 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13496
13497
13498$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13499
13500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13501$as_echo "yes" >&6; }
13502
13503else
13504
13505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13506$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013516 CFLAGS=$OLD_CFLAGS
13517
13518else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 for ac_func in gethostbyname
13521do :
13522 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013523if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013525#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013526_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013528fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013529done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013530
Michael W. Hudson54241132001-12-07 15:38:26 +000013531
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013532fi
13533
Michael W. Hudson54241132001-12-07 15:38:26 +000013534
13535
13536
13537
13538
13539
Guido van Rossum627b2d71993-12-24 10:39:16 +000013540# checks for system services
13541# (none yet)
13542
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013544ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013545if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013546
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013547else
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13549$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013550if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013552else
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013554LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558/* Override any GCC internal prototype to avoid an error.
13559 Use char because int might match the return type of a GCC
13560 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013561#ifdef __cplusplus
13562extern "C"
13563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013564char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013565int
13566main ()
13567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013568return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 ;
13570 return 0;
13571}
13572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013574 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013575else
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013578rm -f core conftest.err conftest.$ac_objext \
13579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013580LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13583$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013584if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 cat >>confdefs.h <<_ACEOF
13586#define HAVE_LIBIEEE 1
13587_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013589 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013590
Guido van Rossum627b2d71993-12-24 10:39:16 +000013591fi
13592
Michael W. Hudson54241132001-12-07 15:38:26 +000013593
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013594fi
13595
Michael W. Hudson54241132001-12-07 15:38:26 +000013596
Guido van Rossum7f253911997-05-09 02:42:48 +000013597# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13599$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013601# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013602if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013603 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013604if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013605then
13606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13610$as_echo "yes" >&6; }
13611else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13612$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013613fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13616$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617fi
13618
Guido van Rossum7f253911997-05-09 02:42:48 +000013619
Guido van Rossum7f43da71994-08-01 12:15:30 +000013620# check for --with-libm=...
13621
Guido van Rossum563e7081996-09-10 18:20:48 +000013622case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013623Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013624*) LIBM=-lm
13625esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13627$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013629# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013630if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013631 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013632if test "$withval" = no
13633then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13635$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013636elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013637then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13639$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013640else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013641fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13644$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013645fi
13646
Guido van Rossum7f43da71994-08-01 12:15:30 +000013647
13648# check for --with-libc=...
13649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13651$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013653# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013654if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013655 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013656if test "$withval" = no
13657then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13659$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013660elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013661then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13663$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013664else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013665fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013666else
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13668$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013669fi
13670
Guido van Rossum7f43da71994-08-01 12:15:30 +000013671
Stefan Krah1919b7e2012-03-21 18:25:23 +010013672# **************************************
13673# * Check for gcc x64 inline assembler *
13674# **************************************
13675
13676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13677$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13679/* end confdefs.h. */
13680
13681int
13682main ()
13683{
13684
13685 __asm__ __volatile__ ("movq %rcx, %rax");
13686
13687 ;
13688 return 0;
13689}
13690_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013691if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013692 have_gcc_asm_for_x64=yes
13693else
13694 have_gcc_asm_for_x64=no
13695fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013696rm -f core conftest.err conftest.$ac_objext \
13697 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13699$as_echo "$have_gcc_asm_for_x64" >&6; }
13700if test "$have_gcc_asm_for_x64" = yes
13701then
13702
13703$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13704
13705fi
13706
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013707# **************************************************
13708# * Check for various properties of floating point *
13709# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013710
Matthias Kloseb9621712010-04-24 17:59:49 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13712$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013713if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013715else
13716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013718 ac_cv_little_endian_double=no
13719else
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013721/* end confdefs.h. */
13722
13723#include <string.h>
13724int main() {
13725 double x = 9006104071832581.0;
13726 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13727 return 0;
13728 else
13729 return 1;
13730}
13731
13732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013733if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013734 ac_cv_little_endian_double=yes
13735else
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13739 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013740fi
13741
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013742fi
13743
Matthias Kloseb9621712010-04-24 17:59:49 +000013744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13745$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013746if test "$ac_cv_little_endian_double" = yes
13747then
13748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013750
13751fi
13752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13754$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013755if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013757else
13758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013760 ac_cv_big_endian_double=no
13761else
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013763/* end confdefs.h. */
13764
13765#include <string.h>
13766int main() {
13767 double x = 9006104071832581.0;
13768 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13769 return 0;
13770 else
13771 return 1;
13772}
13773
13774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013775if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013776 ac_cv_big_endian_double=yes
13777else
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013782fi
13783
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013784fi
13785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13787$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013788if test "$ac_cv_big_endian_double" = yes
13789then
13790
Matthias Kloseb9621712010-04-24 17:59:49 +000013791$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013792
13793fi
13794
13795# Some ARM platforms use a mixed-endian representation for doubles.
13796# While Python doesn't currently have full support for these platforms
13797# (see e.g., issue 1762561), we can at least make sure that float <-> string
13798# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13800$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013801if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803else
13804
Matthias Kloseb9621712010-04-24 17:59:49 +000013805if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013806 ac_cv_mixed_endian_double=no
13807else
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013809/* end confdefs.h. */
13810
13811#include <string.h>
13812int main() {
13813 double x = 9006104071832581.0;
13814 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13815 return 0;
13816 else
13817 return 1;
13818}
13819
13820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013821if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013822 ac_cv_mixed_endian_double=yes
13823else
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013828fi
13829
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013830fi
13831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13833$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013834if test "$ac_cv_mixed_endian_double" = yes
13835then
13836
Matthias Kloseb9621712010-04-24 17:59:49 +000013837$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013838
13839fi
13840
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013841# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013842# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013843# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013844# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013845# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013846# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013847
13848# This inline assembler syntax may also work for suncc and icc,
13849# so we try it on all platforms.
13850
Matthias Kloseb9621712010-04-24 17:59:49 +000013851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13852$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854/* end confdefs.h. */
13855
13856int
13857main ()
13858{
13859
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013860 unsigned short cw;
13861 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13862 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863
13864 ;
13865 return 0;
13866}
13867_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013868if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869 have_gcc_asm_for_x87=yes
13870else
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013872fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013873rm -f core conftest.err conftest.$ac_objext \
13874 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13876$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013877if test "$have_gcc_asm_for_x87" = yes
13878then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013881
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013883
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13885$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887/* end confdefs.h. */
13888
13889int
13890main ()
13891{
13892
13893 unsigned int fpcr;
13894 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13895 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13896
13897 ;
13898 return 0;
13899}
13900_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013901if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013902 have_gcc_asm_for_mc68881=yes
13903else
13904 have_gcc_asm_for_mc68881=no
13905fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013906rm -f core conftest.err conftest.$ac_objext \
13907 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13909$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13910if test "$have_gcc_asm_for_mc68881" = yes
13911then
13912
13913$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13914
13915fi
13916
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013917# Detect whether system arithmetic is subject to x87-style double
13918# rounding issues. The result of this test has little meaning on non
13919# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13920# mode is round-to-nearest and double rounding issues are present, and
13921# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13923$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924# $BASECFLAGS may affect the result
13925ac_save_cc="$CC"
13926CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013927if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013928 ac_cv_x87_double_rounding=no
13929else
Matthias Kloseb9621712010-04-24 17:59:49 +000013930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013931/* end confdefs.h. */
13932
13933#include <stdlib.h>
13934#include <math.h>
13935int main() {
13936 volatile double x, y, z;
13937 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13938 x = 0.99999999999999989; /* 1-2**-53 */
13939 y = 1./x;
13940 if (y != 1.)
13941 exit(0);
13942 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13943 x = 1e16;
13944 y = 2.99999;
13945 z = x + y;
13946 if (z != 1e16+4.)
13947 exit(0);
13948 /* both tests show evidence of double rounding */
13949 exit(1);
13950}
13951
13952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013953if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013954 ac_cv_x87_double_rounding=no
13955else
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13959 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013960fi
13961
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013962CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13964$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013965if test "$ac_cv_x87_double_rounding" = yes
13966then
13967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013969
13970fi
13971
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013972# ************************************
13973# * Check for mathematical functions *
13974# ************************************
13975
13976LIBS_SAVE=$LIBS
13977LIBS="$LIBS $LIBM"
13978
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013979for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13980do :
13981 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13982ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013983if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013984 cat >>confdefs.h <<_ACEOF
13985#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13986_ACEOF
13987
13988fi
13989done
13990
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013991for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013992do :
13993 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13994ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013995if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013996 cat >>confdefs.h <<_ACEOF
13997#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13998_ACEOF
13999
14000fi
14001done
14002
14003ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14004"
Victor Stinnere0be4232011-10-25 13:06:09 +020014005if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014006 ac_have_decl=1
14007else
14008 ac_have_decl=0
14009fi
14010
14011cat >>confdefs.h <<_ACEOF
14012#define HAVE_DECL_ISINF $ac_have_decl
14013_ACEOF
14014ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14015"
Victor Stinnere0be4232011-10-25 13:06:09 +020014016if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014017 ac_have_decl=1
14018else
14019 ac_have_decl=0
14020fi
14021
14022cat >>confdefs.h <<_ACEOF
14023#define HAVE_DECL_ISNAN $ac_have_decl
14024_ACEOF
14025ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14026"
Victor Stinnere0be4232011-10-25 13:06:09 +020014027if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014028 ac_have_decl=1
14029else
14030 ac_have_decl=0
14031fi
14032
14033cat >>confdefs.h <<_ACEOF
14034#define HAVE_DECL_ISFINITE $ac_have_decl
14035_ACEOF
14036
14037
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014038# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14039# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14041$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014042if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014044else
14045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014047 ac_cv_tanh_preserves_zero_sign=no
14048else
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014050/* end confdefs.h. */
14051
14052#include <math.h>
14053#include <stdlib.h>
14054int main() {
14055 /* return 0 if either negative zeros don't exist
14056 on this platform or if negative zeros exist
14057 and tanh(-0.) == -0. */
14058 if (atan2(0., -1.) == atan2(-0., -1.) ||
14059 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14060 else exit(1);
14061}
14062
14063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014064if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014065 ac_cv_tanh_preserves_zero_sign=yes
14066else
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14070 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014071fi
14072
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014073fi
14074
Matthias Kloseb9621712010-04-24 17:59:49 +000014075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14076$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014077if test "$ac_cv_tanh_preserves_zero_sign" = yes
14078then
14079
Matthias Kloseb9621712010-04-24 17:59:49 +000014080$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014081
14082fi
14083
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014084if test "$ac_cv_func_log1p" = yes
14085then
14086 # On some versions of AIX, log1p(-0.) returns 0. instead of
14087 # -0. See issue #9920.
14088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14089$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014090 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014091 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014092else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014093
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014094 if test "$cross_compiling" = yes; then :
14095 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014096else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14098/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014099
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014100 #include <math.h>
14101 #include <stdlib.h>
14102 int main() {
14103 /* Fail if the signs of log1p(-0.) and -0. can be
14104 distinguished. */
14105 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14106 return 0;
14107 else
14108 return 1;
14109 }
14110
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014111_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014112if ac_fn_c_try_run "$LINENO"; then :
14113 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014114else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014115 ac_cv_log1p_drops_zero_sign=yes
14116fi
14117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14118 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014119fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014120
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014121fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014122
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14124$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14125fi
14126if test "$ac_cv_log1p_drops_zero_sign" = yes
14127then
14128
14129$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14130
14131fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014132
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014133LIBS=$LIBS_SAVE
14134
Mark Dickinsona614f042009-11-28 12:48:43 +000014135# For multiprocessing module, check that sem_open
14136# actually works. For FreeBSD versions <= 7.2,
14137# the kernel module that provides POSIX semaphores
14138# isn't loaded by default, so an attempt to call
14139# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14141$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014142if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014144else
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014146 ac_cv_posix_semaphores_enabled=yes
14147else
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014149/* end confdefs.h. */
14150
14151#include <unistd.h>
14152#include <fcntl.h>
14153#include <stdio.h>
14154#include <semaphore.h>
14155#include <sys/stat.h>
14156
14157int main(void) {
14158 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14159 if (a == SEM_FAILED) {
14160 perror("sem_open");
14161 return 1;
14162 }
14163 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014164 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014165 return 0;
14166}
14167
14168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014169if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014170 ac_cv_posix_semaphores_enabled=yes
14171else
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014176fi
14177
14178
Mark Dickinsona614f042009-11-28 12:48:43 +000014179fi
14180
Matthias Kloseb9621712010-04-24 17:59:49 +000014181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14182$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014183if test $ac_cv_posix_semaphores_enabled = no
14184then
14185
Matthias Kloseb9621712010-04-24 17:59:49 +000014186$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014187
14188fi
14189
Mark Dickinson10683072009-04-18 21:18:19 +000014190# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14192$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014193if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014195else
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014197 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014198else
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014200/* end confdefs.h. */
14201
14202#include <unistd.h>
14203#include <fcntl.h>
14204#include <stdio.h>
14205#include <semaphore.h>
14206#include <sys/stat.h>
14207
14208int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014209 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014210 int count;
14211 int res;
14212 if(a==SEM_FAILED){
14213 perror("sem_open");
14214 return 1;
14215
14216 }
14217 res = sem_getvalue(a, &count);
14218 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014219 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014220 return res==-1 ? 1 : 0;
14221}
14222
Mark Dickinson10683072009-04-18 21:18:19 +000014223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014224if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014225 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014226else
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14230 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014231fi
14232
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014233
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014234fi
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14237$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014238if test $ac_cv_broken_sem_getvalue = yes
14239then
14240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014242
14243fi
14244
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014245ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14246"
14247if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14248 ac_have_decl=1
14249else
14250 ac_have_decl=0
14251fi
14252
14253cat >>confdefs.h <<_ACEOF
14254#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14255_ACEOF
14256ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14257"
14258if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14259 ac_have_decl=1
14260else
14261 ac_have_decl=0
14262fi
14263
14264cat >>confdefs.h <<_ACEOF
14265#define HAVE_DECL_RTLD_NOW $ac_have_decl
14266_ACEOF
14267ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14268"
14269if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14270 ac_have_decl=1
14271else
14272 ac_have_decl=0
14273fi
14274
14275cat >>confdefs.h <<_ACEOF
14276#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14277_ACEOF
14278ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14279"
14280if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14281 ac_have_decl=1
14282else
14283 ac_have_decl=0
14284fi
14285
14286cat >>confdefs.h <<_ACEOF
14287#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14288_ACEOF
14289ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14290"
14291if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14292 ac_have_decl=1
14293else
14294 ac_have_decl=0
14295fi
14296
14297cat >>confdefs.h <<_ACEOF
14298#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14299_ACEOF
14300ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14301"
14302if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14303 ac_have_decl=1
14304else
14305 ac_have_decl=0
14306fi
14307
14308cat >>confdefs.h <<_ACEOF
14309#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14310_ACEOF
14311ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14312"
14313if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14314 ac_have_decl=1
14315else
14316 ac_have_decl=0
14317fi
14318
14319cat >>confdefs.h <<_ACEOF
14320#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14321_ACEOF
14322
14323
Mark Dickinsonbd792642009-03-18 20:06:12 +000014324# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14326$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014327# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014328if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014329 enableval=$enable_big_digits; case $enable_big_digits in
14330yes)
14331 enable_big_digits=30 ;;
14332no)
14333 enable_big_digits=15 ;;
1433415|30)
14335 ;;
14336*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014337 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 +000014338esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14340$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014341
14342cat >>confdefs.h <<_ACEOF
14343#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14344_ACEOF
14345
14346
14347else
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14349$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014350fi
14351
14352
Guido van Rossumef2255b2000-03-10 22:30:29 +000014353# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014354ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014355if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
14357
Matthias Kloseb9621712010-04-24 17:59:49 +000014358$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014359
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014360 wchar_h="yes"
14361
Guido van Rossumef2255b2000-03-10 22:30:29 +000014362else
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014364
14365fi
14366
Michael W. Hudson54241132001-12-07 15:38:26 +000014367
Martin v. Löwis11437992002-04-12 09:54:03 +000014368
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014369# determine wchar_t size
14370if test "$wchar_h" = yes
14371then
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14375# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14377$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014378if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014380else
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14382"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Martin v. Löwis11437992002-04-12 09:54:03 +000014384else
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 if test "$ac_cv_type_wchar_t" = yes; then
14386 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014388as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014389See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390 else
14391 ac_cv_sizeof_wchar_t=0
14392 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014394
Martin v. Löwis11437992002-04-12 09:54:03 +000014395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14397$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398
14399
14400
Martin v. Löwis11437992002-04-12 09:54:03 +000014401cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014402#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014403_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014404
Michael W. Hudson54241132001-12-07 15:38:26 +000014405
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014406fi
14407
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14409$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014410have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014412/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014413
14414#include <tcl.h>
14415#if TCL_UTF_MAX != 6
14416# error "NOT UCS4_TCL"
14417#endif
14418int
14419main ()
14420{
14421
14422 ;
14423 return 0;
14424}
14425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014427
14428
Matthias Kloseb9621712010-04-24 17:59:49 +000014429$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014430
14431 have_ucs4_tcl=yes
14432
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14436$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014437
Skip Montanaro6dead952003-09-25 14:50:04 +000014438# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014439if test "$wchar_h" = yes
14440then
14441 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14443$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014444 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014446else
14447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014449 ac_cv_wchar_t_signed=yes
14450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014452/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014453
14454 #include <wchar.h>
14455 int main()
14456 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014457 /* Success: exit code 0 */
14458 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014459 }
14460
14461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014462if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014463 ac_cv_wchar_t_signed=yes
14464else
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14468 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014469fi
14470
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014471fi
14472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14474$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475fi
14476
Georg Brandl52d168a2008-01-07 18:10:24 +000014477# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014478if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014479 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014480then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014481 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014482
Matthias Kloseb9621712010-04-24 17:59:49 +000014483$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014484
Georg Brandl52d168a2008-01-07 18:10:24 +000014485else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014486 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014487fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14489$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014490
14491# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14493$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014494if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014496else
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 ac_cv_c_bigendian=unknown
14498 # See if we're dealing with a universal compiler.
14499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500/* end confdefs.h. */
14501#ifndef __APPLE_CC__
14502 not a universal capable compiler
14503 #endif
14504 typedef int dummy;
14505
Skip Montanaro6dead952003-09-25 14:50:04 +000014506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014507if ac_fn_c_try_compile "$LINENO"; then :
14508
14509 # Check for potential -arch flags. It is not universal unless
14510 # there are at least two -arch flags with different values.
14511 ac_arch=
14512 ac_prev=
14513 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14514 if test -n "$ac_prev"; then
14515 case $ac_word in
14516 i?86 | x86_64 | ppc | ppc64)
14517 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14518 ac_arch=$ac_word
14519 else
14520 ac_cv_c_bigendian=universal
14521 break
14522 fi
14523 ;;
14524 esac
14525 ac_prev=
14526 elif test "x$ac_word" = "x-arch"; then
14527 ac_prev=arch
14528 fi
14529 done
14530fi
14531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14532 if test $ac_cv_c_bigendian = unknown; then
14533 # See if sys/param.h defines the BYTE_ORDER macro.
14534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014535/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014536#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539int
14540main ()
14541{
Matthias Kloseb9621712010-04-24 17:59:49 +000014542#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14543 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14544 && LITTLE_ENDIAN)
14545 bogus endian macros
14546 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014547
14548 ;
14549 return 0;
14550}
14551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014552if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014553 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014555/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014556#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014558
Martin v. Löwis11437992002-04-12 09:54:03 +000014559int
14560main ()
14561{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014562#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 not big endian
14564 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
14566 ;
14567 return 0;
14568}
14569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014570if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014571 ac_cv_c_bigendian=yes
14572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014576fi
14577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14578 fi
14579 if test $ac_cv_c_bigendian = unknown; then
14580 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014582/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014583#include <limits.h>
14584
Martin v. Löwis11437992002-04-12 09:54:03 +000014585int
14586main ()
14587{
Matthias Kloseb9621712010-04-24 17:59:49 +000014588#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14589 bogus endian macros
14590 #endif
14591
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 ;
14593 return 0;
14594}
14595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014596if ac_fn_c_try_compile "$LINENO"; then :
14597 # It does; now see whether it defined to _BIG_ENDIAN or not.
14598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14599/* end confdefs.h. */
14600#include <limits.h>
14601
14602int
14603main ()
14604{
14605#ifndef _BIG_ENDIAN
14606 not big endian
14607 #endif
14608
14609 ;
14610 return 0;
14611}
14612_ACEOF
14613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014615else
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14619fi
14620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14621 fi
14622 if test $ac_cv_c_bigendian = unknown; then
14623 # Compile a test program.
14624 if test "$cross_compiling" = yes; then :
14625 # Try to guess by grepping values from an object file.
14626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14627/* end confdefs.h. */
14628short int ascii_mm[] =
14629 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14630 short int ascii_ii[] =
14631 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14632 int use_ascii (int i) {
14633 return ascii_mm[i] + ascii_ii[i];
14634 }
14635 short int ebcdic_ii[] =
14636 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14637 short int ebcdic_mm[] =
14638 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14639 int use_ebcdic (int i) {
14640 return ebcdic_mm[i] + ebcdic_ii[i];
14641 }
14642 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643
Matthias Kloseb9621712010-04-24 17:59:49 +000014644int
14645main ()
14646{
14647return use_ascii (foo) == use_ebcdic (foo);
14648 ;
14649 return 0;
14650}
14651_ACEOF
14652if ac_fn_c_try_compile "$LINENO"; then :
14653 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14654 ac_cv_c_bigendian=yes
14655 fi
14656 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14657 if test "$ac_cv_c_bigendian" = unknown; then
14658 ac_cv_c_bigendian=no
14659 else
14660 # finding both strings is unlikely to happen, but who knows?
14661 ac_cv_c_bigendian=unknown
14662 fi
14663 fi
14664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014666else
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014668/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014670int
14671main ()
14672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673
Matthias Kloseb9621712010-04-24 17:59:49 +000014674 /* Are we little or big endian? From Harbison&Steele. */
14675 union
14676 {
14677 long int l;
14678 char c[sizeof (long int)];
14679 } u;
14680 u.l = 1;
14681 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682
14683 ;
14684 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014685}
Martin v. Löwis11437992002-04-12 09:54:03 +000014686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014687if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014688 ac_cv_c_bigendian=no
14689else
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14693 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14699$as_echo "$ac_cv_c_bigendian" >&6; }
14700 case $ac_cv_c_bigendian in #(
14701 yes)
14702 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14703;; #(
14704 no)
14705 ;; #(
14706 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014707
Matthias Kloseb9621712010-04-24 17:59:49 +000014708$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014709
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 ;; #(
14711 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014712 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014713 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014715
Michael W. Hudson54241132001-12-07 15:38:26 +000014716
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014717# ABI version string for Python extension modules. This appears between the
14718# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14719# from the following attributes which affect the ABI of this Python build (in
14720# this order):
14721#
14722# * The Python implementation (always 'cpython-' for us)
14723# * The major and minor version numbers
14724# * --with-pydebug (adds a 'd')
14725# * --with-pymalloc (adds a 'm')
14726# * --with-wide-unicode (adds a 'u')
14727#
14728# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014729# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14730# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014731
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14733$as_echo_n "checking ABIFLAGS... " >&6; }
14734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14735$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14737$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014738SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14740$as_echo "$SOABI" >&6; }
14741
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014742
14743case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014744 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014745 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14746 *)
14747 EXT_SUFFIX=${SHLIB_SUFFIX};;
14748esac
14749
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14751$as_echo_n "checking LDVERSION... " >&6; }
14752LDVERSION='$(VERSION)$(ABIFLAGS)'
14753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14754$as_echo "$LDVERSION" >&6; }
14755
doko@python.org87421192013-01-26 11:39:31 +010014756
doko@ubuntu.com55532312016-06-14 08:55:19 +020014757if test x$PLATFORM_TRIPLET = x; then
14758 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14759else
14760 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14761fi
doko@python.org87421192013-01-26 11:39:31 +010014762
14763
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014764# Check whether right shifting a negative integer extends the sign bit
14765# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14767$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014768if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014770else
Martin v. Löwis11437992002-04-12 09:54:03 +000014771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014773 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014774else
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014776/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014777
14778int main()
14779{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014780 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014781}
14782
Martin v. Löwis11437992002-04-12 09:54:03 +000014783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014784if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014785 ac_cv_rshift_extends_sign=yes
14786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014791fi
14792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793fi
14794
Matthias Kloseb9621712010-04-24 17:59:49 +000014795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14796$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014797if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014798then
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014801
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014802fi
14803
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014804# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14806$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014807if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014809else
Martin v. Löwis11437992002-04-12 09:54:03 +000014810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014812/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014813#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014814int
14815main ()
14816{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014817
14818 FILE *f = fopen("/dev/null", "r");
14819 flockfile(f);
14820 getc_unlocked(f);
14821 funlockfile(f);
14822
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 ;
14824 return 0;
14825}
14826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014827if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014828 ac_cv_have_getc_unlocked=yes
14829else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 ac_cv_have_getc_unlocked=no
14831fi
14832rm -f core conftest.err conftest.$ac_objext \
14833 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14837$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014838if test "$ac_cv_have_getc_unlocked" = yes
14839then
Martin v. Löwis11437992002-04-12 09:54:03 +000014840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014842
14843fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014844
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014845# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014846# save the value of LIBS so we don't actually link Python with readline
14847LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014848
Gregory P. Smith18820942008-09-07 06:24:49 +000014849# On some systems we need to link readline to a termcap compatible
14850# library. NOTE: Keep the precedence of listed libraries synchronised
14851# with setup.py.
14852py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14854$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014855for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014856 if test -z "$py_libtermcap"; then
14857 READLINE_LIBS="-lreadline"
14858 else
14859 READLINE_LIBS="-lreadline -l$py_libtermcap"
14860 fi
14861 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014863/* end confdefs.h. */
14864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865/* Override any GCC internal prototype to avoid an error.
14866 Use char because int might match the return type of a GCC
14867 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014868#ifdef __cplusplus
14869extern "C"
14870#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014871char readline ();
14872int
14873main ()
14874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014876 ;
14877 return 0;
14878}
14879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014880if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014881 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014883rm -f core conftest.err conftest.$ac_objext \
14884 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014885 if test $py_cv_lib_readline = yes; then
14886 break
14887 fi
14888done
14889# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14890#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014891if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14893$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014894else
Matthias Kloseb9621712010-04-24 17:59:49 +000014895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14896$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014899
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014900fi
14901
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014902# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14904$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014905if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014907else
14908 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014909LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014911/* end confdefs.h. */
14912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913/* Override any GCC internal prototype to avoid an error.
14914 Use char because int might match the return type of a GCC
14915 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014916#ifdef __cplusplus
14917extern "C"
14918#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014919char rl_callback_handler_install ();
14920int
14921main ()
14922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014924 ;
14925 return 0;
14926}
14927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014928if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014929 ac_cv_lib_readline_rl_callback_handler_install=yes
14930else
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014933rm -f core conftest.err conftest.$ac_objext \
14934 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014935LIBS=$ac_check_lib_save_LIBS
14936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14938$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014939if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014940
Matthias Kloseb9621712010-04-24 17:59:49 +000014941$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014942
14943fi
14944
14945
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014946# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014948/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014949#include <readline/readline.h>
14950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014951if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014952 have_readline=yes
14953else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014954 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014955
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014956fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014957rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014958if test $have_readline = yes
14959then
Matthias Kloseb9621712010-04-24 17:59:49 +000014960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014961/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014962#include <readline/readline.h>
14963
14964_ACEOF
14965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014967
Matthias Kloseb9621712010-04-24 17:59:49 +000014968$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014969
14970fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014971rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014972
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014974/* end confdefs.h. */
14975#include <readline/readline.h>
14976
14977_ACEOF
14978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014980
Matthias Kloseb9621712010-04-24 17:59:49 +000014981$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014982
14983fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014984rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014985
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014986fi
14987
Martin v. Löwis0daad592001-09-30 21:09:59 +000014988# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14990$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014991if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014993else
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014995LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999/* Override any GCC internal prototype to avoid an error.
15000 Use char because int might match the return type of a GCC
15001 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015002#ifdef __cplusplus
15003extern "C"
15004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015005char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015006int
15007main ()
15008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015009return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015010 ;
15011 return 0;
15012}
15013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015016else
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015019rm -f core conftest.err conftest.$ac_objext \
15020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015021LIBS=$ac_check_lib_save_LIBS
15022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15024$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015025if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015026
Matthias Kloseb9621712010-04-24 17:59:49 +000015027$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015028
Martin v. Löwis0daad592001-09-30 21:09:59 +000015029fi
15030
Michael W. Hudson54241132001-12-07 15:38:26 +000015031
Thomas Wouters89d996e2007-09-08 17:39:28 +000015032# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15034$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015035if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015036 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015037else
15038 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015039LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015041/* end confdefs.h. */
15042
15043/* Override any GCC internal prototype to avoid an error.
15044 Use char because int might match the return type of a GCC
15045 builtin and then its argument prototype would still apply. */
15046#ifdef __cplusplus
15047extern "C"
15048#endif
15049char rl_completion_display_matches_hook ();
15050int
15051main ()
15052{
15053return rl_completion_display_matches_hook ();
15054 ;
15055 return 0;
15056}
15057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015058if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015059 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15060else
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015063rm -f core conftest.err conftest.$ac_objext \
15064 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015065LIBS=$ac_check_lib_save_LIBS
15066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15068$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015069if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015072
15073fi
15074
15075
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015076# also in 4.0, but not in editline
15077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15078$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15079if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15080 $as_echo_n "(cached) " >&6
15081else
15082 ac_check_lib_save_LIBS=$LIBS
15083LIBS="-lreadline $READLINE_LIBS $LIBS"
15084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15085/* end confdefs.h. */
15086
15087/* Override any GCC internal prototype to avoid an error.
15088 Use char because int might match the return type of a GCC
15089 builtin and then its argument prototype would still apply. */
15090#ifdef __cplusplus
15091extern "C"
15092#endif
15093char rl_resize_terminal ();
15094int
15095main ()
15096{
15097return rl_resize_terminal ();
15098 ;
15099 return 0;
15100}
15101_ACEOF
15102if ac_fn_c_try_link "$LINENO"; then :
15103 ac_cv_lib_readline_rl_resize_terminal=yes
15104else
15105 ac_cv_lib_readline_rl_resize_terminal=no
15106fi
15107rm -f core conftest.err conftest.$ac_objext \
15108 conftest$ac_exeext conftest.$ac_ext
15109LIBS=$ac_check_lib_save_LIBS
15110fi
15111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15112$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15113if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15114
15115$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15116
15117fi
15118
15119
Martin v. Löwis0daad592001-09-30 21:09:59 +000015120# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15122$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015123if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015125else
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015127LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131/* Override any GCC internal prototype to avoid an error.
15132 Use char because int might match the return type of a GCC
15133 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015134#ifdef __cplusplus
15135extern "C"
15136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015137char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015138int
15139main ()
15140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 ;
15143 return 0;
15144}
15145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015146if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015148else
Matthias Kloseb9621712010-04-24 17:59:49 +000015149 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015151rm -f core conftest.err conftest.$ac_objext \
15152 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015153LIBS=$ac_check_lib_save_LIBS
15154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15156$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015157if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015158
Matthias Kloseb9621712010-04-24 17:59:49 +000015159$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015160
Guido van Rossum353ae582001-07-10 16:45:32 +000015161fi
15162
Jack Jansendd19cf82001-12-06 22:36:17 +000015163
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015164# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015166/* end confdefs.h. */
15167#include <readline/readline.h>
15168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015169if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015170 have_readline=yes
15171else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015172 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015173
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015174fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015175rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015176if test $have_readline = yes
15177then
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015179/* end confdefs.h. */
15180#include <readline/readline.h>
15181
15182_ACEOF
15183if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015185
Matthias Kloseb9621712010-04-24 17:59:49 +000015186$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187
15188fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015189rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015190
15191fi
15192
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15194$as_echo_n "checking for append_history in -lreadline... " >&6; }
15195if ${ac_cv_lib_readline_append_history+:} false; then :
15196 $as_echo_n "(cached) " >&6
15197else
15198 ac_check_lib_save_LIBS=$LIBS
15199LIBS="-lreadline $READLINE_LIBS $LIBS"
15200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15201/* end confdefs.h. */
15202
15203/* Override any GCC internal prototype to avoid an error.
15204 Use char because int might match the return type of a GCC
15205 builtin and then its argument prototype would still apply. */
15206#ifdef __cplusplus
15207extern "C"
15208#endif
15209char append_history ();
15210int
15211main ()
15212{
15213return append_history ();
15214 ;
15215 return 0;
15216}
15217_ACEOF
15218if ac_fn_c_try_link "$LINENO"; then :
15219 ac_cv_lib_readline_append_history=yes
15220else
15221 ac_cv_lib_readline_append_history=no
15222fi
15223rm -f core conftest.err conftest.$ac_objext \
15224 conftest$ac_exeext conftest.$ac_ext
15225LIBS=$ac_check_lib_save_LIBS
15226fi
15227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15228$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15229if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15230
15231$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15232
15233fi
15234
15235
Martin v. Löwis82bca632006-02-10 20:49:30 +000015236# End of readline checks: restore LIBS
15237LIBS=$LIBS_no_readline
15238
Matthias Kloseb9621712010-04-24 17:59:49 +000015239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15240$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015241if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015243else
Martin v. Löwis11437992002-04-12 09:54:03 +000015244
Matthias Kloseb9621712010-04-24 17:59:49 +000015245if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015246 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015247else
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015250
15251int main()
15252{
15253 int val1 = nice(1);
15254 if (val1 != -1 && val1 == nice(2))
15255 exit(0);
15256 exit(1);
15257}
15258
Martin v. Löwis11437992002-04-12 09:54:03 +000015259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015260if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015261 ac_cv_broken_nice=yes
15262else
Matthias Kloseb9621712010-04-24 17:59:49 +000015263 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15266 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015267fi
15268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269fi
15270
Matthias Kloseb9621712010-04-24 17:59:49 +000015271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15272$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015273if test "$ac_cv_broken_nice" = yes
15274then
Martin v. Löwis11437992002-04-12 09:54:03 +000015275
Matthias Kloseb9621712010-04-24 17:59:49 +000015276$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015277
15278fi
15279
Matthias Kloseb9621712010-04-24 17:59:49 +000015280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15281$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015282if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015284else
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015286 ac_cv_broken_poll=no
15287else
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015289/* end confdefs.h. */
15290
15291#include <poll.h>
15292
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015293int main()
15294{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015295 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015296 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015297
15298 close (42);
15299
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015300 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015301 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015302 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015303 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015304 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015305 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015306 return 1;
15307}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015308
15309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015310if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015311 ac_cv_broken_poll=yes
15312else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15316 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015318
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015319fi
15320
Matthias Kloseb9621712010-04-24 17:59:49 +000015321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15322$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015323if test "$ac_cv_broken_poll" = yes
15324then
15325
Matthias Kloseb9621712010-04-24 17:59:49 +000015326$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015327
15328fi
15329
Brett Cannon43802422005-02-10 20:48:03 +000015330# 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 +000015331# (which is not required by ISO C or UNIX spec) and/or if we support
15332# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015333ac_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 +000015334#include <$ac_cv_struct_tm>
15335
Matthias Kloseb9621712010-04-24 17:59:49 +000015336"
Victor Stinnere0be4232011-10-25 13:06:09 +020015337if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015338
15339cat >>confdefs.h <<_ACEOF
15340#define HAVE_STRUCT_TM_TM_ZONE 1
15341_ACEOF
15342
15343
15344fi
15345
15346if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015349
15350else
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15352"
Victor Stinnere0be4232011-10-25 13:06:09 +020015353if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355else
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357fi
15358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015360#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361_ACEOF
15362
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15364$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015365if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367else
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015369/* end confdefs.h. */
15370#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371#if !HAVE_DECL_TZNAME
15372extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015373#endif
15374
15375int
15376main ()
15377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015379 ;
15380 return 0;
15381}
15382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015383if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015384 ac_cv_var_tzname=yes
15385else
Matthias Kloseb9621712010-04-24 17:59:49 +000015386 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015388rm -f core conftest.err conftest.$ac_objext \
15389 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15392$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015393 if test $ac_cv_var_tzname = yes; then
15394
Matthias Kloseb9621712010-04-24 17:59:49 +000015395$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015396
15397 fi
15398fi
15399
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015400
Martin v. Löwis1d459062005-03-14 21:23:33 +000015401# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15403$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015404if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015406else
15407
Matthias Kloseb9621712010-04-24 17:59:49 +000015408if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015409 ac_cv_working_tzset=no
15410else
Matthias Kloseb9621712010-04-24 17:59:49 +000015411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015412/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015413
15414#include <stdlib.h>
15415#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015416#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015417
15418#if HAVE_TZNAME
15419extern char *tzname[];
15420#endif
15421
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015422int main()
15423{
Brett Cannon18367812003-09-19 00:59:16 +000015424 /* Note that we need to ensure that not only does tzset(3)
15425 do 'something' with localtime, but it works as documented
15426 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015427 This includes making sure that tzname is set properly if
15428 tm->tm_zone does not exist since it is the alternative way
15429 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015430
15431 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015432 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015433 */
15434
Martin v. Löwis1d459062005-03-14 21:23:33 +000015435 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015436 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15437
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015438 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015439 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015440 if (localtime(&groundhogday)->tm_hour != 0)
15441 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015442#if HAVE_TZNAME
15443 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15444 if (strcmp(tzname[0], "UTC") ||
15445 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15446 exit(1);
15447#endif
Brett Cannon18367812003-09-19 00:59:16 +000015448
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015449 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015450 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015451 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015452 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015453#if HAVE_TZNAME
15454 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15455 exit(1);
15456#endif
Brett Cannon18367812003-09-19 00:59:16 +000015457
15458 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15459 tzset();
15460 if (localtime(&groundhogday)->tm_hour != 11)
15461 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015462#if HAVE_TZNAME
15463 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15464 exit(1);
15465#endif
15466
15467#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015468 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15469 exit(1);
15470 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15471 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015472#endif
Brett Cannon18367812003-09-19 00:59:16 +000015473
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015474 exit(0);
15475}
15476
15477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015478if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015479 ac_cv_working_tzset=yes
15480else
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15484 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015485fi
15486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487fi
15488
Matthias Kloseb9621712010-04-24 17:59:49 +000015489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15490$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015491if test "$ac_cv_working_tzset" = yes
15492then
15493
Matthias Kloseb9621712010-04-24 17:59:49 +000015494$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015495
15496fi
15497
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015498# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15500$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015501if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015502 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015503else
Matthias Kloseb9621712010-04-24 17:59:49 +000015504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015505/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015506#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015507int
15508main ()
15509{
15510
15511struct stat st;
15512st.st_mtim.tv_nsec = 1;
15513
15514 ;
15515 return 0;
15516}
15517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015519 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015520else
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15524fi
15525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15527$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015528if test "$ac_cv_stat_tv_nsec" = yes
15529then
15530
Matthias Kloseb9621712010-04-24 17:59:49 +000015531$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015532
15533fi
15534
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015535# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15537$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015538if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015540else
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015542/* end confdefs.h. */
15543#include <sys/stat.h>
15544int
15545main ()
15546{
15547
15548struct stat st;
15549st.st_mtimespec.tv_nsec = 1;
15550
15551 ;
15552 return 0;
15553}
15554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015556 ac_cv_stat_tv_nsec2=yes
15557else
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15561fi
15562
Matthias Kloseb9621712010-04-24 17:59:49 +000015563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15564$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015565if test "$ac_cv_stat_tv_nsec2" = yes
15566then
15567
Matthias Kloseb9621712010-04-24 17:59:49 +000015568$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015569
15570fi
15571
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015572# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015573ac_save_cppflags="$CPPFLAGS"
15574CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015575
15576for ac_header in curses.h ncurses.h
15577do :
15578 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15579ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15581 cat >>confdefs.h <<_ACEOF
15582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15583_ACEOF
15584
15585fi
15586
15587done
15588
15589
15590# On Solaris, term.h requires curses.h
15591for ac_header in term.h
15592do :
15593 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15594#ifdef HAVE_CURSES_H
15595#include <curses.h>
15596#endif
15597
15598"
15599if test "x$ac_cv_header_term_h" = xyes; then :
15600 cat >>confdefs.h <<_ACEOF
15601#define HAVE_TERM_H 1
15602_ACEOF
15603
15604fi
15605
15606done
15607
15608
Jack Jansen666b1e72001-10-31 12:11:48 +000015609# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15611$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015612if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015614else
Matthias Kloseb9621712010-04-24 17:59:49 +000015615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015616/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015617#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015618int
15619main ()
15620{
Jack Jansen666b1e72001-10-31 12:11:48 +000015621
15622 int rtn;
15623 rtn = mvwdelch(0,0,0);
15624
Martin v. Löwis11437992002-04-12 09:54:03 +000015625 ;
15626 return 0;
15627}
15628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015629if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015630 ac_cv_mvwdelch_is_expression=yes
15631else
Matthias Kloseb9621712010-04-24 17:59:49 +000015632 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15635fi
15636
Matthias Kloseb9621712010-04-24 17:59:49 +000015637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15638$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015639
15640if test "$ac_cv_mvwdelch_is_expression" = yes
15641then
Martin v. Löwis11437992002-04-12 09:54:03 +000015642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015644
15645fi
15646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15648$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015649if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015651else
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015653/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015654#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015655int
15656main ()
15657{
Jack Jansen666b1e72001-10-31 12:11:48 +000015658
15659 WINDOW *w;
15660 w->_flags = 0;
15661
Martin v. Löwis11437992002-04-12 09:54:03 +000015662 ;
15663 return 0;
15664}
15665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015666if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015667 ac_cv_window_has_flags=yes
15668else
Matthias Kloseb9621712010-04-24 17:59:49 +000015669 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15672fi
15673
Matthias Kloseb9621712010-04-24 17:59:49 +000015674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15675$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015676
Jack Jansen666b1e72001-10-31 12:11:48 +000015677
15678if test "$ac_cv_window_has_flags" = yes
15679then
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
Matthias Kloseb9621712010-04-24 17:59:49 +000015681$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015682
15683fi
15684
Matthias Kloseb9621712010-04-24 17:59:49 +000015685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15686$as_echo_n "checking for is_term_resized... " >&6; }
15687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015688/* end confdefs.h. */
15689#include <curses.h>
15690int
15691main ()
15692{
15693void *x=is_term_resized
15694 ;
15695 return 0;
15696}
15697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015699
Matthias Kloseb9621712010-04-24 17:59:49 +000015700$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015701
Matthias Kloseb159a552010-04-25 21:00:44 +000015702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015703$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015704else
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15706$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015707
15708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15710
Matthias Kloseb9621712010-04-24 17:59:49 +000015711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15712$as_echo_n "checking for resize_term... " >&6; }
15713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015714/* end confdefs.h. */
15715#include <curses.h>
15716int
15717main ()
15718{
15719void *x=resize_term
15720 ;
15721 return 0;
15722}
15723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015724if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015727
Matthias Kloseb159a552010-04-25 21:00:44 +000015728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015729$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015730else
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15732$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015733
15734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15736
Matthias Kloseb9621712010-04-24 17:59:49 +000015737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15738$as_echo_n "checking for resizeterm... " >&6; }
15739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015740/* end confdefs.h. */
15741#include <curses.h>
15742int
15743main ()
15744{
15745void *x=resizeterm
15746 ;
15747 return 0;
15748}
15749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015750if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015751
Matthias Kloseb9621712010-04-24 17:59:49 +000015752$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015753
Matthias Kloseb159a552010-04-25 21:00:44 +000015754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015755$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015756else
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15758$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015759
15760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015762# last curses configure check
15763CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15766$as_echo "$as_me: checking for device files" >&6;}
15767
15768if test "x$cross_compiling" = xyes; then
15769 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15771$as_echo_n "checking for /dev/ptmx... " >&6; }
15772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15773$as_echo "not set" >&6; }
15774 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15775 fi
15776 if test "${ac_cv_file__dev_ptc+set}" != set; then
15777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15778$as_echo_n "checking for /dev/ptc... " >&6; }
15779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15780$as_echo "not set" >&6; }
15781 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15782 fi
15783fi
15784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15786$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015787if ${ac_cv_file__dev_ptmx+:} false; then :
15788 $as_echo_n "(cached) " >&6
15789else
15790 test "$cross_compiling" = yes &&
15791 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15792if test -r "/dev/ptmx"; then
15793 ac_cv_file__dev_ptmx=yes
15794else
15795 ac_cv_file__dev_ptmx=no
15796fi
15797fi
15798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15799$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15800if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015801
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015802fi
15803
15804if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015805
Matthias Kloseb9621712010-04-24 17:59:49 +000015806$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015807
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15810$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015811if ${ac_cv_file__dev_ptc+:} false; then :
15812 $as_echo_n "(cached) " >&6
15813else
15814 test "$cross_compiling" = yes &&
15815 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15816if test -r "/dev/ptc"; then
15817 ac_cv_file__dev_ptc=yes
15818else
15819 ac_cv_file__dev_ptc=no
15820fi
15821fi
15822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15823$as_echo "$ac_cv_file__dev_ptc" >&6; }
15824if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015825
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015826fi
15827
15828if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015829
Matthias Kloseb9621712010-04-24 17:59:49 +000015830$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015831
Neal Norwitz865400f2003-03-21 01:42:58 +000015832fi
15833
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015835$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015836if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015837 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015838else
Matthias Kloseb9621712010-04-24 17:59:49 +000015839 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015840 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015841if test x$GCC = xyes; then
15842save_CFLAGS=$CFLAGS
15843CFLAGS="$CFLAGS -Werror -Wformat"
15844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015845/* end confdefs.h. */
15846
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015847#include <stdio.h>
15848#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015849
15850int
15851main ()
15852{
15853
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015854char *buffer;
15855sprintf(buffer, "%lld", (long long)123);
15856sprintf(buffer, "%lld", (long long)-123);
15857sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015858
15859 ;
15860 return 0;
15861}
15862_ACEOF
15863if ac_fn_c_try_compile "$LINENO"; then :
15864 ac_cv_have_long_long_format=yes
15865
15866fi
15867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015868CFLAGS=$save_CFLAGS
15869fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015870else
Matthias Kloseb9621712010-04-24 17:59:49 +000015871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015872/* end confdefs.h. */
15873
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015874#include <stdio.h>
15875#include <stddef.h>
15876#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015877
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015878#ifdef HAVE_SYS_TYPES_H
15879#include <sys/types.h>
15880#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015881
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015882int main()
15883{
15884char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015885
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015886if (sprintf(buffer, "%lld", (long long)123) < 0)
15887return 1;
15888if (strcmp(buffer, "123"))
15889return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015890
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015891if (sprintf(buffer, "%lld", (long long)-123) < 0)
15892return 1;
15893if (strcmp(buffer, "-123"))
15894return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015895
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015896if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15897return 1;
15898if (strcmp(buffer, "123"))
15899return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015900
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015901return 0;
15902}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015903
15904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015905if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015906 ac_cv_have_long_long_format=yes
15907else
Matthias Kloseb9621712010-04-24 17:59:49 +000015908 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015912fi
15913
15914
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015915fi
15916
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015918$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015919
Mark Dickinson89d7d412009-12-31 20:50:59 +000015920if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015921then
15922
Matthias Kloseb9621712010-04-24 17:59:49 +000015923$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015924
15925fi
15926
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015927if test $ac_sys_system = Darwin
15928then
15929 LIBS="$LIBS -framework CoreFoundation"
15930fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015931
Matthias Kloseb9621712010-04-24 17:59:49 +000015932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15933$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015934if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015935 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015936else
Matthias Kloseb9621712010-04-24 17:59:49 +000015937 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015938 ac_cv_have_size_t_format="cross -- assuming yes"
15939
Thomas Wouters477c8d52006-05-27 19:21:47 +000015940else
Matthias Kloseb9621712010-04-24 17:59:49 +000015941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015942/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015943
Thomas Wouters477c8d52006-05-27 19:21:47 +000015944#include <stdio.h>
15945#include <stddef.h>
15946#include <string.h>
15947
Christian Heimes2c181612007-12-17 20:04:13 +000015948#ifdef HAVE_SYS_TYPES_H
15949#include <sys/types.h>
15950#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015951
15952#ifdef HAVE_SSIZE_T
15953typedef ssize_t Py_ssize_t;
15954#elif SIZEOF_VOID_P == SIZEOF_LONG
15955typedef long Py_ssize_t;
15956#else
15957typedef int Py_ssize_t;
15958#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015959
Christian Heimes2c181612007-12-17 20:04:13 +000015960int main()
15961{
15962 char buffer[256];
15963
Thomas Wouters477c8d52006-05-27 19:21:47 +000015964 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15965 return 1;
15966
Thomas Wouters89f507f2006-12-13 04:49:30 +000015967 if (strcmp(buffer, "123"))
15968 return 1;
15969
15970 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15971 return 1;
15972
15973 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015974 return 1;
15975
15976 return 0;
15977}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015978
Thomas Wouters477c8d52006-05-27 19:21:47 +000015979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015980if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015981 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015982else
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015987fi
15988
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15991$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015992if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015995
15996fi
15997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015999#ifdef HAVE_SYS_TYPES_H
16000#include <sys/types.h>
16001#endif
16002#ifdef HAVE_SYS_SOCKET_H
16003#include <sys/socket.h>
16004#endif
16005
Matthias Kloseb9621712010-04-24 17:59:49 +000016006"
Victor Stinnere0be4232011-10-25 13:06:09 +020016007if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016008
Martin v. Löwis11437992002-04-12 09:54:03 +000016009else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016012
16013fi
16014
Michael W. Hudson54241132001-12-07 15:38:26 +000016015
Matthias Kloseb9621712010-04-24 17:59:49 +000016016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16017$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016018if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016019 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016020else
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016022 ac_cv_broken_mbstowcs=no
16023else
Matthias Kloseb9621712010-04-24 17:59:49 +000016024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016025/* end confdefs.h. */
16026
Stefan Krah19c21392012-11-22 23:47:32 +010016027#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016028#include<stdlib.h>
16029int main() {
16030 size_t len = -1;
16031 const char *str = "text";
16032 len = mbstowcs(NULL, str, 0);
16033 return (len != 4);
16034}
16035
16036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016037if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016038 ac_cv_broken_mbstowcs=no
16039else
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016044fi
16045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016046fi
16047
Matthias Kloseb9621712010-04-24 17:59:49 +000016048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16049$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016050if test "$ac_cv_broken_mbstowcs" = yes
16051then
16052
Matthias Kloseb9621712010-04-24 17:59:49 +000016053$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016054
16055fi
16056
Antoine Pitroub52ec782009-01-25 16:34:23 +000016057# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16059$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016060
16061# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016062if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016063 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016064if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016065then
16066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016068
Matthias Kloseb9621712010-04-24 17:59:49 +000016069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16070$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016071fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016072if test "$withval" = no
16073then
16074
16075$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16076
Matthias Kloseb9621712010-04-24 17:59:49 +000016077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16078$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016079fi
16080
Antoine Pitrou042b1282010-08-13 21:15:58 +000016081else
16082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16083$as_echo "no value specified" >&6; }
16084fi
16085
Antoine Pitroub52ec782009-01-25 16:34:23 +000016086
Matthias Kloseb17289e2012-03-15 19:51:34 +010016087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16088$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16089if ${ac_cv_computed_gotos+:} false; then :
16090 $as_echo_n "(cached) " >&6
16091else
16092 if test "$cross_compiling" = yes; then :
16093 if test "${with_computed_gotos+set}" = set; then
16094 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16095 else
16096 ac_cv_computed_gotos=no
16097 fi
16098else
16099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16100/* end confdefs.h. */
16101
16102int main(int argc, char **argv)
16103{
16104 static void *targets[1] = { &&LABEL1 };
16105 goto LABEL2;
16106LABEL1:
16107 return 0;
16108LABEL2:
16109 goto *targets[0];
16110 return 1;
16111}
16112
16113_ACEOF
16114if ac_fn_c_try_run "$LINENO"; then :
16115 ac_cv_computed_gotos=yes
16116else
16117 ac_cv_computed_gotos=no
16118fi
16119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16120 conftest.$ac_objext conftest.beam conftest.$ac_ext
16121fi
16122
16123fi
16124
16125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16126$as_echo "$ac_cv_computed_gotos" >&6; }
16127case "$ac_cv_computed_gotos" in yes*)
16128
16129$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16130
16131esac
16132
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016133case $ac_sys_system in
16134AIX*)
16135
16136$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16137 ;;
16138esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016139
Michael W. Hudson54241132001-12-07 15:38:26 +000016140
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016141
16142
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016143for h in `(cd $srcdir;echo Python/thread_*.h)`
16144do
16145 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16146done
16147
Michael W. Hudson54241132001-12-07 15:38:26 +000016148
Ned Deily0db50cf2014-07-25 12:41:31 -070016149SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16151$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016152for dir in $SRCDIRS; do
16153 if test ! -d $dir; then
16154 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016155 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016156done
Matthias Kloseb9621712010-04-24 17:59:49 +000016157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16158$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016159
Stefan Krah1919b7e2012-03-21 18:25:23 +010016160# Availability of -O2:
16161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16162$as_echo_n "checking for -O2... " >&6; }
16163saved_cflags="$CFLAGS"
16164CFLAGS="-O2"
16165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16166/* end confdefs.h. */
16167
16168int
16169main ()
16170{
16171
16172
16173 ;
16174 return 0;
16175}
16176_ACEOF
16177if ac_fn_c_try_compile "$LINENO"; then :
16178 have_O2=yes
16179else
16180 have_O2=no
16181fi
16182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16184$as_echo "$have_O2" >&6; }
16185CFLAGS="$saved_cflags"
16186
16187# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16188# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16190$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16191saved_cflags="$CFLAGS"
16192CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16193if test "$have_O2" = no; then
16194 CFLAGS=""
16195fi
16196if test "$cross_compiling" = yes; then :
16197 have_glibc_memmove_bug=undefined
16198else
16199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200/* end confdefs.h. */
16201
16202#include <stdio.h>
16203#include <stdlib.h>
16204#include <string.h>
16205void foo(void *p, void *q) { memmove(p, q, 19); }
16206int main() {
16207 char a[32] = "123456789000000000";
16208 foo(&a[9], a);
16209 if (strcmp(a, "123456789123456789000000000") != 0)
16210 return 1;
16211 foo(a, &a[9]);
16212 if (strcmp(a, "123456789000000000") != 0)
16213 return 1;
16214 return 0;
16215}
16216
16217_ACEOF
16218if ac_fn_c_try_run "$LINENO"; then :
16219 have_glibc_memmove_bug=no
16220else
16221 have_glibc_memmove_bug=yes
16222fi
16223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16224 conftest.$ac_objext conftest.beam conftest.$ac_ext
16225fi
16226
16227CFLAGS="$saved_cflags"
16228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16229$as_echo "$have_glibc_memmove_bug" >&6; }
16230if test "$have_glibc_memmove_bug" = yes; then
16231
16232$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16233
16234fi
16235
16236if test "$have_gcc_asm_for_x87" = yes; then
16237 # Some versions of gcc miscompile inline asm:
16238 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16239 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16240 case $CC in
16241 *gcc*)
16242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16243$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16244 saved_cflags="$CFLAGS"
16245 CFLAGS="-O2"
16246 if test "$cross_compiling" = yes; then :
16247 have_ipa_pure_const_bug=undefined
16248else
16249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16250/* end confdefs.h. */
16251
16252 __attribute__((noinline)) int
16253 foo(int *p) {
16254 int r;
16255 asm ( "movl \$6, (%1)\n\t"
16256 "xorl %0, %0\n\t"
16257 : "=r" (r) : "r" (p) : "memory"
16258 );
16259 return r;
16260 }
16261 int main() {
16262 int p = 8;
16263 if ((foo(&p) ? : p) != 6)
16264 return 1;
16265 return 0;
16266 }
16267
16268_ACEOF
16269if ac_fn_c_try_run "$LINENO"; then :
16270 have_ipa_pure_const_bug=no
16271else
16272 have_ipa_pure_const_bug=yes
16273fi
16274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16275 conftest.$ac_objext conftest.beam conftest.$ac_ext
16276fi
16277
16278 CFLAGS="$saved_cflags"
16279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16280$as_echo "$have_ipa_pure_const_bug" >&6; }
16281 if test "$have_ipa_pure_const_bug" = yes; then
16282
16283$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16284
16285 fi
16286 ;;
16287 esac
16288fi
16289
Victor Stinner4f5366e2015-01-09 02:13:19 +010016290# Check for stdatomic.h
16291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16292$as_echo_n "checking for stdatomic.h... " >&6; }
16293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16294/* end confdefs.h. */
16295
16296
16297 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016298 atomic_int value = ATOMIC_VAR_INIT(1);
16299 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016300 int main() {
16301 int loaded_value = atomic_load(&value);
16302 return 0;
16303 }
16304
16305
16306_ACEOF
16307if ac_fn_c_try_link "$LINENO"; then :
16308 have_stdatomic_h=yes
16309else
16310 have_stdatomic_h=no
16311fi
16312rm -f core conftest.err conftest.$ac_objext \
16313 conftest$ac_exeext conftest.$ac_ext
16314
16315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16316$as_echo "$have_stdatomic_h" >&6; }
16317
16318if test "$have_stdatomic_h" = yes; then
16319
16320$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16321
16322fi
16323
16324# Check for GCC >= 4.7 __atomic builtins
16325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16326$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16328/* end confdefs.h. */
16329
16330
16331 volatile int val = 1;
16332 int main() {
16333 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16334 return 0;
16335 }
16336
16337
16338_ACEOF
16339if ac_fn_c_try_link "$LINENO"; then :
16340 have_builtin_atomic=yes
16341else
16342 have_builtin_atomic=no
16343fi
16344rm -f core conftest.err conftest.$ac_objext \
16345 conftest$ac_exeext conftest.$ac_ext
16346
16347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16348$as_echo "$have_builtin_atomic" >&6; }
16349
16350if test "$have_builtin_atomic" = yes; then
16351
16352$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16353
16354fi
16355
Ned Deily322f5ba2013-11-21 23:01:59 -080016356# ensurepip option
16357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16358$as_echo_n "checking for ensurepip... " >&6; }
16359
16360# Check whether --with-ensurepip was given.
16361if test "${with_ensurepip+set}" = set; then :
16362 withval=$with_ensurepip;
16363else
16364 with_ensurepip=upgrade
16365fi
16366
16367case $with_ensurepip in #(
16368 yes|upgrade) :
16369 ENSUREPIP=upgrade ;; #(
16370 install) :
16371 ENSUREPIP=install ;; #(
16372 no) :
16373 ENSUREPIP=no ;; #(
16374 *) :
16375 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16376esac
16377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16378$as_echo "$ENSUREPIP" >&6; }
16379
16380
Victor Stinner35a97c02015-03-08 02:59:09 +010016381# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16383$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16385/* end confdefs.h. */
16386
16387
16388 #include <dirent.h>
16389
16390 int main() {
16391 struct dirent entry;
16392 return entry.d_type == DT_UNKNOWN;
16393 }
16394
16395
16396_ACEOF
16397if ac_fn_c_try_link "$LINENO"; then :
16398 have_dirent_d_type=yes
16399else
16400 have_dirent_d_type=no
16401fi
16402rm -f core conftest.err conftest.$ac_objext \
16403 conftest$ac_exeext conftest.$ac_ext
16404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16405$as_echo "$have_dirent_d_type" >&6; }
16406
16407if test "$have_dirent_d_type" = yes; then
16408
16409$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16410
16411fi
16412
Victor Stinner9eb57c52015-03-19 22:21:49 +010016413# check if the Linux getrandom() syscall is available
16414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16415$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16417/* end confdefs.h. */
16418
16419
Victor Stinner1b80b242016-04-12 22:34:58 +020016420 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016421 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016422 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016423
16424 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016425 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016426 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016427 const int flags = GRND_NONBLOCK;
16428 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016429 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016430 return 0;
16431 }
16432
16433
16434_ACEOF
16435if ac_fn_c_try_link "$LINENO"; then :
16436 have_getrandom_syscall=yes
16437else
16438 have_getrandom_syscall=no
16439fi
16440rm -f core conftest.err conftest.$ac_objext \
16441 conftest$ac_exeext conftest.$ac_ext
16442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16443$as_echo "$have_getrandom_syscall" >&6; }
16444
16445if test "$have_getrandom_syscall" = yes; then
16446
16447$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16448
16449fi
16450
Victor Stinner3abf44e2015-09-18 15:38:37 +020016451# check if the getrandom() function is available
16452# the test was written for the Solaris function of <sys/random.h>
16453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16454$as_echo_n "checking for the getrandom() function... " >&6; }
16455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16456/* end confdefs.h. */
16457
16458
16459 #include <sys/random.h>
16460
16461 int main() {
16462 char buffer[1];
16463 const size_t buflen = sizeof(buffer);
16464 const int flags = 0;
16465 /* ignore the result, Python checks for ENOSYS at runtime */
16466 (void)getrandom(buffer, buflen, flags);
16467 return 0;
16468 }
16469
16470
16471_ACEOF
16472if ac_fn_c_try_link "$LINENO"; then :
16473 have_getrandom=yes
16474else
16475 have_getrandom=no
16476fi
16477rm -f core conftest.err conftest.$ac_objext \
16478 conftest$ac_exeext conftest.$ac_ext
16479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16480$as_echo "$have_getrandom" >&6; }
16481
16482if test "$have_getrandom" = yes; then
16483
16484$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16485
16486fi
16487
Guido van Rossum627b2d71993-12-24 10:39:16 +000016488# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016489ac_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 +000016490
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016491ac_config_files="$ac_config_files Modules/ld_so_aix"
16492
Martin v. Löwis11437992002-04-12 09:54:03 +000016493cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016494# This file is a shell script that caches the results of configure
16495# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016496# scripts and configure runs, see configure's option --config-cache.
16497# It is not useful on other systems. If it contains results you don't
16498# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016499#
Martin v. Löwis11437992002-04-12 09:54:03 +000016500# config.status only pays attention to the cache file if you give it
16501# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016502#
Skip Montanaro6dead952003-09-25 14:50:04 +000016503# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016504# loading this file, other *unset* `ac_cv_foo' will be assigned the
16505# following values.
16506
16507_ACEOF
16508
Guido van Rossumf78abae1997-01-21 22:02:36 +000016509# The following way of writing the cache mishandles newlines in values,
16510# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016512# Ultrix sh set writes to stderr and can't be redirected directly,
16513# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016514(
16515 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16516 eval ac_val=\$$ac_var
16517 case $ac_val in #(
16518 *${as_nl}*)
16519 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016520 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16521$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522 esac
16523 case $ac_var in #(
16524 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016525 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16526 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527 esac ;;
16528 esac
16529 done
16530
Martin v. Löwis11437992002-04-12 09:54:03 +000016531 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016532 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16533 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016534 # `set' does not quote correctly, so add quotes: double-quote
16535 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016537 "s/'/'\\\\''/g;
16538 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016539 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016540 *)
16541 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016543 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 esac |
16545 sort
16546) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016549 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16552 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16554 :end' >>confcache
16555if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16556 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016557 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016558 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16559$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016560 if test ! -f "$cache_file" || test -h "$cache_file"; then
16561 cat confcache >"$cache_file"
16562 else
16563 case $cache_file in #(
16564 */* | ?:*)
16565 mv -f confcache "$cache_file"$$ &&
16566 mv -f "$cache_file"$$ "$cache_file" ;; #(
16567 *)
16568 mv -f confcache "$cache_file" ;;
16569 esac
16570 fi
16571 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016572 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016573 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16574$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016575 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016576fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016577rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016578
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016579test "x$prefix" = xNONE && prefix=$ac_default_prefix
16580# Let make expand exec_prefix.
16581test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016582
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016583DEFS=-DHAVE_CONFIG_H
16584
Skip Montanaro6dead952003-09-25 14:50:04 +000016585ac_libobjs=
16586ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016587U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016588for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16589 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016591 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16593 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016594 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16595 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016596done
16597LIBOBJS=$ac_libobjs
16598
16599LTLIBOBJS=$ac_ltlibobjs
16600
16601
Martin v. Löwis11437992002-04-12 09:54:03 +000016602
Matthias Kloseb9621712010-04-24 17:59:49 +000016603
Victor Stinnere0be4232011-10-25 13:06:09 +020016604: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016605ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016606ac_clean_files_save=$ac_clean_files
16607ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016608{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16609$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16610as_write_fail=0
16611cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016612#! $SHELL
16613# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016614# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016615# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016616# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016617
Martin v. Löwis11437992002-04-12 09:54:03 +000016618debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016619ac_cs_recheck=false
16620ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016621
Matthias Kloseb9621712010-04-24 17:59:49 +000016622SHELL=\${CONFIG_SHELL-$SHELL}
16623export SHELL
16624_ASEOF
16625cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16626## -------------------- ##
16627## M4sh Initialization. ##
16628## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016630# Be more Bourne compatible
16631DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016632if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 emulate sh
16634 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016635 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016636 # is contrary to our usage. Disable this feature.
16637 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016638 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016639else
Matthias Kloseb9621712010-04-24 17:59:49 +000016640 case `(set -o) 2>/dev/null` in #(
16641 *posix*) :
16642 set -o posix ;; #(
16643 *) :
16644 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016646fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016647
16648
Matthias Kloseb9621712010-04-24 17:59:49 +000016649as_nl='
16650'
16651export as_nl
16652# Printing a long string crashes Solaris 7 /usr/bin/printf.
16653as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16654as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16655as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16656# Prefer a ksh shell builtin over an external printf program on Solaris,
16657# but without wasting forks for bash or zsh.
16658if test -z "$BASH_VERSION$ZSH_VERSION" \
16659 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16660 as_echo='print -r --'
16661 as_echo_n='print -rn --'
16662elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16663 as_echo='printf %s\n'
16664 as_echo_n='printf %s'
16665else
16666 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16667 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16668 as_echo_n='/usr/ucb/echo -n'
16669 else
16670 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16671 as_echo_n_body='eval
16672 arg=$1;
16673 case $arg in #(
16674 *"$as_nl"*)
16675 expr "X$arg" : "X\\(.*\\)$as_nl";
16676 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16677 esac;
16678 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16679 '
16680 export as_echo_n_body
16681 as_echo_n='sh -c $as_echo_n_body as_echo'
16682 fi
16683 export as_echo_body
16684 as_echo='sh -c $as_echo_body as_echo'
16685fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016686
16687# The user is always right.
16688if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016689 PATH_SEPARATOR=:
16690 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16691 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16692 PATH_SEPARATOR=';'
16693 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696
16697# IFS
16698# We need space, tab and new line, in precisely that order. Quoting is
16699# there to prevent editors from complaining about space-tab.
16700# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16701# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702IFS=" "" $as_nl"
16703
16704# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016705as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016706case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707 *[\\/]* ) as_myself=$0 ;;
16708 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016709for as_dir in $PATH
16710do
16711 IFS=$as_save_IFS
16712 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016713 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16714 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016715IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717 ;;
16718esac
16719# We did not find ourselves, most probably we were run as `sh COMMAND'
16720# in which case we are not to be found in the path.
16721if test "x$as_myself" = x; then
16722 as_myself=$0
16723fi
16724if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016725 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16726 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727fi
16728
Matthias Kloseb9621712010-04-24 17:59:49 +000016729# Unset variables that we do not need and which cause bugs (e.g. in
16730# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16731# suppresses any "Segmentation fault" message there. '((' could
16732# trigger a bug in pdksh 5.2.14.
16733for as_var in BASH_ENV ENV MAIL MAILPATH
16734do eval test x\${$as_var+set} = xset \
16735 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736done
16737PS1='$ '
16738PS2='> '
16739PS4='+ '
16740
16741# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016742LC_ALL=C
16743export LC_ALL
16744LANGUAGE=C
16745export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746
Matthias Kloseb9621712010-04-24 17:59:49 +000016747# CDPATH.
16748(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16749
16750
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016751# as_fn_error STATUS ERROR [LINENO LOG_FD]
16752# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016753# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16754# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016755# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016756as_fn_error ()
16757{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016758 as_status=$1; test $as_status -eq 0 && as_status=1
16759 if test "$4"; then
16760 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16761 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016762 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016763 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016764 as_fn_exit $as_status
16765} # as_fn_error
16766
16767
16768# as_fn_set_status STATUS
16769# -----------------------
16770# Set $? to STATUS, without forking.
16771as_fn_set_status ()
16772{
16773 return $1
16774} # as_fn_set_status
16775
16776# as_fn_exit STATUS
16777# -----------------
16778# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16779as_fn_exit ()
16780{
16781 set +e
16782 as_fn_set_status $1
16783 exit $1
16784} # as_fn_exit
16785
16786# as_fn_unset VAR
16787# ---------------
16788# Portably unset VAR.
16789as_fn_unset ()
16790{
16791 { eval $1=; unset $1;}
16792}
16793as_unset=as_fn_unset
16794# as_fn_append VAR VALUE
16795# ----------------------
16796# Append the text in VALUE to the end of the definition contained in VAR. Take
16797# advantage of any shell optimizations that allow amortized linear growth over
16798# repeated appends, instead of the typical quadratic growth present in naive
16799# implementations.
16800if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16801 eval 'as_fn_append ()
16802 {
16803 eval $1+=\$2
16804 }'
16805else
16806 as_fn_append ()
16807 {
16808 eval $1=\$$1\$2
16809 }
16810fi # as_fn_append
16811
16812# as_fn_arith ARG...
16813# ------------------
16814# Perform arithmetic evaluation on the ARGs, and store the result in the
16815# global $as_val. Take advantage of shells that can avoid forks. The arguments
16816# must be portable across $(()) and expr.
16817if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16818 eval 'as_fn_arith ()
16819 {
16820 as_val=$(( $* ))
16821 }'
16822else
16823 as_fn_arith ()
16824 {
16825 as_val=`expr "$@" || test $? -eq 1`
16826 }
16827fi # as_fn_arith
16828
16829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016830if expr a : '\(a\)' >/dev/null 2>&1 &&
16831 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16832 as_expr=expr
16833else
16834 as_expr=false
16835fi
16836
16837if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16838 as_basename=basename
16839else
16840 as_basename=false
16841fi
16842
Matthias Kloseb9621712010-04-24 17:59:49 +000016843if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16844 as_dirname=dirname
16845else
16846 as_dirname=false
16847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849as_me=`$as_basename -- "$0" ||
16850$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16851 X"$0" : 'X\(//\)$' \| \
16852 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016853$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016854 sed '/^.*\/\([^/][^/]*\)\/*$/{
16855 s//\1/
16856 q
16857 }
16858 /^X\/\(\/\/\)$/{
16859 s//\1/
16860 q
16861 }
16862 /^X\/\(\/\).*/{
16863 s//\1/
16864 q
16865 }
16866 s/.*/./; q'`
16867
Matthias Kloseb9621712010-04-24 17:59:49 +000016868# Avoid depending upon Character Ranges.
16869as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16870as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16871as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16872as_cr_digits='0123456789'
16873as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874
16875ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016876case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016877-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016879 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 xy) ECHO_C='\c';;
16881 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16882 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883 esac;;
16884*)
16885 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016887
Martin v. Löwis11437992002-04-12 09:54:03 +000016888rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016889if test -d conf$$.dir; then
16890 rm -f conf$$.dir/conf$$.file
16891else
16892 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016893 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016895if (echo >conf$$.file) 2>/dev/null; then
16896 if ln -s conf$$.file conf$$ 2>/dev/null; then
16897 as_ln_s='ln -s'
16898 # ... but there are two gotchas:
16899 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16900 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016901 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016902 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016903 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 elif ln conf$$.file conf$$ 2>/dev/null; then
16905 as_ln_s=ln
16906 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016907 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016908 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016909else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016910 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16913rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016914
Matthias Kloseb9621712010-04-24 17:59:49 +000016915
16916# as_fn_mkdir_p
16917# -------------
16918# Create "$as_dir" as a directory, including parents if necessary.
16919as_fn_mkdir_p ()
16920{
16921
16922 case $as_dir in #(
16923 -*) as_dir=./$as_dir;;
16924 esac
16925 test -d "$as_dir" || eval $as_mkdir_p || {
16926 as_dirs=
16927 while :; do
16928 case $as_dir in #(
16929 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16930 *) as_qdir=$as_dir;;
16931 esac
16932 as_dirs="'$as_qdir' $as_dirs"
16933 as_dir=`$as_dirname -- "$as_dir" ||
16934$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16935 X"$as_dir" : 'X\(//\)[^/]' \| \
16936 X"$as_dir" : 'X\(//\)$' \| \
16937 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16938$as_echo X"$as_dir" |
16939 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16940 s//\1/
16941 q
16942 }
16943 /^X\(\/\/\)[^/].*/{
16944 s//\1/
16945 q
16946 }
16947 /^X\(\/\/\)$/{
16948 s//\1/
16949 q
16950 }
16951 /^X\(\/\).*/{
16952 s//\1/
16953 q
16954 }
16955 s/.*/./; q'`
16956 test -d "$as_dir" && break
16957 done
16958 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016959 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016960
16961
16962} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016963if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016964 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016965else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016966 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016967 as_mkdir_p=false
16968fi
16969
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016970
16971# as_fn_executable_p FILE
16972# -----------------------
16973# Test if FILE is an executable regular file.
16974as_fn_executable_p ()
16975{
16976 test -f "$1" && test -x "$1"
16977} # as_fn_executable_p
16978as_test_x='test -x'
16979as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016980
16981# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016982as_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 +000016983
16984# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016985as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016986
16987
Martin v. Löwis11437992002-04-12 09:54:03 +000016988exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016989## ----------------------------------- ##
16990## Main body of $CONFIG_STATUS script. ##
16991## ----------------------------------- ##
16992_ASEOF
16993test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016994
Matthias Kloseb9621712010-04-24 17:59:49 +000016995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16996# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016997# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016998# values after options handling.
16999ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017000This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017001generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017002
17003 CONFIG_FILES = $CONFIG_FILES
17004 CONFIG_HEADERS = $CONFIG_HEADERS
17005 CONFIG_LINKS = $CONFIG_LINKS
17006 CONFIG_COMMANDS = $CONFIG_COMMANDS
17007 $ $0 $@
17008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009on `(hostname || uname -n) 2>/dev/null | sed 1q`
17010"
17011
Martin v. Löwis11437992002-04-12 09:54:03 +000017012_ACEOF
17013
Matthias Kloseb9621712010-04-24 17:59:49 +000017014case $ac_config_files in *"
17015"*) set x $ac_config_files; shift; ac_config_files=$*;;
17016esac
17017
17018case $ac_config_headers in *"
17019"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17020esac
17021
17022
17023cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017024# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017025config_files="$ac_config_files"
17026config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017029
Matthias Kloseb9621712010-04-24 17:59:49 +000017030cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017031ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017032\`$as_me' instantiates files and other configuration actions
17033from templates according to the current configuration. Unless the files
17034and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017035
Matthias Kloseb9621712010-04-24 17:59:49 +000017036Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017037
17038 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017039 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017040 --config print configuration, then exit
17041 -q, --quiet, --silent
17042 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 -d, --debug don't remove temporary files
17044 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017045 --file=FILE[:TEMPLATE]
17046 instantiate the configuration file FILE
17047 --header=FILE[:TEMPLATE]
17048 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017049
17050Configuration files:
17051$config_files
17052
17053Configuration headers:
17054$config_headers
17055
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017056Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017059cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17060ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017061ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017062python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017063configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017064 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017065
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017066Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017067This config.status script is free software; the Free Software Foundation
17068gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069
17070ac_pwd='$ac_pwd'
17071srcdir='$srcdir'
17072INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017073MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017074test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017075_ACEOF
17076
Matthias Kloseb9621712010-04-24 17:59:49 +000017077cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17078# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017079ac_need_defaults=:
17080while test $# != 0
17081do
17082 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017083 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17085 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017086 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017088 --*=)
17089 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17090 ac_optarg=
17091 ac_shift=:
17092 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017094 ac_option=$1
17095 ac_optarg=$2
17096 ac_shift=shift
17097 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017098 esac
17099
Skip Montanaro6dead952003-09-25 14:50:04 +000017100 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017102 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17103 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017105 $as_echo "$ac_cs_version"; exit ;;
17106 --config | --confi | --conf | --con | --co | --c )
17107 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017108 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017109 debug=: ;;
17110 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017111 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017112 case $ac_optarg in
17113 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017114 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017115 esac
17116 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017117 ac_need_defaults=false;;
17118 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017119 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017120 case $ac_optarg in
17121 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17122 esac
17123 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017124 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017125 --he | --h)
17126 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017127 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017128Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017129 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017130 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017131 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17132 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17133 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
17135 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017136 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017137Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017138
Matthias Kloseb9621712010-04-24 17:59:49 +000017139 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017141
17142 esac
17143 shift
17144done
17145
Skip Montanaro6dead952003-09-25 14:50:04 +000017146ac_configure_extra_args=
17147
17148if $ac_cs_silent; then
17149 exec 6>/dev/null
17150 ac_configure_extra_args="$ac_configure_extra_args --silent"
17151fi
17152
17153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017155if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017156 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017157 shift
17158 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17159 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017161 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017162fi
17163
Martin v. Löwis11437992002-04-12 09:54:03 +000017164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017165cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166exec 5>>config.log
17167{
17168 echo
17169 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17170## Running $as_me. ##
17171_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017172 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017178
Matthias Kloseb9621712010-04-24 17:59:49 +000017179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180
17181# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017182for ac_config_target in $ac_config_targets
17183do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184 case $ac_config_target in
17185 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17186 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17187 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017188 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17189 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17191 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017192 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017193 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017194 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195
Victor Stinnere0be4232011-10-25 13:06:09 +020017196 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017197 esac
17198done
17199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200
Martin v. Löwis11437992002-04-12 09:54:03 +000017201# If the user did not use the arguments to specify the items to instantiate,
17202# then the envvar interface is used. Set only those that are not.
17203# We use the long form for the default assignment because of an extremely
17204# bizarre bug on SunOS 4.1.3.
17205if $ac_need_defaults; then
17206 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17207 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17208fi
17209
Skip Montanaro6dead952003-09-25 14:50:04 +000017210# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017212# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017213# Hook for its removal unless debugging.
17214# Note that there is a small window in which the directory will not be cleaned:
17215# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017216$debug ||
17217{
Victor Stinnere0be4232011-10-25 13:06:09 +020017218 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017219 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017220 : "${ac_tmp:=$tmp}"
17221 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017223 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017224}
Martin v. Löwis11437992002-04-12 09:54:03 +000017225# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017226
Martin v. Löwis11437992002-04-12 09:54:03 +000017227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017229 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017230} ||
17231{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232 tmp=./conf$$-$RANDOM
17233 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017234} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017235ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017236
Matthias Kloseb9621712010-04-24 17:59:49 +000017237# Set up the scripts for CONFIG_FILES section.
17238# No need to generate them if there are no CONFIG_FILES.
17239# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017241
Matthias Kloseb9621712010-04-24 17:59:49 +000017242
17243ac_cr=`echo X | tr X '\015'`
17244# On cygwin, bash can eat \r inside `` if the user requested igncr.
17245# But we know of no other shell where ac_cr would be empty at this
17246# point, so we can use a bashism as a fallback.
17247if test "x$ac_cr" = x; then
17248 eval ac_cr=\$\'\\r\'
17249fi
17250ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17251if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017252 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017253else
17254 ac_cs_awk_cr=$ac_cr
17255fi
17256
Victor Stinnere0be4232011-10-25 13:06:09 +020017257echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017258_ACEOF
17259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260
Matthias Kloseb9621712010-04-24 17:59:49 +000017261{
17262 echo "cat >conf$$subs.awk <<_ACEOF" &&
17263 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17264 echo "_ACEOF"
17265} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017266 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17267ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268ac_delim='%!_!# '
17269for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017270 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017271 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017272
Matthias Kloseb9621712010-04-24 17:59:49 +000017273 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17274 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017275 break
17276 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278 else
17279 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017280 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281done
Matthias Kloseb9621712010-04-24 17:59:49 +000017282rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283
Matthias Kloseb9621712010-04-24 17:59:49 +000017284cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017285cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017287sed -n '
17288h
17289s/^/S["/; s/!.*/"]=/
17290p
17291g
17292s/^[^!]*!//
17293:repl
17294t repl
17295s/'"$ac_delim"'$//
17296t delim
17297:nl
17298h
17299s/\(.\{148\}\)..*/\1/
17300t more1
17301s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17302p
17303n
17304b repl
17305:more1
17306s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17307p
17308g
17309s/.\{148\}//
17310t nl
17311:delim
17312h
17313s/\(.\{148\}\)..*/\1/
17314t more2
17315s/["\\]/\\&/g; s/^/"/; s/$/"/
17316p
17317b
17318:more2
17319s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17320p
17321g
17322s/.\{148\}//
17323t delim
17324' <conf$$subs.awk | sed '
17325/^[^""]/{
17326 N
17327 s/\n//
17328}
17329' >>$CONFIG_STATUS || ac_write_fail=1
17330rm -f conf$$subs.awk
17331cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17332_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017333cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017334 for (key in S) S_is_set[key] = 1
17335 FS = ""
17336
17337}
17338{
17339 line = $ 0
17340 nfields = split(line, field, "@")
17341 substed = 0
17342 len = length(field[1])
17343 for (i = 2; i < nfields; i++) {
17344 key = field[i]
17345 keylen = length(key)
17346 if (S_is_set[key]) {
17347 value = S[key]
17348 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17349 len += length(value) + length(field[++i])
17350 substed = 1
17351 } else
17352 len += 1 + keylen
17353 }
17354
17355 print line
17356}
17357
17358_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17361if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17362 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17363else
17364 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017365fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017366 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017367_ACEOF
17368
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017369# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17370# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371# trailing colons and then remove the whole line if VPATH becomes empty
17372# (actually we leave an empty line to preserve line numbers).
17373if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017374 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17375h
17376s///
17377s/^/:/
17378s/[ ]*$/:/
17379s/:\$(srcdir):/:/g
17380s/:\${srcdir}:/:/g
17381s/:@srcdir@:/:/g
17382s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017384x
17385s/\(=[ ]*\).*/\1/
17386G
17387s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388s/^[^=]*=[ ]*$//
17389}'
17390fi
17391
Matthias Kloseb9621712010-04-24 17:59:49 +000017392cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017393fi # test -n "$CONFIG_FILES"
17394
Matthias Kloseb9621712010-04-24 17:59:49 +000017395# Set up the scripts for CONFIG_HEADERS section.
17396# No need to generate them if there are no CONFIG_HEADERS.
17397# This happens for instance with `./config.status Makefile'.
17398if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017399cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017400BEGIN {
17401_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402
Matthias Kloseb9621712010-04-24 17:59:49 +000017403# Transform confdefs.h into an awk script `defines.awk', embedded as
17404# here-document in config.status, that substitutes the proper values into
17405# config.h.in to produce config.h.
17406
17407# Create a delimiter string that does not exist in confdefs.h, to ease
17408# handling of long lines.
17409ac_delim='%!_!# '
17410for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017411 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17412 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017413 break
17414 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017415 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017416 else
17417 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17418 fi
17419done
17420
17421# For the awk script, D is an array of macro values keyed by name,
17422# likewise P contains macro parameters if any. Preserve backslash
17423# newline sequences.
17424
17425ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17426sed -n '
17427s/.\{148\}/&'"$ac_delim"'/g
17428t rset
17429:rset
17430s/^[ ]*#[ ]*define[ ][ ]*/ /
17431t def
17432d
17433:def
17434s/\\$//
17435t bsnl
17436s/["\\]/\\&/g
17437s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17438D["\1"]=" \3"/p
17439s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17440d
17441:bsnl
17442s/["\\]/\\&/g
17443s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17444D["\1"]=" \3\\\\\\n"\\/p
17445t cont
17446s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17447t cont
17448d
17449:cont
17450n
17451s/.\{148\}/&'"$ac_delim"'/g
17452t clear
17453:clear
17454s/\\$//
17455t bsnlc
17456s/["\\]/\\&/g; s/^/"/; s/$/"/p
17457d
17458:bsnlc
17459s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17460b cont
17461' <confdefs.h | sed '
17462s/'"$ac_delim"'/"\\\
17463"/g' >>$CONFIG_STATUS || ac_write_fail=1
17464
17465cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17466 for (key in D) D_is_set[key] = 1
17467 FS = ""
17468}
17469/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17470 line = \$ 0
17471 split(line, arg, " ")
17472 if (arg[1] == "#") {
17473 defundef = arg[2]
17474 mac1 = arg[3]
17475 } else {
17476 defundef = substr(arg[1], 2)
17477 mac1 = arg[2]
17478 }
17479 split(mac1, mac2, "(") #)
17480 macro = mac2[1]
17481 prefix = substr(line, 1, index(line, defundef) - 1)
17482 if (D_is_set[macro]) {
17483 # Preserve the white space surrounding the "#".
17484 print prefix "define", macro P[macro] D[macro]
17485 next
17486 } else {
17487 # Replace #undef with comments. This is necessary, for example,
17488 # in the case of _POSIX_SOURCE, which is predefined and required
17489 # on some systems where configure will not decide to define it.
17490 if (defundef == "undef") {
17491 print "/*", prefix defundef, macro, "*/"
17492 next
17493 }
17494 }
17495}
17496{ print }
17497_ACAWK
17498_ACEOF
17499cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017500 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017501fi # test -n "$CONFIG_HEADERS"
17502
17503
17504eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17505shift
17506for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507do
17508 case $ac_tag in
17509 :[FHLC]) ac_mode=$ac_tag; continue;;
17510 esac
17511 case $ac_mode$ac_tag in
17512 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017513 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514 :[FH]-) ac_tag=-:-;;
17515 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17516 esac
17517 ac_save_IFS=$IFS
17518 IFS=:
17519 set x $ac_tag
17520 IFS=$ac_save_IFS
17521 shift
17522 ac_file=$1
17523 shift
17524
17525 case $ac_mode in
17526 :L) ac_source=$1;;
17527 :[FH])
17528 ac_file_inputs=
17529 for ac_f
17530 do
17531 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017532 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533 *) # Look for the file first in the build tree, then in the source tree
17534 # (if the path is not absolute). The absolute path cannot be DOS-style,
17535 # because $ac_f cannot contain `:'.
17536 test -f "$ac_f" ||
17537 case $ac_f in
17538 [\\/$]*) false;;
17539 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17540 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017541 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017543 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17544 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545 done
17546
17547 # Let's still pretend it is `configure' which instantiates (i.e., don't
17548 # use $as_me), people would be surprised to read:
17549 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017550 configure_input='Generated from '`
17551 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17552 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553 if test x"$ac_file" != x-; then
17554 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017555 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17556$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 # Neutralize special characters interpreted by sed in replacement strings.
17559 case $configure_input in #(
17560 *\&* | *\|* | *\\* )
17561 ac_sed_conf_input=`$as_echo "$configure_input" |
17562 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17563 *) ac_sed_conf_input=$configure_input;;
17564 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565
17566 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017567 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17568 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569 esac
17570 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 esac
17572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017574$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017575 X"$ac_file" : 'X\(//\)[^/]' \| \
17576 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017578$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17580 s//\1/
17581 q
17582 }
17583 /^X\(\/\/\)[^/].*/{
17584 s//\1/
17585 q
17586 }
17587 /^X\(\/\/\)$/{
17588 s//\1/
17589 q
17590 }
17591 /^X\(\/\).*/{
17592 s//\1/
17593 q
17594 }
17595 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 ac_builddir=.
17598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599case "$ac_dir" in
17600.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17601*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017602 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017604 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605 case $ac_top_builddir_sub in
17606 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17607 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17608 esac ;;
17609esac
17610ac_abs_top_builddir=$ac_pwd
17611ac_abs_builddir=$ac_pwd$ac_dir_suffix
17612# for backward compatibility:
17613ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017614
17615case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618 ac_top_srcdir=$ac_top_builddir_sub
17619 ac_abs_top_srcdir=$ac_pwd ;;
17620 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622 ac_top_srcdir=$srcdir
17623 ac_abs_top_srcdir=$srcdir ;;
17624 *) # Relative name.
17625 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17626 ac_top_srcdir=$ac_top_build_prefix$srcdir
17627 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017628esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017630
Martin v. Löwis11437992002-04-12 09:54:03 +000017631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 case $ac_mode in
17633 :F)
17634 #
17635 # CONFIG_FILE
17636 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017637
17638 case $INSTALL in
17639 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017642 ac_MKDIR_P=$MKDIR_P
17643 case $MKDIR_P in
17644 [\\/$]* | ?:[\\/]* ) ;;
17645 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17646 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017647_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648
Matthias Kloseb9621712010-04-24 17:59:49 +000017649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650# If the template does not know about datarootdir, expand it.
17651# FIXME: This hack should be removed a few years after 2.60.
17652ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017653ac_sed_dataroot='
17654/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655 p
17656 q
17657}
17658/@datadir@/p
17659/@docdir@/p
17660/@infodir@/p
17661/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017662/@mandir@/p'
17663case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664*datarootdir*) ac_datarootdir_seen=yes;;
17665*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17667$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670 ac_datarootdir_hack='
17671 s&@datadir@&$datadir&g
17672 s&@docdir@&$docdir&g
17673 s&@infodir@&$infodir&g
17674 s&@localedir@&$localedir&g
17675 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017676 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677esac
17678_ACEOF
17679
17680# Neutralize VPATH when `$srcdir' = `.'.
17681# Shell code in configure.ac might set extrasub.
17682# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17684ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017685$extrasub
17686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017688:t
17689/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017690s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017692s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693s&@srcdir@&$ac_srcdir&;t t
17694s&@abs_srcdir@&$ac_abs_srcdir&;t t
17695s&@top_srcdir@&$ac_top_srcdir&;t t
17696s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17697s&@builddir@&$ac_builddir&;t t
17698s&@abs_builddir@&$ac_abs_builddir&;t t
17699s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17700s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017701s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017703"
Victor Stinnere0be4232011-10-25 13:06:09 +020017704eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17705 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017708 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17709 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17710 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017712which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017713$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017714which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017715
Victor Stinnere0be4232011-10-25 13:06:09 +020017716 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017717 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017718 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17719 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017720 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017721 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 ;;
17723 :H)
17724 #
17725 # CONFIG_HEADER
17726 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017727 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017728 {
17729 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017730 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17731 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017732 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017733 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017734 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17735$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017736 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017738 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017739 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017740 fi
17741 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017742 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017743 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017744 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748
17749 esac
17750
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017751
17752 case $ac_file$ac_mode in
17753 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17754
17755 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756done # for ac_tag
17757
Guido van Rossum627b2d71993-12-24 10:39:16 +000017758
Matthias Kloseb9621712010-04-24 17:59:49 +000017759as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017760_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017761ac_clean_files=$ac_clean_files_save
17762
Matthias Kloseb9621712010-04-24 17:59:49 +000017763test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017764 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017765
Martin v. Löwis11437992002-04-12 09:54:03 +000017766
17767# configure is writing to config.log, and then calls config.status.
17768# config.status does its own redirection, appending to config.log.
17769# Unfortunately, on DOS this fails, as config.log is still kept open
17770# by configure, so config.status won't be able to write to it; its
17771# output is simply discarded. So we exec the FD to /dev/null,
17772# effectively closing config.log, so it can be properly (re)opened and
17773# appended to by config.status. When coming back to configure, we
17774# need to make the FD available again.
17775if test "$no_create" != yes; then
17776 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017777 ac_config_status_args=
17778 test "$silent" = yes &&
17779 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017780 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017781 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017782 exec 5>>config.log
17783 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17784 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017785 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017786fi
17787if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17789$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017790fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017791
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017792
Christian Heimes75ed8902013-11-20 01:11:18 +010017793echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017794if test ! -f Modules/Setup
17795then
17796 cp $srcdir/Modules/Setup.dist Modules/Setup
17797fi
17798
Christian Heimes75ed8902013-11-20 01:11:18 +010017799echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017800if test ! -f Modules/Setup.local
17801then
17802 echo "# Edit this file for local setup changes" >Modules/Setup.local
17803fi
17804
Christian Heimes75ed8902013-11-20 01:11:18 +010017805echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017806$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17807 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017808 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017809mv config.c Modules