blob: c892a99f9d36d7616a23d95e9c65dd187c0904f8 [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.
Yury Selivanov7aa53412015-05-30 10:57:56 -04003# Generated by GNU Autoconf 2.69 for python 3.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://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
270$0: http://bugs.python.org/ about your system, including
271$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'
Yury Selivanov7aa53412015-05-30 10:57:56 -0400583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://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
Kushal Das02d23a22014-04-15 23:50:06 +0530683OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200684PYTHON
685ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200686ac_ct_READELF
687READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000688ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200689ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000690AR
691RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000692USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000693GNULD
694LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000695LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000696RUNSHARED
697INSTSONAME
698LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000699PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000700BLDLIBRARY
701DLLLIBRARY
702LDLIBRARY
703LIBRARY
704BUILDEXEEXT
705EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200706NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200708PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200709MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200710ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000711MAINCC
712CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713GREP
714CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000715OBJEXT
716EXEEXT
717ac_ct_CC
718CPPFLAGS
719LDFLAGS
720CFLAGS
721CC
722EXPORT_MACOSX_DEPLOYMENT_TARGET
723CONFIGURE_MACOSX_DEPLOYMENT_TARGET
724SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200725_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000726MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000727FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800729FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000730FRAMEWORKALTINSTALLLAST
731FRAMEWORKALTINSTALLFIRST
732FRAMEWORKINSTALLLAST
733FRAMEWORKINSTALLFIRST
734PYTHONFRAMEWORKINSTALLDIR
735PYTHONFRAMEWORKPREFIX
736PYTHONFRAMEWORKDIR
737PYTHONFRAMEWORKIDENTIFIER
738PYTHONFRAMEWORK
739LIPO_32BIT_FLAGS
740ARCH_RUN_32BIT
741UNIVERSALSDK
742CONFIG_ARGS
743SOVERSION
744VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200745PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Martin Panter1046d5c2016-04-23 00:58:44 +0000754cross_compiling
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500755HAS_HG
756HGBRANCH
757HGTAG
758HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400759BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000760target_alias
761host_alias
762build_alias
763LIBS
764ECHO_T
765ECHO_N
766ECHO_C
767DEFS
768mandir
769localedir
770libdir
771psdir
772pdfdir
773dvidir
774htmldir
775infodir
776docdir
777oldincludedir
778includedir
779localstatedir
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'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889includedir='${prefix}/include'
890oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
892infodir='${datarootdir}/info'
893htmldir='${docdir}'
894dvidir='${docdir}'
895pdfdir='${docdir}'
896psdir='${docdir}'
897libdir='${exec_prefix}/lib'
898localedir='${datarootdir}/locale'
899mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 # If the previous option needs an argument, assign it.
906 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 ac_prev=
909 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200913 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
914 *=) ac_optarg= ;;
915 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 # Accept the important Cygnus configure options, so we can diagnose typos.
919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_dashdash$ac_option in
921 --)
922 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924 -bindir | --bindir | --bindi | --bind | --bin | --bi)
925 ac_prev=bindir ;;
926 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 -cache-file | --cache-file | --cache-fil | --cache-fi \
935 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
936 ac_prev=cache_file ;;
937 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
938 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 cache_file=$ac_optarg ;;
940
941 --config-cache | -C)
942 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
950 | --dataroo | --dataro | --datar)
951 ac_prev=datarootdir ;;
952 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
953 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
954 datarootdir=$ac_optarg ;;
955
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200960 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt_orig=$ac_useropt
962 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
963 case $ac_user_opts in
964 *"
965"enable_$ac_useropt"
966"*) ;;
967 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
968 ac_unrecognized_sep=', ';;
969 esac
970 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971
972 -docdir | --docdir | --docdi | --doc | --do)
973 ac_prev=docdir ;;
974 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
975 docdir=$ac_optarg ;;
976
977 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
978 ac_prev=dvidir ;;
979 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
980 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000983 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200986 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
999 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1000 | --exec | --exe | --ex)
1001 ac_prev=exec_prefix ;;
1002 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1003 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1004 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
1007 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 # Obsolete; use --with-gas.
1009 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 -help | --help | --hel | --he | -h)
1012 ac_init_help=long ;;
1013 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1014 ac_init_help=recursive ;;
1015 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1016 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001023 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1024 ac_prev=htmldir ;;
1025 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1026 | --ht=*)
1027 htmldir=$ac_optarg ;;
1028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -includedir | --includedir | --includedi | --included | --include \
1030 | --includ | --inclu | --incl | --inc)
1031 ac_prev=includedir ;;
1032 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1033 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -infodir | --infodir | --infodi | --infod | --info | --inf)
1037 ac_prev=infodir ;;
1038 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -libdir | --libdir | --libdi | --libd)
1042 ac_prev=libdir ;;
1043 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1047 | --libexe | --libex | --libe)
1048 ac_prev=libexecdir ;;
1049 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1050 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001053 -localedir | --localedir | --localedi | --localed | --locale)
1054 ac_prev=localedir ;;
1055 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1056 localedir=$ac_optarg ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 ac_prev=localstatedir ;;
1061 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1066 ac_prev=mandir ;;
1067 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Obsolete; use --without-fp.
1072 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 no_create=yes ;;
1077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1079 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1080 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1083 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1084 | --oldin | --oldi | --old | --ol | --o)
1085 ac_prev=oldincludedir ;;
1086 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1087 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1088 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1092 ac_prev=prefix ;;
1093 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1097 | --program-pre | --program-pr | --program-p)
1098 ac_prev=program_prefix ;;
1099 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1100 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1104 | --program-suf | --program-su | --program-s)
1105 ac_prev=program_suffix ;;
1106 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1107 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -program-transform-name | --program-transform-name \
1111 | --program-transform-nam | --program-transform-na \
1112 | --program-transform-n | --program-transform- \
1113 | --program-transform | --program-transfor \
1114 | --program-transfo | --program-transf \
1115 | --program-trans | --program-tran \
1116 | --progr-tra | --program-tr | --program-t)
1117 ac_prev=program_transform_name ;;
1118 -program-transform-name=* | --program-transform-name=* \
1119 | --program-transform-nam=* | --program-transform-na=* \
1120 | --program-transform-n=* | --program-transform-=* \
1121 | --program-transform=* | --program-transfor=* \
1122 | --program-transfo=* | --program-transf=* \
1123 | --program-trans=* | --program-tran=* \
1124 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001127 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1128 ac_prev=pdfdir ;;
1129 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1130 pdfdir=$ac_optarg ;;
1131
1132 -psdir | --psdir | --psdi | --psd | --ps)
1133 ac_prev=psdir ;;
1134 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1135 psdir=$ac_optarg ;;
1136
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1138 | -silent | --silent | --silen | --sile | --sil)
1139 silent=yes ;;
1140
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1142 ac_prev=sbindir ;;
1143 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1144 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146
1147 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1148 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1149 | --sharedst | --shareds | --shared | --share | --shar \
1150 | --sha | --sh)
1151 ac_prev=sharedstatedir ;;
1152 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1153 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1154 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1155 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 -site | --site | --sit)
1159 ac_prev=site ;;
1160 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001162
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1164 ac_prev=srcdir ;;
1165 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1169 | --syscon | --sysco | --sysc | --sys | --sy)
1170 ac_prev=sysconfdir ;;
1171 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1172 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1181 verbose=yes ;;
1182
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 -version | --version | --versio | --versi | --vers | -V)
1184 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001190 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 ac_useropt_orig=$ac_useropt
1192 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1193 case $ac_user_opts in
1194 *"
1195"with_$ac_useropt"
1196"*) ;;
1197 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1198 ac_unrecognized_sep=', ';;
1199 esac
1200 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001206 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt_orig=$ac_useropt
1208 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209 case $ac_user_opts in
1210 *"
1211"with_$ac_useropt"
1212"*) ;;
1213 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1214 ac_unrecognized_sep=', ';;
1215 esac
1216 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 --x)
1219 # Obsolete; use --with-x.
1220 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1223 | --x-incl | --x-inc | --x-in | --x-i)
1224 ac_prev=x_includes ;;
1225 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1226 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1230 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1231 ac_prev=x_libraries ;;
1232 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1233 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1237Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ;;
1239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 *=*)
1241 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1242 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 case $ac_envvar in #(
1244 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 export $ac_envvar ;;
1249
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001250 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001255 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
1258 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259done
1260
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264fi
1265
Matthias Kloseb9621712010-04-24 17:59:49 +00001266if test -n "$ac_unrecognized_opts"; then
1267 case $enable_option_checking in
1268 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1271 esac
1272fi
1273
1274# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1276 datadir sysconfdir sharedstatedir localstatedir includedir \
1277 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1278 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 # Remove trailing slashes.
1282 case $ac_val in
1283 */ )
1284 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1285 eval $ac_var=\$ac_val;;
1286 esac
1287 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 [\\/$]* | ?:[\\/]* ) continue;;
1290 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001293done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294
Martin v. Löwis11437992002-04-12 09:54:03 +00001295# There might be people who depend on the old broken behavior: `$host'
1296# used to hold the argument of --host etc.
1297# FIXME: To remove some day.
1298build=$build_alias
1299host=$host_alias
1300target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302# FIXME: To remove some day.
1303if test "x$host_alias" != x; then
1304 if test "x$build_alias" = x; then
1305 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 elif test "x$build_alias" != "x$host_alias"; then
1307 cross_compiling=yes
1308 fi
1309fi
1310
1311ac_tool_prefix=
1312test -n "$host_alias" && ac_tool_prefix=$host_alias-
1313
1314test "$silent" = yes && exec 6>/dev/null
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317ac_pwd=`pwd` && test -n "$ac_pwd" &&
1318ac_ls_di=`ls -di .` &&
1319ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001320 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001322 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325# Find the source files, if location was not specified.
1326if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 ac_confdir=`$as_dirname -- "$as_myself" ||
1330$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1331 X"$as_myself" : 'X\(//\)[^/]' \| \
1332 X"$as_myself" : 'X\(//\)$' \| \
1333 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1334$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1336 s//\1/
1337 q
1338 }
1339 /^X\(\/\/\)[^/].*/{
1340 s//\1/
1341 q
1342 }
1343 /^X\(\/\/\)$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\).*/{
1348 s//\1/
1349 q
1350 }
1351 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001352 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354 srcdir=..
1355 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356else
1357 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359if test ! -r "$srcdir/$ac_unique_file"; then
1360 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001361 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1364ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001365 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 pwd)`
1367# When building in place, set srcdir=.
1368if test "$ac_abs_confdir" = "$ac_pwd"; then
1369 srcdir=.
1370fi
1371# Remove unnecessary trailing slashes from srcdir.
1372# Double slashes in file names in object file debugging info
1373# mess up M-x gdb in Emacs.
1374case $srcdir in
1375*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1376esac
1377for ac_var in $ac_precious_vars; do
1378 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_env_${ac_var}_value=\$${ac_var}
1380 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1381 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1382done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001383
Martin v. Löwis11437992002-04-12 09:54:03 +00001384#
1385# Report the --help message.
1386#
1387if test "$ac_init_help" = "long"; then
1388 # Omit some internal or obsolete options to make the list less imposing.
1389 # This message is too long to be a string in the A/UX 3.1 sh.
1390 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001391\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Usage: $0 [OPTION]... [VAR=VALUE]...
1394
1395To assign environment variables (e.g., CC, CFLAGS...), specify them as
1396VAR=VALUE. See below for descriptions of some of the useful variables.
1397
1398Defaults for the options are specified in brackets.
1399
1400Configuration:
1401 -h, --help display this help and exit
1402 --help=short display options specific to this package
1403 --help=recursive display the short help of all the included packages
1404 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001405 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 --cache-file=FILE cache test results in FILE [disabled]
1407 -C, --config-cache alias for \`--cache-file=config.cache'
1408 -n, --no-create do not create output files
1409 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1410
Martin v. Löwis11437992002-04-12 09:54:03 +00001411Installation directories:
1412 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001413 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417By default, \`make install' will install all the files in
1418\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1419an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1420for instance \`--prefix=\$HOME'.
1421
1422For better control, use the options below.
1423
1424Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 --bindir=DIR user executables [EPREFIX/bin]
1426 --sbindir=DIR system admin executables [EPREFIX/sbin]
1427 --libexecdir=DIR program executables [EPREFIX/libexec]
1428 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1429 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1430 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1431 --libdir=DIR object code libraries [EPREFIX/lib]
1432 --includedir=DIR C header files [PREFIX/include]
1433 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1434 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1435 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1436 --infodir=DIR info documentation [DATAROOTDIR/info]
1437 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1438 --mandir=DIR man documentation [DATAROOTDIR/man]
1439 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1440 --htmldir=DIR html documentation [DOCDIR]
1441 --dvidir=DIR dvi documentation [DOCDIR]
1442 --pdfdir=DIR pdf documentation [DOCDIR]
1443 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001444_ACEOF
1445
1446 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001447
1448System types:
1449 --build=BUILD configure for building on BUILD [guessed]
1450 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
1452fi
1453
1454if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001455 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001456 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001457 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 cat <<\_ACEOF
1459
1460Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001461 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1463 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001464 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001465 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --enable-framework[=INSTALLDIR]
1467 Build (MacOSX|Darwin) framework
1468 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001469 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001470 --enable-loadable-sqlite-extensions
1471 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --enable-ipv6 Enable ipv6 (with ipv4) support
1473 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001474 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001476
1477Optional Packages:
1478 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1479 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001480 --with-universal-archs=ARCH
1481 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001482 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001483 --with-framework-name=FRAMEWORK
1484 specify an alternate name of the framework built
1485 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001487 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001488 --with-cxx-main=<compiler>
1489 compile main() and link python executable with C++
1490 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --with-suffix=.exe set executable suffix
1492 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001493 --with-lto Enable Link Time Optimization in PGO builds.
1494 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001495 --with-hash-algorithm=[fnv|siphash24]
1496 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001497 --with-address-sanitizer
1498 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001500 --with-system-expat build pyexpat module using an installed expat
1501 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001502 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001503 --with-system-libmpdec build _decimal module using an installed libmpdec
1504 library
Ned Deilyd819b932013-09-06 01:07:05 -07001505 --with-tcltk-includes='-I...'
1506 override search for Tcl and Tk include files
1507 --with-tcltk-libs='-L...'
1508 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001509 --with-dbmliborder=db1:db2:...
1510 order to check db backends for dbm. Valid value is a
1511 colon separated string with the backend names
1512 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with(out)-threads[=DIRECTORY]
1515 disable/enable thread support
1516 --with(out)-thread[=DIRECTORY]
1517 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001519 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001521 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001522 --with-fpectl enable SIGFPE catching
1523 --with-libm=STRING math library
1524 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001525 --with(out)-computed-gotos
1526 Use computed gotos in evaluation loop (enabled by
1527 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001528 --with(out)-ensurepip=[=upgrade]
1529 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001530
1531Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001532 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 CC C compiler command
1534 CFLAGS C compiler flags
1535 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1536 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001538 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001540 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001541 PKG_CONFIG path to pkg-config utility
1542 PKG_CONFIG_PATH
1543 directories to add to pkg-config's search path
1544 PKG_CONFIG_LIBDIR
1545 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547Use these variables to override the choices made by `configure' or to help
1548it to find libraries and programs with nonstandard names/locations.
1549
Georg Brandle2e15612009-05-20 18:25:10 +00001550Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001551_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001553fi
1554
1555if test "$ac_init_help" = "recursive"; then
1556 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 test -d "$ac_dir" ||
1559 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1560 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 ac_builddir=.
1562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563case "$ac_dir" in
1564.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1565*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 case $ac_top_builddir_sub in
1570 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1571 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1572 esac ;;
1573esac
1574ac_abs_top_builddir=$ac_pwd
1575ac_abs_builddir=$ac_pwd$ac_dir_suffix
1576# for backward compatibility:
1577ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001578
1579case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 ac_top_srcdir=$ac_top_builddir_sub
1583 ac_abs_top_srcdir=$ac_pwd ;;
1584 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 ac_top_srcdir=$srcdir
1587 ac_abs_top_srcdir=$srcdir ;;
1588 *) # Relative name.
1589 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1590 ac_top_srcdir=$ac_top_build_prefix$srcdir
1591 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001592esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 cd "$ac_dir" || { ac_status=$?; continue; }
1596 # Check for guested configure.
1597 if test -f "$ac_srcdir/configure.gnu"; then
1598 echo &&
1599 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1600 elif test -f "$ac_srcdir/configure"; then
1601 echo &&
1602 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001604 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 fi || ac_status=$?
1606 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 done
1608fi
1609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001611if $ac_init_version; then
1612 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001613python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001614generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001615
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001616Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617This configure script is free software; the Free Software Foundation
1618gives unlimited permission to copy, distribute and modify it.
1619_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001622
1623## ------------------------ ##
1624## Autoconf initialization. ##
1625## ------------------------ ##
1626
1627# ac_fn_c_try_compile LINENO
1628# --------------------------
1629# Try to compile conftest.$ac_ext, and return whether this succeeded.
1630ac_fn_c_try_compile ()
1631{
1632 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1633 rm -f conftest.$ac_objext
1634 if { { ac_try="$ac_compile"
1635case "(($ac_try" in
1636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1637 *) ac_try_echo=$ac_try;;
1638esac
1639eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1640$as_echo "$ac_try_echo"; } >&5
1641 (eval "$ac_compile") 2>conftest.err
1642 ac_status=$?
1643 if test -s conftest.err; then
1644 grep -v '^ *+' conftest.err >conftest.er1
1645 cat conftest.er1 >&5
1646 mv -f conftest.er1 conftest.err
1647 fi
1648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1649 test $ac_status = 0; } && {
1650 test -z "$ac_c_werror_flag" ||
1651 test ! -s conftest.err
1652 } && test -s conftest.$ac_objext; then :
1653 ac_retval=0
1654else
1655 $as_echo "$as_me: failed program was:" >&5
1656sed 's/^/| /' conftest.$ac_ext >&5
1657
1658 ac_retval=1
1659fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001660 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001661 as_fn_set_status $ac_retval
1662
1663} # ac_fn_c_try_compile
1664
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001665# ac_fn_c_try_cpp LINENO
1666# ----------------------
1667# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1668ac_fn_c_try_cpp ()
1669{
1670 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1671 if { { ac_try="$ac_cpp conftest.$ac_ext"
1672case "(($ac_try" in
1673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1674 *) ac_try_echo=$ac_try;;
1675esac
1676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1677$as_echo "$ac_try_echo"; } >&5
1678 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1679 ac_status=$?
1680 if test -s conftest.err; then
1681 grep -v '^ *+' conftest.err >conftest.er1
1682 cat conftest.er1 >&5
1683 mv -f conftest.er1 conftest.err
1684 fi
1685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1686 test $ac_status = 0; } > conftest.i && {
1687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1688 test ! -s conftest.err
1689 }; then :
1690 ac_retval=0
1691else
1692 $as_echo "$as_me: failed program was:" >&5
1693sed 's/^/| /' conftest.$ac_ext >&5
1694
1695 ac_retval=1
1696fi
1697 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1698 as_fn_set_status $ac_retval
1699
1700} # ac_fn_c_try_cpp
1701
Matthias Kloseb9621712010-04-24 17:59:49 +00001702# ac_fn_c_try_link LINENO
1703# -----------------------
1704# Try to link conftest.$ac_ext, and return whether this succeeded.
1705ac_fn_c_try_link ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1708 rm -f conftest.$ac_objext conftest$ac_exeext
1709 if { { ac_try="$ac_link"
1710case "(($ac_try" in
1711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1712 *) ac_try_echo=$ac_try;;
1713esac
1714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1715$as_echo "$ac_try_echo"; } >&5
1716 (eval "$ac_link") 2>conftest.err
1717 ac_status=$?
1718 if test -s conftest.err; then
1719 grep -v '^ *+' conftest.err >conftest.er1
1720 cat conftest.er1 >&5
1721 mv -f conftest.er1 conftest.err
1722 fi
1723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1724 test $ac_status = 0; } && {
1725 test -z "$ac_c_werror_flag" ||
1726 test ! -s conftest.err
1727 } && test -s conftest$ac_exeext && {
1728 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001729 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 }; then :
1731 ac_retval=0
1732else
1733 $as_echo "$as_me: failed program was:" >&5
1734sed 's/^/| /' conftest.$ac_ext >&5
1735
1736 ac_retval=1
1737fi
1738 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1739 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1740 # interfere with the next link command; also delete a directory that is
1741 # left behind by Apple's compiler. We do this before executing the actions.
1742 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 as_fn_set_status $ac_retval
1745
1746} # ac_fn_c_try_link
1747
Matthias Kloseb9621712010-04-24 17:59:49 +00001748# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1749# -------------------------------------------------------
1750# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1751# the include files in INCLUDES and setting the cache variable VAR
1752# accordingly.
1753ac_fn_c_check_header_mongrel ()
1754{
1755 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001756 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1758$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001759if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 $as_echo_n "(cached) " >&6
1761fi
1762eval ac_res=\$$3
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1764$as_echo "$ac_res" >&6; }
1765else
1766 # Is the header compilable?
1767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1768$as_echo_n "checking $2 usability... " >&6; }
1769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1770/* end confdefs.h. */
1771$4
1772#include <$2>
1773_ACEOF
1774if ac_fn_c_try_compile "$LINENO"; then :
1775 ac_header_compiler=yes
1776else
1777 ac_header_compiler=no
1778fi
1779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1781$as_echo "$ac_header_compiler" >&6; }
1782
1783# Is the header present?
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1785$as_echo_n "checking $2 presence... " >&6; }
1786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1787/* end confdefs.h. */
1788#include <$2>
1789_ACEOF
1790if ac_fn_c_try_cpp "$LINENO"; then :
1791 ac_header_preproc=yes
1792else
1793 ac_header_preproc=no
1794fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001795rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1797$as_echo "$ac_header_preproc" >&6; }
1798
1799# So? What about this header?
1800case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1801 yes:no: )
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1803$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1805$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1806 ;;
1807 no:yes:* )
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1809$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1811$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1813$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1815$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1817$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001818( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001819## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001820## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 ) | sed "s/^/$as_me: WARNING: /" >&2
1822 ;;
1823esac
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1825$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001826if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001827 $as_echo_n "(cached) " >&6
1828else
1829 eval "$3=\$ac_header_compiler"
1830fi
1831eval ac_res=\$$3
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1833$as_echo "$ac_res" >&6; }
1834fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001836
1837} # ac_fn_c_check_header_mongrel
1838
1839# ac_fn_c_try_run LINENO
1840# ----------------------
1841# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1842# that executables *can* be run.
1843ac_fn_c_try_run ()
1844{
1845 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1846 if { { ac_try="$ac_link"
1847case "(($ac_try" in
1848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1849 *) ac_try_echo=$ac_try;;
1850esac
1851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1852$as_echo "$ac_try_echo"; } >&5
1853 (eval "$ac_link") 2>&5
1854 ac_status=$?
1855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1856 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1857 { { case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_try") 2>&5
1864 ac_status=$?
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; }; }; then :
1867 ac_retval=0
1868else
1869 $as_echo "$as_me: program exited with status $ac_status" >&5
1870 $as_echo "$as_me: failed program was:" >&5
1871sed 's/^/| /' conftest.$ac_ext >&5
1872
1873 ac_retval=$ac_status
1874fi
1875 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 as_fn_set_status $ac_retval
1878
1879} # ac_fn_c_try_run
1880
1881# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1882# -------------------------------------------------------
1883# Tests whether HEADER exists and can be compiled using the include files in
1884# INCLUDES, setting the cache variable VAR accordingly.
1885ac_fn_c_check_header_compile ()
1886{
1887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1889$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001890if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001891 $as_echo_n "(cached) " >&6
1892else
1893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895$4
1896#include <$2>
1897_ACEOF
1898if ac_fn_c_try_compile "$LINENO"; then :
1899 eval "$3=yes"
1900else
1901 eval "$3=no"
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1904fi
1905eval ac_res=\$$3
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001909
1910} # ac_fn_c_check_header_compile
1911
Matthias Kloseb9621712010-04-24 17:59:49 +00001912# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1913# -------------------------------------------
1914# Tests whether TYPE exists after having included INCLUDES, setting cache
1915# variable VAR accordingly.
1916ac_fn_c_check_type ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001921if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001922 $as_echo_n "(cached) " >&6
1923else
1924 eval "$3=no"
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928int
1929main ()
1930{
1931if (sizeof ($2))
1932 return 0;
1933 ;
1934 return 0;
1935}
1936_ACEOF
1937if ac_fn_c_try_compile "$LINENO"; then :
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941int
1942main ()
1943{
1944if (sizeof (($2)))
1945 return 0;
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951
1952else
1953 eval "$3=yes"
1954fi
1955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1956fi
1957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1958fi
1959eval ac_res=\$$3
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1961$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001962 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001963
1964} # ac_fn_c_check_type
1965
1966# ac_fn_c_find_uintX_t LINENO BITS VAR
1967# ------------------------------------
1968# Finds an unsigned integer type with width BITS, setting cache variable VAR
1969# accordingly.
1970ac_fn_c_find_uintX_t ()
1971{
1972 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1974$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001975if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001976 $as_echo_n "(cached) " >&6
1977else
1978 eval "$3=no"
1979 # Order is important - never check a type that is potentially smaller
1980 # than half of the expected target width.
1981 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1982 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$ac_includes_default
1986int
1987main ()
1988{
1989static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001990test_array [0] = 0;
1991return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993 ;
1994 return 0;
1995}
1996_ACEOF
1997if ac_fn_c_try_compile "$LINENO"; then :
1998 case $ac_type in #(
1999 uint$2_t) :
2000 eval "$3=yes" ;; #(
2001 *) :
2002 eval "$3=\$ac_type" ;;
2003esac
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002006 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008else
2009 break
2010fi
2011 done
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018} # ac_fn_c_find_uintX_t
2019
2020# ac_fn_c_find_intX_t LINENO BITS VAR
2021# -----------------------------------
2022# Finds a signed integer type with width BITS, setting cache variable VAR
2023# accordingly.
2024ac_fn_c_find_intX_t ()
2025{
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2028$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002029if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002030 $as_echo_n "(cached) " >&6
2031else
2032 eval "$3=no"
2033 # Order is important - never check a type that is potentially smaller
2034 # than half of the expected target width.
2035 for ac_type in int$2_t 'int' 'long int' \
2036 'long long int' 'short int' 'signed char'; do
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h. */
2039$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002040 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002041int
2042main ()
2043{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002044static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002056 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002057int
2058main ()
2059{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002060static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002061 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070
2071else
2072 case $ac_type in #(
2073 int$2_t) :
2074 eval "$3=yes" ;; #(
2075 *) :
2076 eval "$3=\$ac_type" ;;
2077esac
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002082 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084else
2085 break
2086fi
2087 done
2088fi
2089eval ac_res=\$$3
2090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2091$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002092 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002093
2094} # ac_fn_c_find_intX_t
2095
2096# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2097# --------------------------------------------
2098# Tries to find the compile-time value of EXPR in a program that includes
2099# INCLUDES, setting VAR accordingly. Returns whether the value could be
2100# computed
2101ac_fn_c_compute_int ()
2102{
2103 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104 if test "$cross_compiling" = yes; then
2105 # Depending upon the size, compute the lo and hi bounds.
2106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002113test_array [0] = 0;
2114return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002115
2116 ;
2117 return 0;
2118}
2119_ACEOF
2120if ac_fn_c_try_compile "$LINENO"; then :
2121 ac_lo=0 ac_mid=0
2122 while :; do
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126int
2127main ()
2128{
2129static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002130test_array [0] = 0;
2131return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002132
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_compile "$LINENO"; then :
2138 ac_hi=$ac_mid; break
2139else
2140 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2141 if test $ac_lo -le $ac_mid; then
2142 ac_lo= ac_hi=
2143 break
2144 fi
2145 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148 done
2149else
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h. */
2152$4
2153int
2154main ()
2155{
2156static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002157test_array [0] = 0;
2158return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_compile "$LINENO"; then :
2165 ac_hi=-1 ac_mid=-1
2166 while :; do
2167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h. */
2169$4
2170int
2171main ()
2172{
2173static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002174test_array [0] = 0;
2175return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002176
2177 ;
2178 return 0;
2179}
2180_ACEOF
2181if ac_fn_c_try_compile "$LINENO"; then :
2182 ac_lo=$ac_mid; break
2183else
2184 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2185 if test $ac_mid -le $ac_hi; then
2186 ac_lo= ac_hi=
2187 break
2188 fi
2189 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192 done
2193else
2194 ac_lo= ac_hi=
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197fi
2198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2199# Binary search between lo and hi bounds.
2200while test "x$ac_lo" != "x$ac_hi"; do
2201 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$4
2205int
2206main ()
2207{
2208static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002209test_array [0] = 0;
2210return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_compile "$LINENO"; then :
2217 ac_hi=$ac_mid
2218else
2219 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2220fi
2221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222done
2223case $ac_lo in #((
2224?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2225'') ac_retval=1 ;;
2226esac
2227 else
2228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2229/* end confdefs.h. */
2230$4
2231static long int longval () { return $2; }
2232static unsigned long int ulongval () { return $2; }
2233#include <stdio.h>
2234#include <stdlib.h>
2235int
2236main ()
2237{
2238
2239 FILE *f = fopen ("conftest.val", "w");
2240 if (! f)
2241 return 1;
2242 if (($2) < 0)
2243 {
2244 long int i = longval ();
2245 if (i != ($2))
2246 return 1;
2247 fprintf (f, "%ld", i);
2248 }
2249 else
2250 {
2251 unsigned long int i = ulongval ();
2252 if (i != ($2))
2253 return 1;
2254 fprintf (f, "%lu", i);
2255 }
2256 /* Do not output a trailing newline, as this causes \r\n confusion
2257 on some platforms. */
2258 return ferror (f) || fclose (f) != 0;
2259
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_run "$LINENO"; then :
2265 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2266else
2267 ac_retval=1
2268fi
2269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2270 conftest.$ac_objext conftest.beam conftest.$ac_ext
2271rm -f conftest.val
2272
2273 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002275 as_fn_set_status $ac_retval
2276
2277} # ac_fn_c_compute_int
2278
2279# ac_fn_c_check_func LINENO FUNC VAR
2280# ----------------------------------
2281# Tests whether FUNC exists, setting the cache variable VAR accordingly
2282ac_fn_c_check_func ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2286$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002287if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2293 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2294#define $2 innocuous_$2
2295
2296/* System header to define __stub macros and hopefully few prototypes,
2297 which can conflict with char $2 (); below.
2298 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2299 <limits.h> exists even on freestanding compilers. */
2300
2301#ifdef __STDC__
2302# include <limits.h>
2303#else
2304# include <assert.h>
2305#endif
2306
2307#undef $2
2308
2309/* Override any GCC internal prototype to avoid an error.
2310 Use char because int might match the return type of a GCC
2311 builtin and then its argument prototype would still apply. */
2312#ifdef __cplusplus
2313extern "C"
2314#endif
2315char $2 ();
2316/* The GNU C library defines this for functions which it implements
2317 to always fail with ENOSYS. Some functions are actually named
2318 something starting with __ and the normal name is an alias. */
2319#if defined __stub_$2 || defined __stub___$2
2320choke me
2321#endif
2322
2323int
2324main ()
2325{
2326return $2 ();
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_link "$LINENO"; then :
2332 eval "$3=yes"
2333else
2334 eval "$3=no"
2335fi
2336rm -f core conftest.err conftest.$ac_objext \
2337 conftest$ac_exeext conftest.$ac_ext
2338fi
2339eval ac_res=\$$3
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2341$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002342 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002343
2344} # ac_fn_c_check_func
2345
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002346# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2347# ---------------------------------------------
2348# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2349# accordingly.
2350ac_fn_c_check_decl ()
2351{
2352 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353 as_decl_name=`echo $2|sed 's/ *(.*//'`
2354 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2356$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2357if eval \${$3+:} false; then :
2358 $as_echo_n "(cached) " >&6
2359else
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h. */
2362$4
2363int
2364main ()
2365{
2366#ifndef $as_decl_name
2367#ifdef __cplusplus
2368 (void) $as_decl_use;
2369#else
2370 (void) $as_decl_name;
2371#endif
2372#endif
2373
2374 ;
2375 return 0;
2376}
2377_ACEOF
2378if ac_fn_c_try_compile "$LINENO"; then :
2379 eval "$3=yes"
2380else
2381 eval "$3=no"
2382fi
2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384fi
2385eval ac_res=\$$3
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2387$as_echo "$ac_res" >&6; }
2388 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2389
2390} # ac_fn_c_check_decl
2391
Matthias Kloseb9621712010-04-24 17:59:49 +00002392# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2393# ----------------------------------------------------
2394# Tries to find if the field MEMBER exists in type AGGR, after including
2395# INCLUDES, setting cache variable VAR accordingly.
2396ac_fn_c_check_member ()
2397{
2398 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2400$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002401if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002402 $as_echo_n "(cached) " >&6
2403else
2404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2405/* end confdefs.h. */
2406$5
2407int
2408main ()
2409{
2410static $2 ac_aggr;
2411if (ac_aggr.$3)
2412return 0;
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417if ac_fn_c_try_compile "$LINENO"; then :
2418 eval "$4=yes"
2419else
2420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h. */
2422$5
2423int
2424main ()
2425{
2426static $2 ac_aggr;
2427if (sizeof ac_aggr.$3)
2428return 0;
2429 ;
2430 return 0;
2431}
2432_ACEOF
2433if ac_fn_c_try_compile "$LINENO"; then :
2434 eval "$4=yes"
2435else
2436 eval "$4=no"
2437fi
2438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439fi
2440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2441fi
2442eval ac_res=\$$4
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2444$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002445 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002446
2447} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002449This file contains any messages produced by compilers while
2450running configure, to aid debugging if configure makes a mistake.
2451
Yury Selivanov7aa53412015-05-30 10:57:56 -04002452It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002453generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455 $ $0 $@
2456
2457_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002459{
2460cat <<_ASUNAME
2461## --------- ##
2462## Platform. ##
2463## --------- ##
2464
2465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2466uname -m = `(uname -m) 2>/dev/null || echo unknown`
2467uname -r = `(uname -r) 2>/dev/null || echo unknown`
2468uname -s = `(uname -s) 2>/dev/null || echo unknown`
2469uname -v = `(uname -v) 2>/dev/null || echo unknown`
2470
2471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2472/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2473
2474/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2475/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002478/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2479/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2480/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2481
2482_ASUNAME
2483
2484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2485for as_dir in $PATH
2486do
2487 IFS=$as_save_IFS
2488 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 $as_echo "PATH: $as_dir"
2490 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002492
2493} >&5
2494
2495cat >&5 <<_ACEOF
2496
2497
2498## ----------- ##
2499## Core tests. ##
2500## ----------- ##
2501
2502_ACEOF
2503
2504
2505# Keep a trace of the command line.
2506# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002507# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002508# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002509# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002510ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002511ac_configure_args0=
2512ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002513ac_must_keep_next=false
2514for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002515do
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 for ac_arg
2517 do
2518 case $ac_arg in
2519 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2521 | -silent | --silent | --silen | --sile | --sil)
2522 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 esac
2526 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002531 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002533 case $ac_arg in
2534 *=* | --config-cache | -C | -disable-* | --disable-* \
2535 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2536 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2537 | -with-* | --with-* | -without-* | --without-* | --x)
2538 case "$ac_configure_args0 " in
2539 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2540 esac
2541 ;;
2542 -* ) ac_must_keep_next=true ;;
2543 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002544 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 ;;
2547 esac
2548 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
Matthias Kloseb9621712010-04-24 17:59:49 +00002550{ ac_configure_args0=; unset ac_configure_args0;}
2551{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
2553# When interrupted or exit'd, cleanup temporary files, and complete
2554# config.log. We remove comments because anyway the quotes in there
2555# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556# WARNING: Use '\'' to represent an apostrophe within the trap.
2557# 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 +00002558trap 'exit_status=$?
2559 # Save into config.log some information that might help in debugging.
2560 {
2561 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002562
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002564## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo
2567 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568(
2569 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2570 eval ac_val=\$$ac_var
2571 case $ac_val in #(
2572 *${as_nl}*)
2573 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2575$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 esac
2577 case $ac_var in #(
2578 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2580 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 esac ;;
2582 esac
2583 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2586 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588 "s/'\''/'\''\\\\'\'''\''/g;
2589 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2590 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002591 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002593 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac |
2595 sort
2596)
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002598
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002600## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002602 echo
2603 for ac_var in $ac_subst_vars
2604 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 eval ac_val=\$$ac_var
2606 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002610 done | sort
2611 echo
2612
2613 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002614 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002616## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002617 echo
2618 for ac_var in $ac_subst_files
2619 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 eval ac_val=\$$ac_var
2621 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002625 done | sort
2626 echo
2627 fi
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002630 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002631## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002632## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 echo
2636 fi
2637 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 $as_echo "$as_me: caught signal $ac_signal"
2639 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641 rm -f core *.core core.conftest.* &&
2642 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002645for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002647done
2648ac_signal=0
2649
2650# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002651rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002652
Matthias Kloseb9621712010-04-24 17:59:49 +00002653$as_echo "/* confdefs.h */" > confdefs.h
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655# Predefined preprocessor variables.
2656
2657cat >>confdefs.h <<_ACEOF
2658#define PACKAGE_NAME "$PACKAGE_NAME"
2659_ACEOF
2660
Martin v. Löwis11437992002-04-12 09:54:03 +00002661cat >>confdefs.h <<_ACEOF
2662#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2663_ACEOF
2664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_VERSION "$PACKAGE_VERSION"
2667_ACEOF
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_STRING "$PACKAGE_STRING"
2671_ACEOF
2672
Martin v. Löwis11437992002-04-12 09:54:03 +00002673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2675_ACEOF
2676
Matthias Kloseb9621712010-04-24 17:59:49 +00002677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_URL "$PACKAGE_URL"
2679_ACEOF
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
2682# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002683# Prefer an explicitly selected file to automatically selected ones.
2684ac_site_file1=NONE
2685ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002687 # We do not want a PATH search for config.site.
2688 case $CONFIG_SITE in #((
2689 -*) ac_site_file1=./$CONFIG_SITE;;
2690 */*) ac_site_file1=$CONFIG_SITE;;
2691 *) ac_site_file1=./$CONFIG_SITE;;
2692 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 ac_site_file1=$prefix/share/config.site
2695 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696else
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 ac_site_file1=$ac_default_prefix/share/config.site
2698 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002700for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701do
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 test "x$ac_site_file" = xNONE && continue
2703 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2705$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002707 . "$ac_site_file" \
2708 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2710as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002711See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712 fi
2713done
2714
2715if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 # Some versions of bash will fail to source /dev/null (special files
2717 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2718 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2720$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2723 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 esac
2725 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726else
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2728$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 >$cache_file
2730fi
2731
2732# Check that the precious variables saved in the cache have kept the same
2733# value.
2734ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2737 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2739 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 case $ac_old_set,$ac_new_set in
2741 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2743$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 +00002744 ac_cache_corrupted=: ;;
2745 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002746 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2747$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 ac_cache_corrupted=: ;;
2749 ,);;
2750 *)
2751 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002752 # differences in whitespace do not lead to failure.
2753 ac_old_val_w=`echo x $ac_old_val`
2754 ac_new_val_w=`echo x $ac_new_val`
2755 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2757$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2758 ac_cache_corrupted=:
2759 else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2761$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2762 eval $ac_var=\$ac_old_val
2763 fi
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2765$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2767$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 fi;;
2769 esac
2770 # Pass precious variables to config.status.
2771 if test "$ac_new_set" = set; then
2772 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002773 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 *) ac_arg=$ac_var=$ac_new_val ;;
2775 esac
2776 case " $ac_configure_args " in
2777 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002778 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 esac
2780 fi
2781done
2782if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002783 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2786$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002787 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002789## -------------------- ##
2790## Main body of script. ##
2791## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002792
Guido van Rossum7f43da71994-08-01 12:15:30 +00002793ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2797ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002798
Guido van Rossum627b2d71993-12-24 10:39:16 +00002799
Michael W. Hudson54241132001-12-07 15:38:26 +00002800
Trent Nelson4d4ec652012-10-16 08:51:24 -04002801
Trent Nelson5595ab52012-10-17 04:47:31 -04002802if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002803 # If we're building out-of-tree, we need to make sure the following
2804 # resources get picked up before their $srcdir counterparts.
2805 # Objects/ -> typeslots.inc
2806 # Include/ -> Python-ast.h, graminit.h
2807 # Python/ -> importlib.h
2808 # (A side effect of this is that these resources will automatically be
2809 # regenerated when building out-of-tree, regardless of whether or not
2810 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2811 # off.)
2812 BASECPPFLAGS="-IObjects -IInclude -IPython"
2813else
2814 BASECPPFLAGS=""
2815fi
2816
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002817
2818
2819
2820
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002821if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002822then
2823# Extract the first word of "hg", so it can be a program name with args.
2824set dummy hg; ac_word=$2
2825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2826$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002827if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002828 $as_echo_n "(cached) " >&6
2829else
2830 if test -n "$HAS_HG"; then
2831 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2832else
2833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2834for as_dir in $PATH
2835do
2836 IFS=$as_save_IFS
2837 test -z "$as_dir" && as_dir=.
2838 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002839 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002840 ac_cv_prog_HAS_HG="found"
2841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2842 break 2
2843 fi
2844done
2845 done
2846IFS=$as_save_IFS
2847
2848 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2849fi
2850fi
2851HAS_HG=$ac_cv_prog_HAS_HG
2852if test -n "$HAS_HG"; then
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2854$as_echo "$HAS_HG" >&6; }
2855else
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2857$as_echo "no" >&6; }
2858fi
2859
2860
2861else
2862HAS_HG=no-repository
2863fi
2864if test $HAS_HG = found
2865then
2866 HGVERSION="hg id -i \$(srcdir)"
2867 HGTAG="hg id -t \$(srcdir)"
2868 HGBRANCH="hg id -b \$(srcdir)"
2869else
2870 HGVERSION=""
2871 HGTAG=""
2872 HGBRANCH=""
2873fi
2874
2875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002876ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
2878
Victor Stinnerdddf4842016-06-07 11:21:42 +02002879
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002880ac_aux_dir=
2881for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2882 if test -f "$ac_dir/install-sh"; then
2883 ac_aux_dir=$ac_dir
2884 ac_install_sh="$ac_aux_dir/install-sh -c"
2885 break
2886 elif test -f "$ac_dir/install.sh"; then
2887 ac_aux_dir=$ac_dir
2888 ac_install_sh="$ac_aux_dir/install.sh -c"
2889 break
2890 elif test -f "$ac_dir/shtool"; then
2891 ac_aux_dir=$ac_dir
2892 ac_install_sh="$ac_aux_dir/shtool install -c"
2893 break
2894 fi
2895done
2896if test -z "$ac_aux_dir"; then
2897 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2898fi
2899
2900# These three variables are undocumented and unsupported,
2901# and are intended to be withdrawn in a future Autoconf release.
2902# They can cause serious problems if a builder's source tree is in a directory
2903# whose full name contains unusual characters.
2904ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2905ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2906ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2907
2908
2909# Make sure we can run config.sub.
2910$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2911 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2912
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2914$as_echo_n "checking build system type... " >&6; }
2915if ${ac_cv_build+:} false; then :
2916 $as_echo_n "(cached) " >&6
2917else
2918 ac_build_alias=$build_alias
2919test "x$ac_build_alias" = x &&
2920 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2921test "x$ac_build_alias" = x &&
2922 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2923ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2924 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2925
2926fi
2927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2928$as_echo "$ac_cv_build" >&6; }
2929case $ac_cv_build in
2930*-*-*) ;;
2931*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2932esac
2933build=$ac_cv_build
2934ac_save_IFS=$IFS; IFS='-'
2935set x $ac_cv_build
2936shift
2937build_cpu=$1
2938build_vendor=$2
2939shift; shift
2940# Remember, the first character of IFS is used to create $*,
2941# except with old shells:
2942build_os=$*
2943IFS=$ac_save_IFS
2944case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2945
2946
2947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2948$as_echo_n "checking host system type... " >&6; }
2949if ${ac_cv_host+:} false; then :
2950 $as_echo_n "(cached) " >&6
2951else
2952 if test "x$host_alias" = x; then
2953 ac_cv_host=$ac_cv_build
2954else
2955 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2956 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2957fi
2958
2959fi
2960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2961$as_echo "$ac_cv_host" >&6; }
2962case $ac_cv_host in
2963*-*-*) ;;
2964*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2965esac
2966host=$ac_cv_host
2967ac_save_IFS=$IFS; IFS='-'
2968set x $ac_cv_host
2969shift
2970host_cpu=$1
2971host_vendor=$2
2972shift; shift
2973# Remember, the first character of IFS is used to create $*,
2974# except with old shells:
2975host_os=$*
2976IFS=$ac_save_IFS
2977case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2978
2979
2980
doko@python.orga10e4a92013-01-25 18:45:12 +01002981
2982
Ned Deilyfcbc2462014-08-22 13:32:49 -07002983# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2984rm -f pybuilddir.txt
2985
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002986if test "$cross_compiling" = yes; then
2987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2988$as_echo_n "checking for python interpreter for cross build... " >&6; }
2989 if test -z "$PYTHON_FOR_BUILD"; then
2990 for interp in python$PACKAGE_VERSION python3 python; do
2991 which $interp >/dev/null 2>&1 || continue
2992 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2993 break
2994 fi
2995 interp=
2996 done
2997 if test x$interp = x; then
2998 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2999 fi
3000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3001$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003002 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 +02003003 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003004elif test "$cross_compiling" = maybe; then
3005 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003006else
3007 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3008fi
3009
3010
Martin v. Löwis11437992002-04-12 09:54:03 +00003011
Benjamin Petersond23f8222009-04-05 19:13:16 +00003012if test "$prefix" != "/"; then
3013 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3014fi
3015
3016
Martin v. Löwis11437992002-04-12 09:54:03 +00003017
3018
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003019# We don't use PACKAGE_ variables, and they cause conflicts
3020# with other autoconf-based packages that include Python.h
3021grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3022rm confdefs.h
3023mv confdefs.h.new confdefs.h
3024
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003025
Yury Selivanov7aa53412015-05-30 10:57:56 -04003026VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003027
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003028# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003029
3030SOVERSION=1.0
3031
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003032# The later defininition of _XOPEN_SOURCE disables certain features
3033# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003036
3037
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003038# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3039# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3040# them.
3041
Matthias Kloseb9621712010-04-24 17:59:49 +00003042$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003043
3044
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003045# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3046# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3047# them.
3048
Matthias Kloseb9621712010-04-24 17:59:49 +00003049$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003050
3051
Martin v. Löwisd6320502004-08-12 13:45:08 +00003052# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3053# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3054
Matthias Kloseb9621712010-04-24 17:59:49 +00003055$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003056
3057
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003058# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3059# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3060# them.
3061
Matthias Kloseb9621712010-04-24 17:59:49 +00003062$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063
3064
3065
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003066define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003067
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003068# Arguments passed to configure.
3069
3070CONFIG_ARGS="$ac_configure_args"
3071
Matthias Kloseb9621712010-04-24 17:59:49 +00003072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3073$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003075if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077 case $enableval in
3078 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003079 # Locate the best usable SDK, see Mac/README.txt for more
3080 # information
3081 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003082 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003083 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003084 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3085 if test ! -d "${enableval}"
3086 then
3087 enableval=/
3088 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003089 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003090 ;;
3091 esac
3092 case $enableval in
3093 no)
3094 UNIVERSALSDK=
3095 enable_universalsdk=
3096 ;;
3097 *)
3098 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003099 if test ! -d "${UNIVERSALSDK}"
3100 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003101 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103 ;;
3104 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003105
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003106
Thomas Wouters477c8d52006-05-27 19:21:47 +00003107else
3108
3109 UNIVERSALSDK=
3110 enable_universalsdk=
3111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003113
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003114if test -n "${UNIVERSALSDK}"
3115then
Matthias Kloseb9621712010-04-24 17:59:49 +00003116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3117$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003118else
Matthias Kloseb9621712010-04-24 17:59:49 +00003119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3120$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003121fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003124
Ned Deily87adb6e2013-10-18 21:09:56 -07003125ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003126
Ned Deilycbfb9a52012-06-23 16:02:19 -07003127# For backward compatibility reasons we prefer to select '32-bit' if available,
3128# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003129UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003130if test "`uname -s`" = "Darwin"
3131then
3132 if test -n "${UNIVERSALSDK}"
3133 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003134 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003135 then
3136 UNIVERSAL_ARCHS="intel"
3137 fi
3138 fi
3139fi
3140
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003141
Matthias Kloseb9621712010-04-24 17:59:49 +00003142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3143$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
3145# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003146if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003147 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003148 UNIVERSAL_ARCHS="$withval"
3149
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150fi
3151
Ned Deily87adb6e2013-10-18 21:09:56 -07003152if test -n "${UNIVERSALSDK}"
3153then
3154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3155$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3156else
3157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3158$as_echo "no" >&6; }
3159fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003160
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003161
3162# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003163if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003164 withval=$with_framework_name;
3165 PYTHONFRAMEWORK=${withval}
3166 PYTHONFRAMEWORKDIR=${withval}.framework
3167 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3168
3169else
3170
3171 PYTHONFRAMEWORK=Python
3172 PYTHONFRAMEWORKDIR=Python.framework
3173 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3174
3175fi
3176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003178if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003180 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003181 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003182 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003183 esac
3184 case $enableval in
3185 no)
3186 PYTHONFRAMEWORK=
3187 PYTHONFRAMEWORKDIR=no-framework
3188 PYTHONFRAMEWORKPREFIX=
3189 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190 FRAMEWORKINSTALLFIRST=
3191 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003192 FRAMEWORKALTINSTALLFIRST=
3193 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003194 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003195 if test "x${prefix}" = "xNONE"; then
3196 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3197 else
3198 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3199 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003200 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003201 ;;
3202 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003203 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003204 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003206 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003207 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3208 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003209 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003210 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003212 if test "x${prefix}" = "xNONE" ; then
3213 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003214
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215 else
3216 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3217 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003218
3219 case "${enableval}" in
3220 /System*)
3221 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3222 if test "${prefix}" = "NONE" ; then
3223 # See below
3224 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3225 fi
3226 ;;
3227
3228 /Library*)
3229 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3230 ;;
3231
3232 */Library/Frameworks)
3233 MDIR="`dirname "${enableval}"`"
3234 MDIR="`dirname "${MDIR}"`"
3235 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3236
3237 if test "${prefix}" = "NONE"; then
3238 # User hasn't specified the
3239 # --prefix option, but wants to install
3240 # the framework in a non-default location,
3241 # ensure that the compatibility links get
3242 # installed relative to that prefix as well
3243 # instead of in /usr/local.
3244 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3245 fi
3246 ;;
3247
3248 *)
3249 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3250 ;;
3251 esac
3252
Jack Jansen127e56e2001-09-11 14:41:54 +00003253 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003255 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003256 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003260
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003261 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3262
3263 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3264
Jack Jansene578a632001-08-15 01:27:14 +00003265 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003266
Guido van Rossum563e7081996-09-10 18:20:48 +00003267else
Martin v. Löwis11437992002-04-12 09:54:03 +00003268
Jack Jansene578a632001-08-15 01:27:14 +00003269 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003270 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003271 PYTHONFRAMEWORKPREFIX=
3272 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003273 FRAMEWORKINSTALLFIRST=
3274 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003275 FRAMEWORKALTINSTALLFIRST=
3276 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003277 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003278 if test "x${prefix}" = "xNONE" ; then
3279 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3280 else
3281 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3282 fi
Jack Jansene578a632001-08-15 01:27:14 +00003283 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286fi
3287
Thomas Wouters477c8d52006-05-27 19:21:47 +00003288
3289
Michael W. Hudson54241132001-12-07 15:38:26 +00003290
3291
3292
3293
Jack Jansene578a632001-08-15 01:27:14 +00003294
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003295
3296
3297
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003298
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003299
Ned Deilyb8f944f2013-11-21 22:42:25 -08003300
Jack Jansene578a632001-08-15 01:27:14 +00003301##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003302## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003303## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003304##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305# Set name for machine-dependent library files
3306
Matthias Kloseb9621712010-04-24 17:59:49 +00003307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3308$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003309if test -z "$MACHDEP"
3310then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003311 # avoid using uname for cross builds
3312 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003313 # ac_sys_system and ac_sys_release are used for setting
3314 # a lot of different things including 'define_xopen_source'
3315 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003316 case "$host" in
3317 *-*-linux*)
3318 ac_sys_system=Linux
3319 ;;
3320 *-*-cygwin*)
3321 ac_sys_system=Cygwin
3322 ;;
3323 *)
3324 # for now, limit cross builds to known configurations
3325 MACHDEP="unknown"
3326 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3327 esac
3328 ac_sys_release=
3329 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003330 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003331 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003332 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003333 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003334 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003335 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003336 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003337 fi
3338 ac_md_system=`echo $ac_sys_system |
3339 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3340 ac_md_release=`echo $ac_sys_release |
3341 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3342 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003343
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003344 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003345 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003346 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003347 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003348 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003349 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003350 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003351fi
Guido van Rossum91922671997-10-09 20:24:13 +00003352
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003353
3354if test "$cross_compiling" = yes; then
3355 case "$host" in
3356 *-*-linux*)
3357 case "$host_cpu" in
3358 arm*)
3359 _host_cpu=arm
3360 ;;
3361 *)
3362 _host_cpu=$host_cpu
3363 esac
3364 ;;
3365 *-*-cygwin*)
3366 _host_cpu=
3367 ;;
3368 *)
3369 # for now, limit cross builds to known configurations
3370 MACHDEP="unknown"
3371 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3372 esac
3373 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3374fi
3375
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003376# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3377# disable features if it is defined, without any means to access these
3378# features as extensions. For these systems, we skip the definition of
3379# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3380# some feature, make sure there is no alternative way to access this
3381# feature. Also, when using wildcards, make sure you have verified the
3382# need for not defining _XOPEN_SOURCE on all systems matching the
3383# wildcard, and that the wildcard does not include future systems
3384# (which may remove their limitations).
3385case $ac_sys_system/$ac_sys_release in
3386 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3387 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003388 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003389 # In addition, Stefan Krah confirms that issue #1244610 exists through
3390 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003391 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003392 define_xopen_source=no
3393 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3394 # also defined. This can be overridden by defining _BSD_SOURCE
3395 # As this has a different meaning on Linux, only define it on OpenBSD
3396
Matthias Kloseb9621712010-04-24 17:59:49 +00003397$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003398
3399 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003400 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003401 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3402 # also defined. This can be overridden by defining _BSD_SOURCE
3403 # As this has a different meaning on Linux, only define it on OpenBSD
3404
Matthias Kloseb9621712010-04-24 17:59:49 +00003405$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003406
3407 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003408 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3409 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3410 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003411 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 +00003412 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003413 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3414 # request to enable features supported by the standard as a request
3415 # to disable features not supported by the standard. The best way
3416 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3417 # entirely and define __EXTENSIONS__ instead.
3418 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003419 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003420 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3421 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003422 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003423 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003424 define_xopen_source=no;;
3425 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003426 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003427 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003428 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003429 # On FreeBSD 4, the math functions C89 does not cover are never defined
3430 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3431 FreeBSD/4.*)
3432 define_xopen_source=no;;
3433 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3434 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3435 # identifies itself as Darwin/7.*
3436 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3437 # disables platform specific features beyond repair.
3438 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3439 # has no effect, don't bother defining them
3440 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003441 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003442 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003443 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003444 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3445 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3446 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003447 AIX/4)
3448 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003449 AIX/5)
3450 if test `uname -r` -eq 1; then
3451 define_xopen_source=no
3452 fi
3453 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003454 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3455 # defining NI_NUMERICHOST.
3456 QNX/6.3.2)
3457 define_xopen_source=no
3458 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003459
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003460esac
3461
3462if test $define_xopen_source = yes
3463then
Victor Stinner14d098d2011-09-07 22:29:43 +02003464 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Victor Stinner14d098d2011-09-07 22:29:43 +02003466$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003467
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003468
3469 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3470 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3471 # several APIs are not declared. Since this is also needed in some
3472 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003475
3476
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003477
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003478$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003479
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003480fi
3481
Christian Heimes647cd872013-12-07 23:39:33 +01003482# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3483case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003484 hp*|HP*)
3485 define_stdc_a1=yes;;
3486 *)
3487 define_stdc_a1=no;;
3488esac
3489
3490if test $define_stdc_a1 = yes
3491then
Christian Heimes647cd872013-12-07 23:39:33 +01003492
3493$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3494
Christian Heimesb02bcae2013-12-08 15:21:08 +01003495fi
Christian Heimes647cd872013-12-07 23:39:33 +01003496
Guido van Rossum91922671997-10-09 20:24:13 +00003497#
3498# SGI compilers allow the specification of the both the ABI and the
3499# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003500# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003501#
3502# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3503# thus supply support for various ABI/ISA combinations. The MACHDEP
3504# variable is also adjusted.
3505#
3506
3507if test ! -z "$SGI_ABI"
3508then
3509 CC="cc $SGI_ABI"
3510 LDFLAGS="$SGI_ABI $LDFLAGS"
3511 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3514$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003515
Jack Jansen6b08a402004-06-03 12:41:45 +00003516# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3517# it may influence the way we can build extensions, so distutils
3518# needs to check it
3519
Thomas Wouters477c8d52006-05-27 19:21:47 +00003520
Jack Jansen6b08a402004-06-03 12:41:45 +00003521CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003522EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003523
Guido van Rossum627b2d71993-12-24 10:39:16 +00003524# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003525
3526# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3527# for debug/optimization stuff. BASECFLAGS is for flags that are required
3528# just to get things to compile and link. Users are free to override OPT
3529# when running configure or make. The build should not break if they do.
3530# BASECFLAGS should generally not be messed with, however.
3531
3532# XXX shouldn't some/most/all of this code be merged with the stuff later
3533# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3535$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003538if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003540 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003541 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003542 without_gcc=yes;;
3543 yes) CC=gcc
3544 without_gcc=no;;
3545 *) CC=$withval
3546 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003547 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003548else
Martin v. Löwis11437992002-04-12 09:54:03 +00003549
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003550 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003551 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003552 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003553 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003554 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555fi
3556
Matthias Kloseb9621712010-04-24 17:59:49 +00003557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3558$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003559
Zachary Ware5af85642015-12-21 12:09:17 -06003560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3561$as_echo_n "checking for --with-icc... " >&6; }
3562
3563# Check whether --with-icc was given.
3564if test "${with_icc+set}" = set; then :
3565 withval=$with_icc;
3566 case $withval in
3567 no) CC=${CC:-cc}
3568 with_icc=no;;
3569 yes) CC=icc
3570 CXX=icpc
3571 with_icc=yes;;
3572 *) CC=$withval
3573 with_icc=$withval;;
3574 esac
3575else
3576
3577 with_icc=no
3578fi
3579
3580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3581$as_echo "$with_icc" >&6; }
3582
Guido van Rossum8b131c51995-03-09 14:10:13 +00003583# If the user switches compilers, we can't believe the cache
3584if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3585then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003586 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003587(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003588fi
3589
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003590# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3591# when the compiler supports them, but we don't always want -O2, and
3592# we set -g later.
3593if test -z "$CFLAGS"; then
3594 CFLAGS=
3595fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003596
3597if test "$ac_sys_system" = "Darwin"
3598then
3599 # Compiler selection on MacOSX is more complicated than
3600 # AC_PROG_CC can handle, see Mac/README.txt for more
3601 # information
3602 if test -z "${CC}"
3603 then
3604 found_gcc=
3605 found_clang=
3606 as_save_IFS=$IFS; IFS=:
3607 for as_dir in $PATH
3608 do
3609 IFS=$as_save_IFS
3610 if test -x $as_dir/gcc; then
3611 if test -z "${found_gcc}"; then
3612 found_gcc=$as_dir/gcc
3613 fi
3614 fi
3615 if test -x $as_dir/clang; then
3616 if test -z "${found_clang}"; then
3617 found_clang=$as_dir/clang
3618 fi
3619 fi
3620 done
3621 IFS=$as_save_IFS
3622
3623 if test -n "$found_gcc" -a -n "$found_clang"
3624 then
3625 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3626 then
3627 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3628$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3629 CC="$found_clang"
3630 CXX="$found_clang++"
3631 fi
3632
3633
3634 elif test -z "$found_gcc" -a -n "$found_clang"
3635 then
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3637$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3638 CC="$found_clang"
3639 CXX="$found_clang++"
3640
3641 elif test -z "$found_gcc" -a -z "$found_clang"
3642 then
3643 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3644 if test -n "${found_clang}"
3645 then
3646 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3647$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3648 CC="${found_clang}"
3649 CXX="`/usr/bin/xcrun -find clang++`"
3650
3651 # else: use default behaviour
3652 fi
3653 fi
3654 fi
3655fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003656ac_ext=c
3657ac_cpp='$CPP $CPPFLAGS'
3658ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3659ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3660ac_compiler_gnu=$ac_cv_c_compiler_gnu
3661if test -n "$ac_tool_prefix"; then
3662 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3663set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3665$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003666if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003668else
3669 if test -n "$CC"; then
3670 ac_cv_prog_CC="$CC" # Let the user override the test.
3671else
Martin v. Löwis11437992002-04-12 09:54:03 +00003672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3673for as_dir in $PATH
3674do
3675 IFS=$as_save_IFS
3676 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 $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 +00003681 break 2
3682 fi
3683done
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003686
Jack Jansendd19cf82001-12-06 22:36:17 +00003687fi
3688fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003689CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003690if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3692$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003693else
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3695$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003696fi
3697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698
Martin v. Löwis11437992002-04-12 09:54:03 +00003699fi
3700if test -z "$ac_cv_prog_CC"; then
3701 ac_ct_CC=$CC
3702 # Extract the first word of "gcc", so it can be a program name with args.
3703set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003706if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003708else
3709 if test -n "$ac_ct_CC"; then
3710 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3711else
3712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $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 +00003721 break 2
3722 fi
3723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729ac_ct_CC=$ac_cv_prog_ac_ct_CC
3730if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3732$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738 if test "x$ac_ct_CC" = x; then
3739 CC=""
3740 else
3741 case $cross_compiling:$ac_tool_warned in
3742yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745ac_tool_warned=yes ;;
3746esac
3747 CC=$ac_ct_CC
3748 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003749else
3750 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003751fi
3752
Jack Jansendd19cf82001-12-06 22:36:17 +00003753if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754 if test -n "$ac_tool_prefix"; then
3755 # 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 +00003756set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3758$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003759if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003761else
3762 if test -n "$CC"; then
3763 ac_cv_prog_CC="$CC" # Let the user override the test.
3764else
Martin v. Löwis11437992002-04-12 09:54:03 +00003765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3766for as_dir in $PATH
3767do
3768 IFS=$as_save_IFS
3769 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $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 +00003774 break 2
3775 fi
3776done
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003779
3780fi
3781fi
3782CC=$ac_cv_prog_CC
3783if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3785$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003786else
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003789fi
3790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793fi
3794if test -z "$CC"; then
3795 # Extract the first word of "cc", so it can be a program name with args.
3796set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3798$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003799if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
3802 if test -n "$CC"; then
3803 ac_cv_prog_CC="$CC" # Let the user override the test.
3804else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003805 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3807for as_dir in $PATH
3808do
3809 IFS=$as_save_IFS
3810 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3814 ac_prog_rejected=yes
3815 continue
3816 fi
3817 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 $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 +00003819 break 2
3820 fi
3821done
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003824
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003825if test $ac_prog_rejected = yes; then
3826 # We found a bogon in the path, so make sure we never use it.
3827 set dummy $ac_cv_prog_CC
3828 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003830 # We chose a different compiler from the bogus one.
3831 # However, it has the same basename, so the bogon will be chosen
3832 # first if we set CC to just the basename; use the full file name.
3833 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003834 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003835 fi
3836fi
3837fi
3838fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003839CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003840if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3842$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003843else
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3845$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003846fi
3847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850if test -z "$CC"; then
3851 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 do
3854 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3855set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3857$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003858if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003860else
3861 if test -n "$CC"; then
3862 ac_cv_prog_CC="$CC" # Let the user override the test.
3863else
Martin v. Löwis11437992002-04-12 09:54:03 +00003864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3865for as_dir in $PATH
3866do
3867 IFS=$as_save_IFS
3868 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003870 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 $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 +00003873 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003874 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003875done
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003878
3879fi
3880fi
3881CC=$ac_cv_prog_CC
3882if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3884$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003885else
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3887$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003888fi
3889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890
Martin v. Löwis11437992002-04-12 09:54:03 +00003891 test -n "$CC" && break
3892 done
3893fi
3894if test -z "$CC"; then
3895 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003897do
3898 # Extract the first word of "$ac_prog", so it can be a program name with args.
3899set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3901$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003902if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003904else
3905 if test -n "$ac_ct_CC"; then
3906 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3907else
3908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3909for as_dir in $PATH
3910do
3911 IFS=$as_save_IFS
3912 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003913 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 $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 +00003917 break 2
3918 fi
3919done
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003922
Martin v. Löwis11437992002-04-12 09:54:03 +00003923fi
3924fi
3925ac_ct_CC=$ac_cv_prog_ac_ct_CC
3926if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3928$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003929else
Matthias Kloseb9621712010-04-24 17:59:49 +00003930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3931$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003932fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 test -n "$ac_ct_CC" && break
3936done
Michael W. Hudson54241132001-12-07 15:38:26 +00003937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 if test "x$ac_ct_CC" = x; then
3939 CC=""
3940 else
3941 case $cross_compiling:$ac_tool_warned in
3942yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3944$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945ac_tool_warned=yes ;;
3946esac
3947 CC=$ac_ct_CC
3948 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003949fi
3950
3951fi
3952
3953
Matthias Kloseb9621712010-04-24 17:59:49 +00003954test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3955$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003956as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003957See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003958
3959# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003960$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3961set X $ac_compile
3962ac_compiler=$2
3963for ac_option in --version -v -V -qversion; do
3964 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
3971 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 if test -s conftest.err; then
3974 sed '10a\
3975... rest of stderr output deleted ...
3976 10q' conftest.err >conftest.er1
3977 cat conftest.er1 >&5
3978 fi
3979 rm -f conftest.er1 conftest.err
3980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3981 test $ac_status = 0; }
3982done
Martin v. Löwis11437992002-04-12 09:54:03 +00003983
Matthias Kloseb9621712010-04-24 17:59:49 +00003984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003985/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003986
Martin v. Löwis11437992002-04-12 09:54:03 +00003987int
3988main ()
3989{
3990
3991 ;
3992 return 0;
3993}
3994_ACEOF
3995ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003996ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003997# Try to create an executable without -o first, disregard a.out.
3998# It will help us diagnose broken compilers, and finding out an intuition
3999# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4001$as_echo_n "checking whether the C compiler works... " >&6; }
4002ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4003
4004# The possible output files:
4005ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004007ac_rmfiles=
4008for ac_file in $ac_files
4009do
4010 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4013 esac
4014done
4015rm -f $ac_rmfiles
4016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018case "(($ac_try" in
4019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4020 *) ac_try_echo=$ac_try;;
4021esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4023$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4027 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4029# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4030# in a Makefile. We should not override ac_cv_exeext if it was cached,
4031# so that the user can short-circuit this test for compilers unknown to
4032# Autoconf.
4033for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004034do
4035 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004036 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038 ;;
4039 [ab].out )
4040 # We found the default executable, but exeext='' is most
4041 # certainly right.
4042 break;;
4043 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004045 then :; else
4046 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4047 fi
4048 # We set ac_cv_exeext here because the later test for it is not
4049 # safe: cross compilers may not add the suffix if given an `-o'
4050 # argument, so we may need to know it at that point already.
4051 # Even if this section looks crufty: it has the advantage of
4052 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 break;;
4054 * )
4055 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 esac
4057done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004058test "$ac_cv_exeext" = no && ac_cv_exeext=
4059
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004060else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061 ac_file=''
4062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004063if test -z "$ac_file"; then :
4064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4065$as_echo "no" >&6; }
4066$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004067sed 's/^/| /' conftest.$ac_ext >&5
4068
Matthias Kloseb9621712010-04-24 17:59:49 +00004069{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004071as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004072See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004073else
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4075$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4078$as_echo_n "checking for C compiler default output file name... " >&6; }
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4080$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004081ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004082
Matthias Kloseb9621712010-04-24 17:59:49 +00004083rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004084ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4086$as_echo_n "checking for suffix of executables... " >&6; }
4087if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088case "(($ac_try" in
4089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4090 *) ac_try_echo=$ac_try;;
4091esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4093$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004095 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4097 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004098 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4099# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4100# work properly (i.e., refer to `conftest.exe'), while it won't with
4101# `rm'.
4102for ac_file in conftest.exe conftest conftest.*; do
4103 test -f "$ac_file" || continue
4104 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004106 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4107 break;;
4108 * ) break;;
4109 esac
4110done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004111else
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4113$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004114as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004115See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004117rm -f conftest conftest$ac_cv_exeext
4118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4119$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004120
4121rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004122EXEEXT=$ac_cv_exeext
4123ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4125/* end confdefs.h. */
4126#include <stdio.h>
4127int
4128main ()
4129{
4130FILE *f = fopen ("conftest.out", "w");
4131 return ferror (f) || fclose (f) != 0;
4132
4133 ;
4134 return 0;
4135}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004137ac_clean_files="$ac_clean_files conftest.out"
4138# Check that the compiler produces executables we can run. If not, either
4139# the compiler is broken, or we cross compile.
4140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4141$as_echo_n "checking whether we are cross compiling... " >&6; }
4142if test "$cross_compiling" != yes; then
4143 { { ac_try="$ac_link"
4144case "(($ac_try" in
4145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4146 *) ac_try_echo=$ac_try;;
4147esac
4148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4149$as_echo "$ac_try_echo"; } >&5
4150 (eval "$ac_link") 2>&5
4151 ac_status=$?
4152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4153 test $ac_status = 0; }
4154 if { ac_try='./conftest$ac_cv_exeext'
4155 { { case "(($ac_try" in
4156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4157 *) ac_try_echo=$ac_try;;
4158esac
4159eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4160$as_echo "$ac_try_echo"; } >&5
4161 (eval "$ac_try") 2>&5
4162 ac_status=$?
4163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4164 test $ac_status = 0; }; }; then
4165 cross_compiling=no
4166 else
4167 if test "$cross_compiling" = maybe; then
4168 cross_compiling=yes
4169 else
4170 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004172as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004173If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004174See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 fi
4176 fi
4177fi
4178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4179$as_echo "$cross_compiling" >&6; }
4180
4181rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4182ac_clean_files=$ac_clean_files_save
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4184$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004185if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 $as_echo_n "(cached) " >&6
4187else
4188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004189/* end confdefs.h. */
4190
4191int
4192main ()
4193{
4194
4195 ;
4196 return 0;
4197}
4198_ACEOF
4199rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201case "(($ac_try" in
4202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4203 *) ac_try_echo=$ac_try;;
4204esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4206$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4210 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004211 for ac_file in conftest.o conftest.obj conftest.*; do
4212 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004213 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4216 break;;
4217 esac
4218done
4219else
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004221sed 's/^/| /' conftest.$ac_ext >&5
4222
Matthias Kloseb9621712010-04-24 17:59:49 +00004223{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4224$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004225as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004226See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004227fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004228rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4231$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004232OBJEXT=$ac_cv_objext
4233ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4235$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004236if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004238else
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004241
Martin v. Löwis11437992002-04-12 09:54:03 +00004242int
4243main ()
4244{
4245#ifndef __GNUC__
4246 choke me
4247#endif
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 ac_compiler_gnu=yes
4255else
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004259ac_cv_c_compiler_gnu=$ac_compiler_gnu
4260
4261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4263$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4264if test $ac_compiler_gnu = yes; then
4265 GCC=yes
4266else
4267 GCC=
4268fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004269ac_test_CFLAGS=${CFLAGS+set}
4270ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4272$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004273if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004275else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 ac_save_c_werror_flag=$ac_c_werror_flag
4277 ac_c_werror_flag=yes
4278 ac_cv_prog_cc_g=no
4279 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004282
Martin v. Löwis11437992002-04-12 09:54:03 +00004283int
4284main ()
4285{
4286
4287 ;
4288 return 0;
4289}
4290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004291if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004292 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293else
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 CFLAGS=""
4295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296/* end confdefs.h. */
4297
4298int
4299main ()
4300{
4301
4302 ;
4303 return 0;
4304}
4305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004306if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307
Matthias Kloseb9621712010-04-24 17:59:49 +00004308else
4309 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312/* end confdefs.h. */
4313
4314int
4315main ()
4316{
4317
4318 ;
4319 return 0;
4320}
4321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004322if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4330 ac_c_werror_flag=$ac_save_c_werror_flag
4331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4333$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004334if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004336elif test $ac_cv_prog_cc_g = yes; then
4337 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004338 CFLAGS="-g -O2"
4339 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004340 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004341 fi
4342else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004343 if test "$GCC" = yes; then
4344 CFLAGS="-O2"
4345 else
4346 CFLAGS=
4347 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4350$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004351if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004353else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004355ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004357/* end confdefs.h. */
4358#include <stdarg.h>
4359#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004360struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004361/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4362struct buf { int x; };
4363FILE * (*rcsopen) (struct buf *, struct stat *, int);
4364static char *e (p, i)
4365 char **p;
4366 int i;
4367{
4368 return p[i];
4369}
4370static char *f (char * (*g) (char **, int), char **p, ...)
4371{
4372 char *s;
4373 va_list v;
4374 va_start (v,p);
4375 s = g (p, va_arg (v,int));
4376 va_end (v);
4377 return s;
4378}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004379
4380/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4381 function prototypes and stuff, but not '\xHH' hex character constants.
4382 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004384 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4385 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004387int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4390 inside strings and character constants. */
4391#define FOO(x) 'x'
4392int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4393
Skip Montanaro6dead952003-09-25 14:50:04 +00004394int test (int i, double x);
4395struct s1 {int (*f) (int a);};
4396struct s2 {int (*f) (double a);};
4397int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4398int argc;
4399char **argv;
4400int
4401main ()
4402{
4403return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4404 ;
4405 return 0;
4406}
4407_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4409 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004410do
4411 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004413 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004415rm -f core conftest.err conftest.$ac_objext
4416 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004417done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004419CC=$ac_save_CC
4420
4421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422# AC_CACHE_VAL
4423case "x$ac_cv_prog_cc_c89" in
4424 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4426$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004427 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4429$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004430 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4433$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004434esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004435if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004436
Matthias Kloseb9621712010-04-24 17:59:49 +00004437fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004438
Martin v. Löwis11437992002-04-12 09:54:03 +00004439ac_ext=c
4440ac_cpp='$CPP $CPPFLAGS'
4441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4443ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004445ac_ext=c
4446ac_cpp='$CPP $CPPFLAGS'
4447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4449ac_compiler_gnu=$ac_cv_c_compiler_gnu
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4451$as_echo_n "checking how to run the C preprocessor... " >&6; }
4452# On Suns, sometimes $CPP names a directory.
4453if test -n "$CPP" && test -d "$CPP"; then
4454 CPP=
4455fi
4456if test -z "$CPP"; then
4457 if ${ac_cv_prog_CPP+:} false; then :
4458 $as_echo_n "(cached) " >&6
4459else
4460 # Double quotes because CPP needs to be expanded
4461 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4462 do
4463 ac_preproc_ok=false
4464for ac_c_preproc_warn_flag in '' yes
4465do
4466 # Use a header file that comes with gcc, so configuring glibc
4467 # with a fresh cross-compiler works.
4468 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4469 # <limits.h> exists even on freestanding compilers.
4470 # On the NeXT, cc -E runs the code through the compiler's parser,
4471 # not just through cpp. "Syntax error" is here to catch this case.
4472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4473/* end confdefs.h. */
4474#ifdef __STDC__
4475# include <limits.h>
4476#else
4477# include <assert.h>
4478#endif
4479 Syntax error
4480_ACEOF
4481if ac_fn_c_try_cpp "$LINENO"; then :
4482
4483else
4484 # Broken: fails on valid input.
4485continue
4486fi
4487rm -f conftest.err conftest.i conftest.$ac_ext
4488
4489 # OK, works on sane cases. Now check whether nonexistent headers
4490 # can be detected and how.
4491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4492/* end confdefs.h. */
4493#include <ac_nonexistent.h>
4494_ACEOF
4495if ac_fn_c_try_cpp "$LINENO"; then :
4496 # Broken: success on invalid input.
4497continue
4498else
4499 # Passes both tests.
4500ac_preproc_ok=:
4501break
4502fi
4503rm -f conftest.err conftest.i conftest.$ac_ext
4504
4505done
4506# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4507rm -f conftest.i conftest.err conftest.$ac_ext
4508if $ac_preproc_ok; then :
4509 break
4510fi
4511
4512 done
4513 ac_cv_prog_CPP=$CPP
4514
4515fi
4516 CPP=$ac_cv_prog_CPP
4517else
4518 ac_cv_prog_CPP=$CPP
4519fi
4520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4521$as_echo "$CPP" >&6; }
4522ac_preproc_ok=false
4523for ac_c_preproc_warn_flag in '' yes
4524do
4525 # Use a header file that comes with gcc, so configuring glibc
4526 # with a fresh cross-compiler works.
4527 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4528 # <limits.h> exists even on freestanding compilers.
4529 # On the NeXT, cc -E runs the code through the compiler's parser,
4530 # not just through cpp. "Syntax error" is here to catch this case.
4531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4532/* end confdefs.h. */
4533#ifdef __STDC__
4534# include <limits.h>
4535#else
4536# include <assert.h>
4537#endif
4538 Syntax error
4539_ACEOF
4540if ac_fn_c_try_cpp "$LINENO"; then :
4541
4542else
4543 # Broken: fails on valid input.
4544continue
4545fi
4546rm -f conftest.err conftest.i conftest.$ac_ext
4547
4548 # OK, works on sane cases. Now check whether nonexistent headers
4549 # can be detected and how.
4550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4551/* end confdefs.h. */
4552#include <ac_nonexistent.h>
4553_ACEOF
4554if ac_fn_c_try_cpp "$LINENO"; then :
4555 # Broken: success on invalid input.
4556continue
4557else
4558 # Passes both tests.
4559ac_preproc_ok=:
4560break
4561fi
4562rm -f conftest.err conftest.i conftest.$ac_ext
4563
4564done
4565# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4566rm -f conftest.i conftest.err conftest.$ac_ext
4567if $ac_preproc_ok; then :
4568
4569else
4570 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4571$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4572as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4573See \`config.log' for more details" "$LINENO" 5; }
4574fi
4575
4576ac_ext=c
4577ac_cpp='$CPP $CPPFLAGS'
4578ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4579ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4580ac_compiler_gnu=$ac_cv_c_compiler_gnu
4581
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4583$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4584if ${ac_cv_path_GREP+:} false; then :
4585 $as_echo_n "(cached) " >&6
4586else
4587 if test -z "$GREP"; then
4588 ac_path_GREP_found=false
4589 # Loop through the user's path and test for each of PROGNAME-LIST
4590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4591for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4592do
4593 IFS=$as_save_IFS
4594 test -z "$as_dir" && as_dir=.
4595 for ac_prog in grep ggrep; do
4596 for ac_exec_ext in '' $ac_executable_extensions; do
4597 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4598 as_fn_executable_p "$ac_path_GREP" || continue
4599# Check for GNU ac_path_GREP and select it if it is found.
4600 # Check for GNU $ac_path_GREP
4601case `"$ac_path_GREP" --version 2>&1` in
4602*GNU*)
4603 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4604*)
4605 ac_count=0
4606 $as_echo_n 0123456789 >"conftest.in"
4607 while :
4608 do
4609 cat "conftest.in" "conftest.in" >"conftest.tmp"
4610 mv "conftest.tmp" "conftest.in"
4611 cp "conftest.in" "conftest.nl"
4612 $as_echo 'GREP' >> "conftest.nl"
4613 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4614 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4615 as_fn_arith $ac_count + 1 && ac_count=$as_val
4616 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4617 # Best one so far, save it but keep looking for a better one
4618 ac_cv_path_GREP="$ac_path_GREP"
4619 ac_path_GREP_max=$ac_count
4620 fi
4621 # 10*(2^10) chars as input seems more than enough
4622 test $ac_count -gt 10 && break
4623 done
4624 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4625esac
4626
4627 $ac_path_GREP_found && break 3
4628 done
4629 done
4630 done
4631IFS=$as_save_IFS
4632 if test -z "$ac_cv_path_GREP"; then
4633 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4634 fi
4635else
4636 ac_cv_path_GREP=$GREP
4637fi
4638
4639fi
4640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4641$as_echo "$ac_cv_path_GREP" >&6; }
4642 GREP="$ac_cv_path_GREP"
4643
4644
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004645
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004646
4647
Matthias Kloseb9621712010-04-24 17:59:49 +00004648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4649$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004651# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004652if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004653 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004654
4655 case $withval in
4656 no) with_cxx_main=no
4657 MAINCC='$(CC)';;
4658 yes) with_cxx_main=yes
4659 MAINCC='$(CXX)';;
4660 *) with_cxx_main=yes
4661 MAINCC=$withval
4662 if test -z "$CXX"
4663 then
4664 CXX=$withval
4665 fi;;
4666 esac
4667else
4668
4669 with_cxx_main=no
4670 MAINCC='$(CC)'
4671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004672fi
4673
Matthias Kloseb9621712010-04-24 17:59:49 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4675$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004676
4677preset_cxx="$CXX"
4678if test -z "$CXX"
4679then
4680 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004681 gcc) if test -n "$ac_tool_prefix"; then
4682 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4683set dummy ${ac_tool_prefix}g++; ac_word=$2
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685$as_echo_n "checking for $ac_word... " >&6; }
4686if ${ac_cv_path_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688else
4689 case $CXX in
4690 [\\/]* | ?:[\\/]*)
4691 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4692 ;;
4693 *)
4694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in notfound
4696do
4697 IFS=$as_save_IFS
4698 test -z "$as_dir" && as_dir=.
4699 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004701 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703 break 2
4704 fi
4705done
4706 done
4707IFS=$as_save_IFS
4708
4709 ;;
4710esac
4711fi
4712CXX=$ac_cv_path_CXX
4713if test -n "$CXX"; then
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4715$as_echo "$CXX" >&6; }
4716else
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718$as_echo "no" >&6; }
4719fi
4720
4721
4722fi
4723if test -z "$ac_cv_path_CXX"; then
4724 ac_pt_CXX=$CXX
4725 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4728$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004729if ${ac_cv_path_ac_pt_CXX+:} false; then :
4730 $as_echo_n "(cached) " >&6
4731else
4732 case $ac_pt_CXX in
4733 [\\/]* | ?:[\\/]*)
4734 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4735 ;;
4736 *)
4737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4738for as_dir in notfound
4739do
4740 IFS=$as_save_IFS
4741 test -z "$as_dir" && as_dir=.
4742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004744 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4746 break 2
4747 fi
4748done
4749 done
4750IFS=$as_save_IFS
4751
4752 ;;
4753esac
4754fi
4755ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4756if test -n "$ac_pt_CXX"; then
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4758$as_echo "$ac_pt_CXX" >&6; }
4759else
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
4762fi
4763
4764 if test "x$ac_pt_CXX" = x; then
4765 CXX="g++"
4766 else
4767 case $cross_compiling:$ac_tool_warned in
4768yes:)
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4770$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4771ac_tool_warned=yes ;;
4772esac
4773 CXX=$ac_pt_CXX
4774 fi
4775else
4776 CXX="$ac_cv_path_CXX"
4777fi
4778 ;;
4779 cc) if test -n "$ac_tool_prefix"; then
4780 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4781set dummy ${ac_tool_prefix}c++; ac_word=$2
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4783$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004784if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786else
4787 case $CXX in
4788 [\\/]* | ?:[\\/]*)
4789 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4790 ;;
4791 *)
4792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4793for as_dir in notfound
4794do
4795 IFS=$as_save_IFS
4796 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801 break 2
4802 fi
4803done
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004805IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807 ;;
4808esac
4809fi
4810CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004811if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4813$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004814else
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4816$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004818
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819
4820fi
4821if test -z "$ac_cv_path_CXX"; then
4822 ac_pt_CXX=$CXX
4823 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004827if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004830 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832 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 +00004833 ;;
4834 *)
4835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836for as_dir in notfound
4837do
4838 IFS=$as_save_IFS
4839 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004842 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844 break 2
4845 fi
4846done
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004848IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850 ;;
4851esac
4852fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004853ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4854if test -n "$ac_pt_CXX"; then
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4856$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004857else
Matthias Kloseb9621712010-04-24 17:59:49 +00004858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004861
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004862 if test "x$ac_pt_CXX" = x; then
4863 CXX="c++"
4864 else
4865 case $cross_compiling:$ac_tool_warned in
4866yes:)
4867{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4868$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4869ac_tool_warned=yes ;;
4870esac
4871 CXX=$ac_pt_CXX
4872 fi
4873else
4874 CXX="$ac_cv_path_CXX"
4875fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004876 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004877 clang|*/clang) if test -n "$ac_tool_prefix"; then
4878 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4879set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4881$as_echo_n "checking for $ac_word... " >&6; }
4882if ${ac_cv_path_CXX+:} false; then :
4883 $as_echo_n "(cached) " >&6
4884else
4885 case $CXX in
4886 [\\/]* | ?:[\\/]*)
4887 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4888 ;;
4889 *)
4890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4891for as_dir in notfound
4892do
4893 IFS=$as_save_IFS
4894 test -z "$as_dir" && as_dir=.
4895 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004897 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4899 break 2
4900 fi
4901done
4902 done
4903IFS=$as_save_IFS
4904
Ned Deilycbfb9a52012-06-23 16:02:19 -07004905 ;;
4906esac
4907fi
4908CXX=$ac_cv_path_CXX
4909if test -n "$CXX"; then
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4911$as_echo "$CXX" >&6; }
4912else
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4914$as_echo "no" >&6; }
4915fi
4916
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004917
4918fi
4919if test -z "$ac_cv_path_CXX"; then
4920 ac_pt_CXX=$CXX
4921 # Extract the first word of "clang++", so it can be a program name with args.
4922set dummy clang++; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if ${ac_cv_path_ac_pt_CXX+:} false; then :
4926 $as_echo_n "(cached) " >&6
4927else
4928 case $ac_pt_CXX in
4929 [\\/]* | ?:[\\/]*)
4930 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4931 ;;
4932 *)
4933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934for as_dir in notfound
4935do
4936 IFS=$as_save_IFS
4937 test -z "$as_dir" && as_dir=.
4938 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004940 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942 break 2
4943 fi
4944done
4945 done
4946IFS=$as_save_IFS
4947
4948 ;;
4949esac
4950fi
4951ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4952if test -n "$ac_pt_CXX"; then
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4954$as_echo "$ac_pt_CXX" >&6; }
4955else
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957$as_echo "no" >&6; }
4958fi
4959
4960 if test "x$ac_pt_CXX" = x; then
4961 CXX="clang++"
4962 else
4963 case $cross_compiling:$ac_tool_warned in
4964yes:)
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4966$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4967ac_tool_warned=yes ;;
4968esac
4969 CXX=$ac_pt_CXX
4970 fi
4971else
4972 CXX="$ac_cv_path_CXX"
4973fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004974 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004975 icc|*/icc) if test -n "$ac_tool_prefix"; then
4976 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4977set dummy ${ac_tool_prefix}icpc; ac_word=$2
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
4980if ${ac_cv_path_CXX+:} false; then :
4981 $as_echo_n "(cached) " >&6
4982else
4983 case $CXX in
4984 [\\/]* | ?:[\\/]*)
4985 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4986 ;;
4987 *)
4988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in notfound
4990do
4991 IFS=$as_save_IFS
4992 test -z "$as_dir" && as_dir=.
4993 for ac_exec_ext in '' $ac_executable_extensions; do
4994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997 break 2
4998 fi
4999done
5000 done
5001IFS=$as_save_IFS
5002
5003 ;;
5004esac
5005fi
5006CXX=$ac_cv_path_CXX
5007if test -n "$CXX"; then
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5009$as_echo "$CXX" >&6; }
5010else
5011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012$as_echo "no" >&6; }
5013fi
5014
5015
5016fi
5017if test -z "$ac_cv_path_CXX"; then
5018 ac_pt_CXX=$CXX
5019 # Extract the first word of "icpc", so it can be a program name with args.
5020set dummy icpc; ac_word=$2
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
5023if ${ac_cv_path_ac_pt_CXX+:} false; then :
5024 $as_echo_n "(cached) " >&6
5025else
5026 case $ac_pt_CXX in
5027 [\\/]* | ?:[\\/]*)
5028 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5029 ;;
5030 *)
5031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5032for as_dir in notfound
5033do
5034 IFS=$as_save_IFS
5035 test -z "$as_dir" && as_dir=.
5036 for ac_exec_ext in '' $ac_executable_extensions; do
5037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5038 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5040 break 2
5041 fi
5042done
5043 done
5044IFS=$as_save_IFS
5045
5046 ;;
5047esac
5048fi
5049ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5050if test -n "$ac_pt_CXX"; then
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5052$as_echo "$ac_pt_CXX" >&6; }
5053else
5054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5055$as_echo "no" >&6; }
5056fi
5057
5058 if test "x$ac_pt_CXX" = x; then
5059 CXX="icpc"
5060 else
5061 case $cross_compiling:$ac_tool_warned in
5062yes:)
5063{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5064$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5065ac_tool_warned=yes ;;
5066esac
5067 CXX=$ac_pt_CXX
5068 fi
5069else
5070 CXX="$ac_cv_path_CXX"
5071fi
5072 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005073 esac
5074 if test "$CXX" = "notfound"
5075 then
5076 CXX=""
5077 fi
5078fi
5079if test -z "$CXX"
5080then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005081 if test -n "$ac_tool_prefix"; then
5082 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5083 do
5084 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5085set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5087$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005088if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090else
5091 if test -n "$CXX"; then
5092 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5093else
5094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in $PATH
5096do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005101 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005103 break 2
5104 fi
5105done
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108
5109fi
5110fi
5111CXX=$ac_cv_prog_CXX
5112if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5114$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115else
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005118fi
5119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005121 test -n "$CXX" && break
5122 done
5123fi
5124if test -z "$CXX"; then
5125 ac_ct_CXX=$CXX
5126 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5127do
5128 # Extract the first word of "$ac_prog", so it can be a program name with args.
5129set dummy $ac_prog; ac_word=$2
5130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5131$as_echo_n "checking for $ac_word... " >&6; }
5132if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5133 $as_echo_n "(cached) " >&6
5134else
5135 if test -n "$ac_ct_CXX"; then
5136 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5137else
5138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5139for as_dir in $PATH
5140do
5141 IFS=$as_save_IFS
5142 test -z "$as_dir" && as_dir=.
5143 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005144 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005145 ac_cv_prog_ac_ct_CXX="$ac_prog"
5146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5147 break 2
5148 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005149done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005150 done
5151IFS=$as_save_IFS
5152
5153fi
5154fi
5155ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5156if test -n "$ac_ct_CXX"; then
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5158$as_echo "$ac_ct_CXX" >&6; }
5159else
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165 test -n "$ac_ct_CXX" && break
5166done
5167
5168 if test "x$ac_ct_CXX" = x; then
5169 CXX="notfound"
5170 else
5171 case $cross_compiling:$ac_tool_warned in
5172yes:)
5173{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5174$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5175ac_tool_warned=yes ;;
5176esac
5177 CXX=$ac_ct_CXX
5178 fi
5179fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005180
5181 if test "$CXX" = "notfound"
5182 then
5183 CXX=""
5184 fi
5185fi
5186if test "$preset_cxx" != "$CXX"
5187then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005188 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005189
5190 By default, distutils will build C++ extension modules with \"$CXX\".
5191 If this is not intended, then set CXX on the configure command line.
5192 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005193$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194
5195 By default, distutils will build C++ extension modules with \"$CXX\".
5196 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005197 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005198fi
5199
5200
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005201MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5202
5203
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5205$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5206cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005207#undef bfin
5208#undef cris
5209#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005210#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005211#undef hppa
5212#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005213#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005214#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005215#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005216#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217#undef unix
5218#if defined(__linux__)
5219# if defined(__x86_64__) && defined(__LP64__)
5220 x86_64-linux-gnu
5221# elif defined(__x86_64__) && defined(__ILP32__)
5222 x86_64-linux-gnux32
5223# elif defined(__i386__)
5224 i386-linux-gnu
5225# elif defined(__aarch64__) && defined(__AARCH64EL__)
5226# if defined(__ILP32__)
5227 aarch64_ilp32-linux-gnu
5228# else
5229 aarch64-linux-gnu
5230# endif
5231# elif defined(__aarch64__) && defined(__AARCH64EB__)
5232# if defined(__ILP32__)
5233 aarch64_be_ilp32-linux-gnu
5234# else
5235 aarch64_be-linux-gnu
5236# endif
5237# elif defined(__alpha__)
5238 alpha-linux-gnu
5239# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5240# if defined(__ARMEL__)
5241 arm-linux-gnueabihf
5242# else
5243 armeb-linux-gnueabihf
5244# endif
5245# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5246# if defined(__ARMEL__)
5247 arm-linux-gnueabi
5248# else
5249 armeb-linux-gnueabi
5250# endif
5251# elif defined(__hppa__)
5252 hppa-linux-gnu
5253# elif defined(__ia64__)
5254 ia64-linux-gnu
5255# elif defined(__m68k__) && !defined(__mcoldfire__)
5256 m68k-linux-gnu
5257# elif defined(__mips_hard_float) && defined(_MIPSEL)
5258# if _MIPS_SIM == _ABIO32
5259 mipsel-linux-gnu
5260# elif _MIPS_SIM == _ABIN32
5261 mips64el-linux-gnuabin32
5262# elif _MIPS_SIM == _ABI64
5263 mips64el-linux-gnuabi64
5264# else
5265# error unknown platform triplet
5266# endif
5267# elif defined(__mips_hard_float)
5268# if _MIPS_SIM == _ABIO32
5269 mips-linux-gnu
5270# elif _MIPS_SIM == _ABIN32
5271 mips64-linux-gnuabin32
5272# elif _MIPS_SIM == _ABI64
5273 mips64-linux-gnuabi64
5274# else
5275# error unknown platform triplet
5276# endif
5277# elif defined(__or1k__)
5278 or1k-linux-gnu
5279# elif defined(__powerpc__) && defined(__SPE__)
5280 powerpc-linux-gnuspe
5281# elif defined(__powerpc64__)
5282# if defined(__LITTLE_ENDIAN__)
5283 powerpc64le-linux-gnu
5284# else
5285 powerpc64-linux-gnu
5286# endif
5287# elif defined(__powerpc__)
5288 powerpc-linux-gnu
5289# elif defined(__s390x__)
5290 s390x-linux-gnu
5291# elif defined(__s390__)
5292 s390-linux-gnu
5293# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5294 sh4-linux-gnu
5295# elif defined(__sparc__) && defined(__arch64__)
5296 sparc64-linux-gnu
5297# elif defined(__sparc__)
5298 sparc-linux-gnu
5299# else
5300# error unknown platform triplet
5301# endif
5302#elif defined(__FreeBSD_kernel__)
5303# if defined(__LP64__)
5304 x86_64-kfreebsd-gnu
5305# elif defined(__i386__)
5306 i386-kfreebsd-gnu
5307# else
5308# error unknown platform triplet
5309# endif
5310#elif defined(__gnu_hurd__)
5311 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005312#elif defined(__APPLE__)
5313 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005314#else
5315# error unknown platform triplet
5316#endif
5317
5318EOF
5319
5320if $CPP conftest.c >conftest.out 2>/dev/null; then
5321 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5323$as_echo "$PLATFORM_TRIPLET" >&6; }
5324else
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5326$as_echo "none" >&6; }
5327fi
5328rm -f conftest.c conftest.out
5329
5330if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5331 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5332 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5333 fi
5334fi
5335PLATDIR=plat-$MACHDEP
5336
5337
5338
5339
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5341$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5342save_LDFLAGS="$LDFLAGS"
5343LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005344
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5346/* end confdefs.h. */
5347
5348int
5349main ()
5350{
5351
5352 ;
5353 return 0;
5354}
5355_ACEOF
5356if ac_fn_c_try_link "$LINENO"; then :
5357 NO_AS_NEEDED="-Wl,--no-as-needed"
5358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5359$as_echo "yes" >&6; }
5360else
5361 NO_AS_NEEDED=""
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363$as_echo "no" >&6; }
5364fi
5365rm -f core conftest.err conftest.$ac_objext \
5366 conftest$ac_exeext conftest.$ac_ext
5367LDFLAGS="$save_LDFLAGS"
5368
5369
5370
5371# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005372
Matthias Kloseb9621712010-04-24 17:59:49 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5374$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005375if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377else
5378 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5379 then ac_cv_path_EGREP="$GREP -E"
5380 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 # Loop through the user's path and test for each of PROGNAME-LIST
5384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5386do
5387 IFS=$as_save_IFS
5388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 for ac_prog in egrep; do
5390 for ac_exec_ext in '' $ac_executable_extensions; do
5391 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005392 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005393# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394 # Check for GNU $ac_path_EGREP
5395case `"$ac_path_EGREP" --version 2>&1` in
5396*GNU*)
5397 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5398*)
5399 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 while :
5402 do
5403 cat "conftest.in" "conftest.in" >"conftest.tmp"
5404 mv "conftest.tmp" "conftest.in"
5405 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5408 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5411 # Best one so far, save it but keep looking for a better one
5412 ac_cv_path_EGREP="$ac_path_EGREP"
5413 ac_path_EGREP_max=$ac_count
5414 fi
5415 # 10*(2^10) chars as input seems more than enough
5416 test $ac_count -gt 10 && break
5417 done
5418 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5419esac
5420
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 $ac_path_EGREP_found && break 3
5422 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005427 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 +00005428 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429else
5430 ac_cv_path_EGREP=$EGREP
5431fi
5432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 fi
5434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5436$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005438
5439
Matthias Kloseb9621712010-04-24 17:59:49 +00005440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5441$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005442if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $as_echo_n "(cached) " >&6
5444else
5445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005446/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005447#include <stdlib.h>
5448#include <stdarg.h>
5449#include <string.h>
5450#include <float.h>
5451
5452int
5453main ()
5454{
5455
5456 ;
5457 return 0;
5458}
5459_ACEOF
5460if ac_fn_c_try_compile "$LINENO"; then :
5461 ac_cv_header_stdc=yes
5462else
5463 ac_cv_header_stdc=no
5464fi
5465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5466
5467if test $ac_cv_header_stdc = yes; then
5468 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5470/* end confdefs.h. */
5471#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005472
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005473_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005475 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005477else
Matthias Kloseb9621712010-04-24 17:59:49 +00005478 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005479fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005480rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005481
Matthias Kloseb9621712010-04-24 17:59:49 +00005482fi
5483
5484if test $ac_cv_header_stdc = yes; then
5485 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5487/* end confdefs.h. */
5488#include <stdlib.h>
5489
5490_ACEOF
5491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5492 $EGREP "free" >/dev/null 2>&1; then :
5493
5494else
5495 ac_cv_header_stdc=no
5496fi
5497rm -f conftest*
5498
5499fi
5500
5501if test $ac_cv_header_stdc = yes; then
5502 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5503 if test "$cross_compiling" = yes; then :
5504 :
5505else
5506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507/* end confdefs.h. */
5508#include <ctype.h>
5509#include <stdlib.h>
5510#if ((' ' & 0x0FF) == 0x020)
5511# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5512# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5513#else
5514# define ISLOWER(c) \
5515 (('a' <= (c) && (c) <= 'i') \
5516 || ('j' <= (c) && (c) <= 'r') \
5517 || ('s' <= (c) && (c) <= 'z'))
5518# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5519#endif
5520
5521#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5522int
5523main ()
5524{
5525 int i;
5526 for (i = 0; i < 256; i++)
5527 if (XOR (islower (i), ISLOWER (i))
5528 || toupper (i) != TOUPPER (i))
5529 return 2;
5530 return 0;
5531}
5532_ACEOF
5533if ac_fn_c_try_run "$LINENO"; then :
5534
5535else
5536 ac_cv_header_stdc=no
5537fi
5538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5539 conftest.$ac_objext conftest.beam conftest.$ac_ext
5540fi
5541
5542fi
5543fi
5544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5545$as_echo "$ac_cv_header_stdc" >&6; }
5546if test $ac_cv_header_stdc = yes; then
5547
5548$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5549
5550fi
5551
5552# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5553for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5554 inttypes.h stdint.h unistd.h
5555do :
5556 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5557ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5558"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005559if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005560 cat >>confdefs.h <<_ACEOF
5561#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5562_ACEOF
5563
5564fi
5565
5566done
5567
5568
5569
5570 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 +02005571if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005572 MINIX=yes
5573else
5574 MINIX=
5575fi
5576
5577
5578 if test "$MINIX" = yes; then
5579
5580$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5581
5582
5583$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5584
5585
5586$as_echo "#define _MINIX 1" >>confdefs.h
5587
5588 fi
5589
5590
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5592$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005593if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 $as_echo_n "(cached) " >&6
5595else
5596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5597/* end confdefs.h. */
5598
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005599# define __EXTENSIONS__ 1
5600 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005601int
5602main ()
5603{
5604
5605 ;
5606 return 0;
5607}
5608_ACEOF
5609if ac_fn_c_try_compile "$LINENO"; then :
5610 ac_cv_safe_to_define___extensions__=yes
5611else
5612 ac_cv_safe_to_define___extensions__=no
5613fi
5614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5615fi
5616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5617$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5618 test $ac_cv_safe_to_define___extensions__ = yes &&
5619 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5620
5621 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5622
5623 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5624
5625 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5626
5627 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5628
5629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631# Check for unsupported systems
5632case $ac_sys_system/$ac_sys_release in
5633atheos*|Linux*/1*)
5634 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5635 echo See README for details.
5636 exit 1;;
5637esac
5638
5639
Matthias Kloseb9621712010-04-24 17:59:49 +00005640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5641$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642
5643# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005644if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645 withval=$with_suffix;
5646 case $withval in
5647 no) EXEEXT=;;
5648 yes) EXEEXT=.exe;;
5649 *) EXEEXT=$withval;;
5650 esac
5651fi
5652
Matthias Kloseb9621712010-04-24 17:59:49 +00005653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5654$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655
5656# Test whether we're running on a non-case-sensitive system, in which
5657# case we give a warning if no ext is given
5658
Matthias Kloseb9621712010-04-24 17:59:49 +00005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5660$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661if test ! -d CaseSensitiveTestDir; then
5662mkdir CaseSensitiveTestDir
5663fi
5664
5665if test -d casesensitivetestdir
5666then
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5668$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 BUILDEXEEXT=.exe
5670else
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5672$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 BUILDEXEEXT=$EXEEXT
5674fi
5675rmdir CaseSensitiveTestDir
5676
5677case $MACHDEP in
5678bsdos*)
5679 case $CC in
5680 gcc) CC="$CC -D_HAVE_BSDI";;
5681 esac;;
5682esac
5683
5684case $ac_sys_system in
5685hp*|HP*)
5686 case $CC in
5687 cc|*/cc) CC="$CC -Ae";;
5688 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689esac
5690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691
Matthias Kloseb9621712010-04-24 17:59:49 +00005692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5693$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694if test -z "$LIBRARY"
5695then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005696 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5699$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
5701# LDLIBRARY is the name of the library to link against (as opposed to the
5702# name of the library into which to insert object files). BLDLIBRARY is also
5703# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5704# is blank as the main program is not linked directly against LDLIBRARY.
5705# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5706# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5707# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5708# DLLLIBRARY is the shared (i.e., DLL) library.
5709#
5710# RUNSHARED is used to run shared python without installed libraries
5711#
5712# INSTSONAME is the name of the shared library that will be use to install
5713# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005714#
5715# LDVERSION is the shared library version number, normally the Python version
5716# with the ABI build flags appended.
5717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
5719
5720
5721
5722
5723
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005724
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725LDLIBRARY="$LIBRARY"
5726BLDLIBRARY='$(LDLIBRARY)'
5727INSTSONAME='$(LDLIBRARY)'
5728DLLLIBRARY=''
5729LDLIBRARYDIR=''
5730RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005731LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732
5733# LINKCC is the command that links the python executable -- default is $(CC).
5734# If CXX is set, and if it is needed to link a main function that was
5735# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5736# python might then depend on the C++ runtime
5737# This is altered for AIX in order to build the export list before
5738# linking.
5739
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5741$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742if test -z "$LINKCC"
5743then
5744 LINKCC='$(PURIFY) $(MAINCC)'
5745 case $ac_sys_system in
5746 AIX*)
5747 exp_extra="\"\""
5748 if test $ac_sys_release -ge 5 -o \
5749 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5750 exp_extra="."
5751 fi
5752 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753 QNX*)
5754 # qcc must be used because the other compilers do not
5755 # support -N.
5756 LINKCC=qcc;;
5757 esac
5758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5760$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761
5762# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5763# make sure we default having it set to "no": this is used by
5764# distutils.unixccompiler to know if it should add --enable-new-dtags
5765# to linker command lines, and failing to detect GNU ld simply results
5766# in the same bahaviour as before.
5767
Matthias Kloseb9621712010-04-24 17:59:49 +00005768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5769$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770ac_prog=ld
5771if test "$GCC" = yes; then
5772 ac_prog=`$CC -print-prog-name=ld`
5773fi
5774case `"$ac_prog" -V 2>&1 < /dev/null` in
5775 *GNU*)
5776 GNULD=yes;;
5777 *)
5778 GNULD=no;;
5779esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5781$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5784$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005785if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005786 $as_echo_n "(cached) " >&6
5787else
5788 ac_cv_c_inline=no
5789for ac_kw in inline __inline__ __inline; do
5790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5791/* end confdefs.h. */
5792#ifndef __cplusplus
5793typedef int foo_t;
5794static $ac_kw foo_t static_foo () {return 0; }
5795$ac_kw foo_t foo () {return 0; }
5796#endif
5797
5798_ACEOF
5799if ac_fn_c_try_compile "$LINENO"; then :
5800 ac_cv_c_inline=$ac_kw
5801fi
5802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5803 test "$ac_cv_c_inline" != no && break
5804done
5805
5806fi
5807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5808$as_echo "$ac_cv_c_inline" >&6; }
5809
5810case $ac_cv_c_inline in
5811 inline | yes) ;;
5812 *)
5813 case $ac_cv_c_inline in
5814 no) ac_val=;;
5815 *) ac_val=$ac_cv_c_inline;;
5816 esac
5817 cat >>confdefs.h <<_ACEOF
5818#ifndef __cplusplus
5819#define inline $ac_val
5820#endif
5821_ACEOF
5822 ;;
5823esac
5824
5825if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005826
5827$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005828
5829
5830fi
5831
5832
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5834$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005836if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 enableval=$enable_shared;
5838fi
5839
5840
5841if test -z "$enable_shared"
5842then
5843 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005844 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845 enable_shared="yes";;
5846 *)
5847 enable_shared="no";;
5848 esac
5849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5851$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852
Matthias Kloseb9621712010-04-24 17:59:49 +00005853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5854$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005856if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005857 enableval=$enable_profiling;
5858fi
5859
5860if test "x$enable_profiling" = xyes; then
5861 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005862 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864/* end confdefs.h. */
5865int main() { return 0; }
5866_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005867if ac_fn_c_try_link "$LINENO"; then :
5868
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005870 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005872rm -f core conftest.err conftest.$ac_objext \
5873 conftest$ac_exeext conftest.$ac_ext
5874 CC="$ac_save_cc"
5875else
5876 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5879$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881if test "x$enable_profiling" = xyes; then
5882 BASECFLAGS="-pg $BASECFLAGS"
5883 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884fi
5885
Matthias Kloseb9621712010-04-24 17:59:49 +00005886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5887$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888
5889# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5890# library that we build, but we do not want to link against it (we
5891# will find it with a -framework option). For this reason there is an
5892# extra variable BLDLIBRARY against which Python and the extension
5893# modules are linked, BLDLIBRARY. This is normally the same as
5894# LDLIBRARY, but empty for MacOSX framework builds.
5895if test "$enable_framework"
5896then
5897 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005898 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 BLDLIBRARY=''
5900else
5901 BLDLIBRARY='$(LDLIBRARY)'
5902fi
5903
5904# Other platforms follow
5905if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005906 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
Matthias Kloseb9621712010-04-24 17:59:49 +00005908$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909
5910 case $ac_sys_system in
5911 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).dll.a'
5913 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ;;
5915 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005916 LDLIBRARY='libpython$(LDVERSION).so'
5917 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005918 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005920 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005921 then
5922 PY3LIBRARY=libpython3.so
5923 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005925 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005926 LDLIBRARY='libpython$(LDVERSION).so'
5927 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005928 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005930 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005931 then
5932 PY3LIBRARY=libpython3.so
5933 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ;;
5935 hp*|HP*)
5936 case `uname -m` in
5937 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005938 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
5940 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 ;;
5943 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005944 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005945 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005948 LDLIBRARY='libpython$(LDVERSION).dylib'
5949 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005950 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005952 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005954 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005955 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956
5957 esac
5958else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005959 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 case $ac_sys_system in
5961 CYGWIN*)
5962 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964 ;;
5965 esac
5966fi
5967
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005968if test "$cross_compiling" = yes; then
5969 RUNSHARED=
5970fi
5971
Matthias Kloseb9621712010-04-24 17:59:49 +00005972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5973$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974
5975if test -n "$ac_tool_prefix"; then
5976 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5977set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005980if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982else
5983 if test -n "$RANLIB"; then
5984 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5985else
5986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989 IFS=$as_save_IFS
5990 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995 break 2
5996 fi
5997done
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999IFS=$as_save_IFS
6000
6001fi
6002fi
6003RANLIB=$ac_cv_prog_RANLIB
6004if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6006$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007else
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010fi
6011
6012
6013fi
6014if test -z "$ac_cv_prog_RANLIB"; then
6015 ac_ct_RANLIB=$RANLIB
6016 # Extract the first word of "ranlib", so it can be a program name with args.
6017set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6019$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006020if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022else
6023 if test -n "$ac_ct_RANLIB"; then
6024 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6025else
6026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6027for as_dir in $PATH
6028do
6029 IFS=$as_save_IFS
6030 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006032 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035 break 2
6036 fi
6037done
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039IFS=$as_save_IFS
6040
6041fi
6042fi
6043ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6044if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6046$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047else
Matthias Kloseb9621712010-04-24 17:59:49 +00006048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6049$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050fi
6051
6052 if test "x$ac_ct_RANLIB" = x; then
6053 RANLIB=":"
6054 else
6055 case $cross_compiling:$ac_tool_warned in
6056yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006057{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6058$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059ac_tool_warned=yes ;;
6060esac
6061 RANLIB=$ac_ct_RANLIB
6062 fi
6063else
6064 RANLIB="$ac_cv_prog_RANLIB"
6065fi
6066
6067
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006068if test -n "$ac_tool_prefix"; then
6069 for ac_prog in ar aal
6070 do
6071 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6074$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006075if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006076 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077else
6078 if test -n "$AR"; then
6079 ac_cv_prog_AR="$AR" # Let the user override the test.
6080else
6081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6082for as_dir in $PATH
6083do
6084 IFS=$as_save_IFS
6085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006088 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090 break 2
6091 fi
6092done
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094IFS=$as_save_IFS
6095
6096fi
6097fi
6098AR=$ac_cv_prog_AR
6099if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6101$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102else
Matthias Kloseb9621712010-04-24 17:59:49 +00006103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105fi
6106
6107
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006108 test -n "$AR" && break
6109 done
6110fi
6111if test -z "$AR"; then
6112 ac_ct_AR=$AR
6113 for ac_prog in ar aal
6114do
6115 # Extract the first word of "$ac_prog", so it can be a program name with args.
6116set dummy $ac_prog; ac_word=$2
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118$as_echo_n "checking for $ac_word... " >&6; }
6119if ${ac_cv_prog_ac_ct_AR+:} false; then :
6120 $as_echo_n "(cached) " >&6
6121else
6122 if test -n "$ac_ct_AR"; then
6123 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6124else
6125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6126for as_dir in $PATH
6127do
6128 IFS=$as_save_IFS
6129 test -z "$as_dir" && as_dir=.
6130 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006132 ac_cv_prog_ac_ct_AR="$ac_prog"
6133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6134 break 2
6135 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006137 done
6138IFS=$as_save_IFS
6139
6140fi
6141fi
6142ac_ct_AR=$ac_cv_prog_ac_ct_AR
6143if test -n "$ac_ct_AR"; then
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6145$as_echo "$ac_ct_AR" >&6; }
6146else
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148$as_echo "no" >&6; }
6149fi
6150
6151
6152 test -n "$ac_ct_AR" && break
6153done
6154
6155 if test "x$ac_ct_AR" = x; then
6156 AR="ar"
6157 else
6158 case $cross_compiling:$ac_tool_warned in
6159yes:)
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6162ac_tool_warned=yes ;;
6163esac
6164 AR=$ac_ct_AR
6165 fi
6166fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167
6168
6169# tweak ARFLAGS only if the user didn't set it on the command line
6170
6171if test -z "$ARFLAGS"
6172then
6173 ARFLAGS="rc"
6174fi
6175
doko@ubuntu.com58844492012-06-30 18:25:32 +02006176if test -n "$ac_tool_prefix"; then
6177 for ac_prog in readelf
6178 do
6179 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6180set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6182$as_echo_n "checking for $ac_word... " >&6; }
6183if ${ac_cv_prog_READELF+:} false; then :
6184 $as_echo_n "(cached) " >&6
6185else
6186 if test -n "$READELF"; then
6187 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6188else
6189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190for as_dir in $PATH
6191do
6192 IFS=$as_save_IFS
6193 test -z "$as_dir" && as_dir=.
6194 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006195 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006196 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6197 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6198 break 2
6199 fi
6200done
6201 done
6202IFS=$as_save_IFS
6203
6204fi
6205fi
6206READELF=$ac_cv_prog_READELF
6207if test -n "$READELF"; then
6208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6209$as_echo "$READELF" >&6; }
6210else
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6212$as_echo "no" >&6; }
6213fi
6214
6215
6216 test -n "$READELF" && break
6217 done
6218fi
6219if test -z "$READELF"; then
6220 ac_ct_READELF=$READELF
6221 for ac_prog in readelf
6222do
6223 # Extract the first word of "$ac_prog", so it can be a program name with args.
6224set dummy $ac_prog; ac_word=$2
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6226$as_echo_n "checking for $ac_word... " >&6; }
6227if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6228 $as_echo_n "(cached) " >&6
6229else
6230 if test -n "$ac_ct_READELF"; then
6231 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6232else
6233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234for as_dir in $PATH
6235do
6236 IFS=$as_save_IFS
6237 test -z "$as_dir" && as_dir=.
6238 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006239 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006240 ac_cv_prog_ac_ct_READELF="$ac_prog"
6241 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6242 break 2
6243 fi
6244done
6245 done
6246IFS=$as_save_IFS
6247
6248fi
6249fi
6250ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6251if test -n "$ac_ct_READELF"; then
6252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6253$as_echo "$ac_ct_READELF" >&6; }
6254else
6255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6256$as_echo "no" >&6; }
6257fi
6258
6259
6260 test -n "$ac_ct_READELF" && break
6261done
6262
6263 if test "x$ac_ct_READELF" = x; then
6264 READELF=":"
6265 else
6266 case $cross_compiling:$ac_tool_warned in
6267yes:)
6268{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6269$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6270ac_tool_warned=yes ;;
6271esac
6272 READELF=$ac_ct_READELF
6273 fi
6274fi
6275
6276if test "$cross_compiling" = yes; then
6277 case "$READELF" in
6278 readelf|:)
6279 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6280 ;;
6281 esac
6282fi
6283
6284
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285
Matthias Klosec4c48422012-10-21 23:05:35 +02006286for ac_prog in python$PACKAGE_VERSION python3 python
6287do
6288 # Extract the first word of "$ac_prog", so it can be a program name with args.
6289set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6291$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006292if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006293 $as_echo_n "(cached) " >&6
6294else
Matthias Klosec4c48422012-10-21 23:05:35 +02006295 if test -n "$PYTHON"; then
6296 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006297else
6298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6299for as_dir in $PATH
6300do
6301 IFS=$as_save_IFS
6302 test -z "$as_dir" && as_dir=.
6303 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006304 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006305 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6307 break 2
6308 fi
6309done
6310 done
6311IFS=$as_save_IFS
6312
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006313fi
6314fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006315PYTHON=$ac_cv_prog_PYTHON
6316if test -n "$PYTHON"; then
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6318$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006319else
6320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6321$as_echo "no" >&6; }
6322fi
6323
6324
Matthias Klosec4c48422012-10-21 23:05:35 +02006325 test -n "$PYTHON" && break
6326done
6327test -n "$PYTHON" || PYTHON="not-found"
6328
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006329if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006330 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6331else
6332 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006333fi
6334
6335
Kushal Das02d23a22014-04-15 23:50:06 +05306336for ac_prog in python$PACKAGE_VERSION python3 python
6337do
6338 # Extract the first word of "$ac_prog", so it can be a program name with args.
6339set dummy $ac_prog; ac_word=$2
6340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6341$as_echo_n "checking for $ac_word... " >&6; }
6342if ${ac_cv_prog_PYTHON+:} false; then :
6343 $as_echo_n "(cached) " >&6
6344else
6345 if test -n "$PYTHON"; then
6346 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6347else
6348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6349for as_dir in $PATH
6350do
6351 IFS=$as_save_IFS
6352 test -z "$as_dir" && as_dir=.
6353 for ac_exec_ext in '' $ac_executable_extensions; do
6354 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6355 ac_cv_prog_PYTHON="$ac_prog"
6356 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6357 break 2
6358 fi
6359done
6360 done
6361IFS=$as_save_IFS
6362
6363fi
6364fi
6365PYTHON=$ac_cv_prog_PYTHON
6366if test -n "$PYTHON"; then
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6368$as_echo "$PYTHON" >&6; }
6369else
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372fi
6373
6374
6375 test -n "$PYTHON" && break
6376done
6377test -n "$PYTHON" || PYTHON="not-found"
6378
6379if test "$PYTHON" = not-found; then
6380 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6381else
6382 OPCODEHGEN="$PYTHON"
6383fi
6384
6385
6386
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387case $MACHDEP in
6388bsdos*|hp*|HP*)
6389 # install -d does not work on BSDI or HP-UX
6390 if test -z "$INSTALL"
6391 then
6392 INSTALL="${srcdir}/install-sh -c"
6393 fi
6394esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006395# Find a good install program. We prefer a C program (faster),
6396# so one script is as good as another. But avoid the broken or
6397# incompatible versions:
6398# SysV /etc/install, /usr/sbin/install
6399# SunOS /usr/etc/install
6400# IRIX /sbin/install
6401# AIX /bin/install
6402# AmigaOS /C/install, which installs bootblocks on floppy discs
6403# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6404# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6405# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6406# OS/2's system install, which has a completely different semantic
6407# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006408# Reject install programs that cannot install multiple files.
6409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6410$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006412if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006413 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006414else
6415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416for as_dir in $PATH
6417do
6418 IFS=$as_save_IFS
6419 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006420 # Account for people who put trailing slashes in PATH elements.
6421case $as_dir/ in #((
6422 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006424 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425 /usr/ucb/* ) ;;
6426 *)
6427 # OSF1 and SCO ODT 3.0 have their own names for install.
6428 # Don't use installbsd from OSF since it installs stuff as root
6429 # by default.
6430 for ac_prog in ginstall scoinst install; do
6431 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006432 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433 if test $ac_prog = install &&
6434 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6435 # AIX install. It has an incompatible calling convention.
6436 :
6437 elif test $ac_prog = install &&
6438 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6439 # program-specific install script used by HP pwplus--don't use.
6440 :
6441 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006442 rm -rf conftest.one conftest.two conftest.dir
6443 echo one > conftest.one
6444 echo two > conftest.two
6445 mkdir conftest.dir
6446 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6447 test -s conftest.one && test -s conftest.two &&
6448 test -s conftest.dir/conftest.one &&
6449 test -s conftest.dir/conftest.two
6450 then
6451 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6452 break 3
6453 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454 fi
6455 fi
6456 done
6457 done
6458 ;;
6459esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006460
6461 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006462IFS=$as_save_IFS
6463
Matthias Kloseb9621712010-04-24 17:59:49 +00006464rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006465
6466fi
6467 if test "${ac_cv_path_install+set}" = set; then
6468 INSTALL=$ac_cv_path_install
6469 else
6470 # As a last resort, use the slow shell script. Don't cache a
6471 # value for INSTALL within a source directory, because that will
6472 # break other packages using the cache if that directory is
6473 # removed, or if the value is a relative name.
6474 INSTALL=$ac_install_sh
6475 fi
6476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6478$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006479
6480# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6481# It thinks the first close brace ends the variable substitution.
6482test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6483
6484test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6485
6486test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6487
Matthias Klose93a0ef12012-03-15 18:08:34 +01006488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6489$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6490if test -z "$MKDIR_P"; then
6491 if ${ac_cv_path_mkdir+:} false; then :
6492 $as_echo_n "(cached) " >&6
6493else
6494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6495for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6496do
6497 IFS=$as_save_IFS
6498 test -z "$as_dir" && as_dir=.
6499 for ac_prog in mkdir gmkdir; do
6500 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006501 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006502 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6503 'mkdir (GNU coreutils) '* | \
6504 'mkdir (coreutils) '* | \
6505 'mkdir (fileutils) '4.1*)
6506 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6507 break 3;;
6508 esac
6509 done
6510 done
6511 done
6512IFS=$as_save_IFS
6513
6514fi
6515
6516 test -d ./--version && rmdir ./--version
6517 if test "${ac_cv_path_mkdir+set}" = set; then
6518 MKDIR_P="$ac_cv_path_mkdir -p"
6519 else
6520 # As a last resort, use the slow shell script. Don't cache a
6521 # value for MKDIR_P within a source directory, because that will
6522 # break other packages using the cache if that directory is
6523 # removed, or if the value is a relative name.
6524 MKDIR_P="$ac_install_sh -d"
6525 fi
6526fi
6527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6528$as_echo "$MKDIR_P" >&6; }
6529
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530
6531# Not every filesystem supports hard links
6532
6533if test -z "$LN" ; then
6534 case $ac_sys_system in
6535 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006536 *) LN=ln;;
6537 esac
6538fi
6539
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006540# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006541
6542ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006543
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6546$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547
6548# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006549if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006550 withval=$with_pydebug;
6551if test "$withval" != no
6552then
6553
Matthias Kloseb9621712010-04-24 17:59:49 +00006554$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006555
Matthias Kloseb9621712010-04-24 17:59:49 +00006556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6557$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006559 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006560else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6561$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562fi
6563else
Matthias Kloseb9621712010-04-24 17:59:49 +00006564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566fi
6567
6568
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006569# Enable LTO flags
6570
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6572$as_echo_n "checking for --with-lto... " >&6; }
6573
6574# Check whether --with-lto was given.
6575if test "${with_lto+set}" = set; then :
6576 withval=$with_lto;
6577if test "$withval" != no
6578then
6579 Py_LTO='true'
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6581$as_echo "yes" >&6; };
6582else
6583 Py_LTO='false'
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; };
6586fi
6587else
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
6590fi
6591
6592if test "$Py_LTO" = 'true' ; then
6593 case $CC in
6594 *clang*)
6595 # Any changes made here should be reflected in the GCC+Darwin case below
6596 LTOFLAGS="-flto"
6597 ;;
6598 *gcc*)
6599 case $ac_sys_system in
6600 Darwin*)
6601 LTOFLAGS="-flto"
6602 ;;
6603 *)
6604 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6605 ;;
6606 esac
6607 ;;
6608 esac
6609fi
6610
Brett Cannon7188a3e2015-09-18 15:13:44 -07006611# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006612
6613
6614
6615
6616
6617
Brett Cannon7188a3e2015-09-18 15:13:44 -07006618# Extract the first word of "llvm-profdata", so it can be a program name with args.
6619set dummy llvm-profdata; ac_word=$2
6620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6621$as_echo_n "checking for $ac_word... " >&6; }
6622if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6623 $as_echo_n "(cached) " >&6
6624else
6625 if test -n "$LLVM_PROF_FOUND"; then
6626 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6627else
6628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6629for as_dir in $PATH
6630do
6631 IFS=$as_save_IFS
6632 test -z "$as_dir" && as_dir=.
6633 for ac_exec_ext in '' $ac_executable_extensions; do
6634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6635 ac_cv_prog_LLVM_PROF_FOUND="found"
6636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6637 break 2
6638 fi
6639done
6640 done
6641IFS=$as_save_IFS
6642
6643 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6644fi
6645fi
6646LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6647if test -n "$LLVM_PROF_FOUND"; then
6648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6649$as_echo "$LLVM_PROF_FOUND" >&6; }
6650else
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6652$as_echo "no" >&6; }
6653fi
6654
6655
6656LLVM_PROF_ERR=no
6657case $CC in
6658 *clang*)
6659 # Any changes made here should be reflected in the GCC+Darwin case below
6660 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6661 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6662 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6663 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6664 if test $LLVM_PROF_FOUND = not-found
6665 then
6666 LLVM_PROF_ERR=yes
6667 fi
6668 ;;
6669 *gcc*)
6670 case $ac_sys_system in
6671 Darwin*)
6672 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6673 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6674 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6675 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6676 if test $LLVM_PROF_FOUND = not-found
6677 then
6678 LLVM_PROF_ERR=yes
6679 fi
6680 ;;
6681 *)
6682 PGO_PROF_GEN_FLAG="-fprofile-generate"
6683 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6684 LLVM_PROF_MERGER="true"
6685 LLVM_PROF_FILE=""
6686 ;;
6687 esac
6688 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006689 *icc*)
6690 PGO_PROF_GEN_FLAG="-prof-gen"
6691 PGO_PROF_USE_FLAG="-prof-use"
6692 LLVM_PROF_MERGER="true"
6693 LLVM_PROF_FILE=""
6694 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695esac
6696
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006697# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6698# merged with this chunk of code?
6699
6700# Optimizer/debugger flags
6701# ------------------------
6702# (The following bit of code is complicated enough - please keep things
6703# indented properly. Just pretend you're editing Python code. ;-)
6704
6705# There are two parallel sets of case statements below, one that checks to
6706# see if OPT was set and one that does BASECFLAGS setting based upon
6707# compiler and platform. BASECFLAGS tweaks need to be made even if the
6708# user set OPT.
6709
6710# tweak OPT based on compiler and platform, only if the user didn't set
6711# it on the command line
6712
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006713if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714then
6715 case $GCC in
6716 yes)
6717 if test "$CC" != 'g++' ; then
6718 STRICT_PROTO="-Wstrict-prototypes"
6719 fi
6720 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6721 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6722 WRAP="-fwrapv"
6723 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006724
6725 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006726 case $CC in
6727 *clang*) WRAP="-fwrapv"
6728 ;;
6729 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006730
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731 case $ac_cv_prog_cc_g in
6732 yes)
6733 if test "$Py_DEBUG" = 'true' ; then
6734 # Optimization messes up debuggers, so turn it off for
6735 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006736 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6737 OPT="-g -Og -Wall $STRICT_PROTO"
6738 else
6739 OPT="-g -O0 -Wall $STRICT_PROTO"
6740 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741 else
6742 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6743 fi
6744 ;;
6745 *)
6746 OPT="-O3 -Wall $STRICT_PROTO"
6747 ;;
6748 esac
6749 case $ac_sys_system in
6750 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6751 ;;
6752 esac
6753 ;;
6754
6755 *)
6756 OPT="-O"
6757 ;;
6758 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759fi
6760
6761
6762
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764# The -arch flags for universal builds on OSX
6765UNIVERSAL_ARCH_FLAGS=
6766
6767
6768# tweak BASECFLAGS based on compiler and platform
6769case $GCC in
6770yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006771 # Python doesn't violate C99 aliasing rules, but older versions of
6772 # GCC produce warnings for legal Python code. Enable
6773 # -fno-strict-aliasing on versions of GCC that support but produce
6774 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6776$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777 ac_save_cc="$CC"
6778 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006779 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006780 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006781 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006782else
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006785
Matthias Kloseb159a552010-04-25 21:00:44 +00006786
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006787int
6788main ()
6789{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006790
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006791 ;
6792 return 0;
6793}
Matthias Kloseb159a552010-04-25 21:00:44 +00006794
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006796if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006797
6798 CC="$ac_save_cc -fstrict-aliasing"
6799 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006801/* end confdefs.h. */
6802
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006803 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006804int
6805main ()
6806{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006807double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006808 ;
6809 return 0;
6810}
Matthias Kloseb159a552010-04-25 21:00:44 +00006811
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006813if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006814
6815 ac_cv_no_strict_aliasing=no
6816
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817else
Matthias Kloseb159a552010-04-25 21:00:44 +00006818
6819 ac_cv_no_strict_aliasing=yes
6820
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006821fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006823
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006824else
Matthias Kloseb159a552010-04-25 21:00:44 +00006825
6826 ac_cv_no_strict_aliasing=no
6827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006830fi
6831
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006832 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6835$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006836 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837 then
6838 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6839 fi
6840
Zachary Ware5af85642015-12-21 12:09:17 -06006841 # ICC doesn't recognize the option, but only emits a warning
6842 ## XXX does it emit an unused result warning and can it be disabled?
6843 case "$CC" in
6844 *icc*)
6845 ac_cv_disable_unused_result_warning=no
6846 ;;
6847 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6849$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6850 ac_save_cc="$CC"
6851 CC="$CC -Wunused-result -Werror"
6852 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006853 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006854 $as_echo_n "(cached) " >&6
6855else
6856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6857/* end confdefs.h. */
6858
6859
6860int
6861main ()
6862{
6863
6864 ;
6865 return 0;
6866}
6867
6868_ACEOF
6869if ac_fn_c_try_compile "$LINENO"; then :
6870
6871 ac_cv_disable_unused_result_warning=yes
6872
6873else
6874
6875 ac_cv_disable_unused_result_warning=no
6876
6877fi
6878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6879fi
6880
6881 CFLAGS="$save_CFLAGS"
6882 CC="$ac_save_cc"
6883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6884$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006885 ;;
6886 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006887
6888 if test $ac_cv_disable_unused_result_warning = yes
6889 then
6890 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6891 fi
6892
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6894$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6895 ac_save_cc="$CC"
6896 CC="$CC -Werror=declaration-after-statement"
6897 save_CFLAGS="$CFLAGS"
6898 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6899 $as_echo_n "(cached) " >&6
6900else
6901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6902/* end confdefs.h. */
6903
6904
6905int
6906main ()
6907{
6908
6909 ;
6910 return 0;
6911}
6912
6913_ACEOF
6914if ac_fn_c_try_compile "$LINENO"; then :
6915
6916 ac_cv_declaration_after_statement_warning=yes
6917
6918else
6919
6920 ac_cv_declaration_after_statement_warning=no
6921
6922fi
6923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6924fi
6925
6926 CFLAGS="$save_CFLAGS"
6927 CC="$ac_save_cc"
6928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6929$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6930
6931 if test $ac_cv_declaration_after_statement_warning = yes
6932 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006933 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006934 fi
6935
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6937$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6938 ac_save_cc="$CC"
6939 CC="$CC -Wsign-compare"
6940 save_CFLAGS="$CFLAGS"
6941 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6942 $as_echo_n "(cached) " >&6
6943else
6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945/* end confdefs.h. */
6946
6947
6948int
6949main ()
6950{
6951
6952 ;
6953 return 0;
6954}
6955
6956_ACEOF
6957if ac_fn_c_try_compile "$LINENO"; then :
6958
6959 ac_cv_enable_sign_compare_warning=yes
6960
6961else
6962
6963 ac_cv_enable_sign_compare_warning=no
6964
6965fi
6966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6967fi
6968
6969 CFLAGS="$save_CFLAGS"
6970 CC="$ac_save_cc"
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6972$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6973
6974 if test $ac_cv_enable_sign_compare_warning = yes
6975 then
6976 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6977 fi
6978
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6980$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6981 ac_save_cc="$CC"
6982 CC="$CC -Wunreachable-code"
6983 save_CFLAGS="$CFLAGS"
6984 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6985 $as_echo_n "(cached) " >&6
6986else
6987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6988/* end confdefs.h. */
6989
6990
6991int
6992main ()
6993{
6994
6995 ;
6996 return 0;
6997}
6998
6999_ACEOF
7000if ac_fn_c_try_compile "$LINENO"; then :
7001
7002 ac_cv_enable_unreachable_code_warning=yes
7003
7004else
7005
7006 ac_cv_enable_unreachable_code_warning=no
7007
7008fi
7009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7010fi
7011
7012 CFLAGS="$save_CFLAGS"
7013 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007014
7015 # Don't enable unreachable code warning in debug mode, since it usually
7016 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007017 # Issue #24324: Unfortunately, the unreachable code warning does not work
7018 # correctly on gcc and has been silently removed from the compiler.
7019 # It is supported on clang but on OS X systems gcc may be an alias
7020 # for clang. Try to determine if the compiler is not really gcc and,
7021 # if so, only then enable the warning.
7022 if test $ac_cv_enable_unreachable_code_warning = yes && \
7023 test "$Py_DEBUG" != "true" && \
7024 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007025 then
7026 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007027 else
7028 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007029 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7031$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007032
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007033 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7034 # support. Without this, treatment of subnormals doesn't follow
7035 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007036 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007037 alpha*)
7038 BASECFLAGS="$BASECFLAGS -mieee"
7039 ;;
7040 esac
7041
7042 case $ac_sys_system in
7043 SCO_SV*)
7044 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7045 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007046
7047 # is there any other compiler on Darwin besides gcc?
7048 Darwin*)
7049 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7050 # used to be here, but non-Apple gcc doesn't accept them.
7051 if test "${CC}" = gcc
7052 then
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007054$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007055 case "${UNIVERSALSDK}" in
7056 */MacOSX10.4u.sdk)
7057 # Build using 10.4 SDK, force usage of gcc when the
7058 # compiler is gcc, otherwise the user will get very
7059 # confusing error messages when building on OSX 10.6
7060 CC=gcc-4.0
7061 CPP=cpp-4.0
7062 ;;
7063 esac
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007065$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007066 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007067
Ned Deily87adb6e2013-10-18 21:09:56 -07007068 if test "${enable_universalsdk}"
7069 then
7070 case "$UNIVERSAL_ARCHS" in
7071 32-bit)
7072 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7073 LIPO_32BIT_FLAGS=""
7074 ARCH_RUN_32BIT=""
7075 ;;
7076 64-bit)
7077 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7078 LIPO_32BIT_FLAGS=""
7079 ARCH_RUN_32BIT="true"
7080 ;;
7081 all)
7082 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7083 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7084 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7085 ;;
7086 intel)
7087 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7088 LIPO_32BIT_FLAGS="-extract i386"
7089 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7090 ;;
7091 intel-32)
7092 UNIVERSAL_ARCH_FLAGS="-arch i386"
7093 LIPO_32BIT_FLAGS=""
7094 ARCH_RUN_32BIT=""
7095 ;;
7096 3-way)
7097 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7098 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7099 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7100 ;;
7101 *)
7102 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7103 ;;
7104 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007105
Ned Deily87adb6e2013-10-18 21:09:56 -07007106 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7107 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7108 if test "${UNIVERSALSDK}" != "/"
7109 then
7110 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7111 fi
7112 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007113
Ned Deily87adb6e2013-10-18 21:09:56 -07007114 # Calculate an appropriate deployment target for this build:
7115 # The deployment target value is used explicitly to enable certain
7116 # features are enabled (such as builtin libedit support for readline)
7117 # through the use of Apple's Availabiliy Macros and is used as a
7118 # component of the string returned by distutils.get_platform().
7119 #
7120 # Use the value from:
7121 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7122 # 2. the operating system version of the build machine if >= 10.6
7123 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7124 # below to pick either 10.3, 10.4, or 10.5 as the target.
7125 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007126
Ned Deily87adb6e2013-10-18 21:09:56 -07007127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7128$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007129 cur_target_major=`sw_vers -productVersion | \
7130 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7131 cur_target_minor=`sw_vers -productVersion | \
7132 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7133 cur_target="${cur_target_major}.${cur_target_minor}"
7134 if test ${cur_target_major} -eq 10 && \
7135 test ${cur_target_minor} -ge 3 && \
7136 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007137 then
Ned Deily36820b62014-06-25 13:44:22 -07007138 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007139 cur_target=10.3
7140 if test ${enable_universalsdk}
7141 then
7142 case "$UNIVERSAL_ARCHS" in
7143 all|3-way|intel|64-bit)
7144 # These configurations were first supported in 10.5
7145 cur_target='10.5'
7146 ;;
7147 esac
7148 else
7149 if test `/usr/bin/arch` = "i386"
7150 then
7151 # 10.4 was the first release to support Intel archs
7152 cur_target="10.4"
7153 fi
7154 fi
7155 fi
7156 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007157
Ned Deily87adb6e2013-10-18 21:09:56 -07007158 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7159 # environment with a value that is the same as what we'll use
7160 # in the Makefile to ensure that we'll get the same compiler
7161 # environment during configure and build time.
7162 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7163 export MACOSX_DEPLOYMENT_TARGET
7164 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7166$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007167
Ned Deily87adb6e2013-10-18 21:09:56 -07007168 # end of Darwin* tests
7169 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007170 esac
7171 ;;
7172
7173*)
7174 case $ac_sys_system in
7175 OpenUNIX*|UnixWare*)
7176 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7177 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007178 SCO_SV*)
7179 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7180 ;;
7181 esac
7182 ;;
7183esac
7184
Zachary Ware5af85642015-12-21 12:09:17 -06007185# ICC needs -fp-model strict or floats behave badly
7186case "$CC" in
7187*icc*)
7188 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7189 ;;
7190esac
7191
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007192if test "$Py_DEBUG" = 'true'; then
7193 :
7194else
7195 OPT="-DNDEBUG $OPT"
7196fi
7197
7198if test "$ac_arch_flags"
7199then
7200 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7201fi
7202
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007203# On some compilers, pthreads are available without further options
7204# (e.g. MacOS X). On some of these systems, the compiler will not
7205# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7206# So we have to see first whether pthreads are available without
7207# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7209$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007210if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007212else
Matthias Kloseb9621712010-04-24 17:59:49 +00007213 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007214 ac_cv_pthread_is_default=no
7215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007217/* end confdefs.h. */
7218
Stefan Krah7dba5942012-11-22 22:49:11 +01007219#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007220#include <pthread.h>
7221
7222void* routine(void* p){return NULL;}
7223
7224int main(){
7225 pthread_t p;
7226 if(pthread_create(&p,NULL,routine,NULL)!=0)
7227 return 1;
7228 (void)pthread_detach(p);
7229 return 0;
7230}
7231
7232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007233if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007234
7235 ac_cv_pthread_is_default=yes
7236 ac_cv_kthread=no
7237 ac_cv_pthread=no
7238
7239else
Matthias Kloseb9621712010-04-24 17:59:49 +00007240 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007244fi
7245
7246
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247fi
7248
Matthias Kloseb9621712010-04-24 17:59:49 +00007249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7250$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007251
7252
7253if test $ac_cv_pthread_is_default = yes
7254then
7255 ac_cv_kpthread=no
7256else
7257# -Kpthread, if available, provides the right #defines
7258# and linker options to make pthread_create available
7259# Some compilers won't report that they do not support -Kpthread,
7260# so we need to run a program to see whether it really made the
7261# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7263$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007264if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007265 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266else
7267 ac_save_cc="$CC"
7268CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007269if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007270 ac_cv_kpthread=no
7271else
Matthias Kloseb9621712010-04-24 17:59:49 +00007272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007273/* end confdefs.h. */
7274
Stefan Krah7dba5942012-11-22 22:49:11 +01007275#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007276#include <pthread.h>
7277
7278void* routine(void* p){return NULL;}
7279
7280int main(){
7281 pthread_t p;
7282 if(pthread_create(&p,NULL,routine,NULL)!=0)
7283 return 1;
7284 (void)pthread_detach(p);
7285 return 0;
7286}
7287
7288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007289if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290 ac_cv_kpthread=yes
7291else
Matthias Kloseb9621712010-04-24 17:59:49 +00007292 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7295 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296fi
7297
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298CC="$ac_save_cc"
7299fi
7300
Matthias Kloseb9621712010-04-24 17:59:49 +00007301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7302$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007303fi
7304
7305if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7306then
7307# -Kthread, if available, provides the right #defines
7308# and linker options to make pthread_create available
7309# Some compilers won't report that they do not support -Kthread,
7310# so we need to run a program to see whether it really made the
7311# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7313$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007314if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316else
7317 ac_save_cc="$CC"
7318CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007319if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320 ac_cv_kthread=no
7321else
Matthias Kloseb9621712010-04-24 17:59:49 +00007322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007323/* end confdefs.h. */
7324
Stefan Krah7dba5942012-11-22 22:49:11 +01007325#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007326#include <pthread.h>
7327
7328void* routine(void* p){return NULL;}
7329
7330int main(){
7331 pthread_t p;
7332 if(pthread_create(&p,NULL,routine,NULL)!=0)
7333 return 1;
7334 (void)pthread_detach(p);
7335 return 0;
7336}
7337
7338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007339if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340 ac_cv_kthread=yes
7341else
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7345 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346fi
7347
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348CC="$ac_save_cc"
7349fi
7350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7352$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353fi
7354
7355if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7356then
7357# -pthread, if available, provides the right #defines
7358# and linker options to make pthread_create available
7359# Some compilers won't report that they do not support -pthread,
7360# so we need to run a program to see whether it really made the
7361# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7363$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007364if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007365 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366else
7367 ac_save_cc="$CC"
7368CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007369if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370 ac_cv_pthread=no
7371else
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373/* end confdefs.h. */
7374
Stefan Krah7dba5942012-11-22 22:49:11 +01007375#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376#include <pthread.h>
7377
7378void* routine(void* p){return NULL;}
7379
7380int main(){
7381 pthread_t p;
7382 if(pthread_create(&p,NULL,routine,NULL)!=0)
7383 return 1;
7384 (void)pthread_detach(p);
7385 return 0;
7386}
7387
7388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007389if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390 ac_cv_pthread=yes
7391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7395 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396fi
7397
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398CC="$ac_save_cc"
7399fi
7400
Matthias Kloseb9621712010-04-24 17:59:49 +00007401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7402$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403fi
7404
7405# If we have set a CC compiler flag for thread support then
7406# check if it works for CXX, too.
7407ac_cv_cxx_thread=no
7408if test ! -z "$CXX"
7409then
Matthias Kloseb9621712010-04-24 17:59:49 +00007410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7411$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007412ac_save_cxx="$CXX"
7413
7414if test "$ac_cv_kpthread" = "yes"
7415then
7416 CXX="$CXX -Kpthread"
7417 ac_cv_cxx_thread=yes
7418elif test "$ac_cv_kthread" = "yes"
7419then
7420 CXX="$CXX -Kthread"
7421 ac_cv_cxx_thread=yes
7422elif test "$ac_cv_pthread" = "yes"
7423then
7424 CXX="$CXX -pthread"
7425 ac_cv_cxx_thread=yes
7426fi
7427
7428if test $ac_cv_cxx_thread = yes
7429then
7430 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7431 $CXX -c conftest.$ac_ext 2>&5
7432 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7433 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7434 then
7435 ac_cv_cxx_thread=yes
7436 else
7437 ac_cv_cxx_thread=no
7438 fi
7439 rm -fr conftest*
7440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7442$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443fi
7444CXX="$ac_save_cxx"
7445
7446
7447# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7449$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007450if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452else
Matthias Kloseb9621712010-04-24 17:59:49 +00007453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454/* end confdefs.h. */
7455#include <stdlib.h>
7456#include <stdarg.h>
7457#include <string.h>
7458#include <float.h>
7459
7460int
7461main ()
7462{
7463
7464 ;
7465 return 0;
7466}
7467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007468if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469 ac_cv_header_stdc=yes
7470else
Matthias Kloseb9621712010-04-24 17:59:49 +00007471 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7474
7475if test $ac_cv_header_stdc = yes; then
7476 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478/* end confdefs.h. */
7479#include <string.h>
7480
7481_ACEOF
7482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007483 $EGREP "memchr" >/dev/null 2>&1; then :
7484
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485else
7486 ac_cv_header_stdc=no
7487fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007488rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489
7490fi
7491
7492if test $ac_cv_header_stdc = yes; then
7493 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495/* end confdefs.h. */
7496#include <stdlib.h>
7497
7498_ACEOF
7499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007500 $EGREP "free" >/dev/null 2>&1; then :
7501
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502else
7503 ac_cv_header_stdc=no
7504fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007505rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506
7507fi
7508
7509if test $ac_cv_header_stdc = yes; then
7510 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007511 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512 :
7513else
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515/* end confdefs.h. */
7516#include <ctype.h>
7517#include <stdlib.h>
7518#if ((' ' & 0x0FF) == 0x020)
7519# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7520# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7521#else
7522# define ISLOWER(c) \
7523 (('a' <= (c) && (c) <= 'i') \
7524 || ('j' <= (c) && (c) <= 'r') \
7525 || ('s' <= (c) && (c) <= 'z'))
7526# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7527#endif
7528
7529#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7530int
7531main ()
7532{
7533 int i;
7534 for (i = 0; i < 256; i++)
7535 if (XOR (islower (i), ISLOWER (i))
7536 || toupper (i) != TOUPPER (i))
7537 return 2;
7538 return 0;
7539}
7540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007541if ac_fn_c_try_run "$LINENO"; then :
7542
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543else
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548fi
7549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550fi
7551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7553$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554if test $ac_cv_header_stdc = yes; then
7555
Matthias Kloseb9621712010-04-24 17:59:49 +00007556$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557
7558fi
7559
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007560for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007561fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007562ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007563sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007564unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007565poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007566sys/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 +01007567sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007568sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007569sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007570sys/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 -07007571libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007572bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007573sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007574do :
7575 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7576ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007577if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007578 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007579#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007580_ACEOF
7581
7582fi
7583
Guido van Rossum627b2d71993-12-24 10:39:16 +00007584done
7585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007586ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007587for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007588 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7590$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007591if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007593else
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007595/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007596#include <sys/types.h>
7597#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007598
Martin v. Löwis11437992002-04-12 09:54:03 +00007599int
7600main ()
7601{
7602if ((DIR *) 0)
7603return 0;
7604 ;
7605 return 0;
7606}
7607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007608if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007609 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007610else
Matthias Kloseb9621712010-04-24 17:59:49 +00007611 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007615eval ac_res=\$$as_ac_Header
7616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7617$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007618if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007620#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007621_ACEOF
7622
7623ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007625
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007626done
7627# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7628if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7630$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007631if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007633else
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007638/* Override any GCC internal prototype to avoid an error.
7639 Use char because int might match the return type of a GCC
7640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007641#ifdef __cplusplus
7642extern "C"
7643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007644char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007645int
7646main ()
7647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 ;
7650 return 0;
7651}
7652_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653for ac_lib in '' dir; do
7654 if test -z "$ac_lib"; then
7655 ac_res="none required"
7656 else
7657 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007658 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007663rm -f core conftest.err conftest.$ac_objext \
7664 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007665 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668done
Victor Stinnere0be4232011-10-25 13:06:09 +02007669if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671else
7672 ac_cv_search_opendir=no
7673fi
7674rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007675LIBS=$ac_func_search_save_LIBS
7676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7678$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007680if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007682
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007683fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007684
Michael W. Hudson54241132001-12-07 15:38:26 +00007685else
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7687$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007688if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007690else
7691 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695/* Override any GCC internal prototype to avoid an error.
7696 Use char because int might match the return type of a GCC
7697 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007698#ifdef __cplusplus
7699extern "C"
7700#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007701char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007702int
7703main ()
7704{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 ;
7707 return 0;
7708}
7709_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710for ac_lib in '' x; do
7711 if test -z "$ac_lib"; then
7712 ac_res="none required"
7713 else
7714 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007715 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007720rm -f core conftest.err conftest.$ac_objext \
7721 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007722 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725done
Victor Stinnere0be4232011-10-25 13:06:09 +02007726if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728else
7729 ac_cv_search_opendir=no
7730fi
7731rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007732LIBS=$ac_func_search_save_LIBS
7733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7735$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007737if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007739
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007740fi
7741
7742fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007743
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7745$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007746if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007748else
Matthias Kloseb9621712010-04-24 17:59:49 +00007749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007750/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007751#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007752int
7753main ()
7754{
7755return makedev(0, 0);
7756 ;
7757 return 0;
7758}
7759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007761 ac_cv_header_sys_types_h_makedev=yes
7762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765rm -f core conftest.err conftest.$ac_objext \
7766 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007767
7768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7770$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007771
7772if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007773ac_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 +02007774if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007775
Matthias Kloseb9621712010-04-24 17:59:49 +00007776$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007777
7778fi
7779
7780
7781
7782 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 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 +02007784if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007785
Matthias Kloseb9621712010-04-24 17:59:49 +00007786$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007787
7788fi
7789
7790
7791 fi
7792fi
7793
Michael W. Hudson54241132001-12-07 15:38:26 +00007794
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007795# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7796for ac_header in net/if.h
7797do :
7798 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7799#ifdef STDC_HEADERS
7800# include <stdlib.h>
7801# include <stddef.h>
7802#else
7803# ifdef HAVE_STDLIB_H
7804# include <stdlib.h>
7805# endif
7806#endif
7807#ifdef HAVE_SYS_SOCKET_H
7808# include <sys/socket.h>
7809#endif
7810
7811"
Victor Stinnere0be4232011-10-25 13:06:09 +02007812if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007813 cat >>confdefs.h <<_ACEOF
7814#define HAVE_NET_IF_H 1
7815_ACEOF
7816
7817fi
7818
7819done
7820
7821
Martin v. Löwis11017b12006-01-14 18:12:57 +00007822# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007823for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007824do :
7825 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 +00007826#ifdef HAVE_ASM_TYPES_H
7827#include <asm/types.h>
7828#endif
7829#ifdef HAVE_SYS_SOCKET_H
7830#include <sys/socket.h>
7831#endif
7832
Matthias Kloseb9621712010-04-24 17:59:49 +00007833"
Victor Stinnere0be4232011-10-25 13:06:09 +02007834if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007835 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007836#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007837_ACEOF
7838
7839fi
7840
7841done
7842
7843
Charles-François Natali47413c12011-10-06 19:47:44 +02007844# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007845for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007846do :
7847 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7848ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7849#ifdef HAVE_SYS_SOCKET_H
7850#include <sys/socket.h>
7851#endif
7852
7853"
7854if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7855 cat >>confdefs.h <<_ACEOF
7856#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7857_ACEOF
7858
7859fi
7860
7861done
7862
7863
Guido van Rossum627b2d71993-12-24 10:39:16 +00007864# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007865was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7867$as_echo_n "checking for clock_t in time.h... " >&6; }
7868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007869/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007870#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007871
7872_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007875 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876else
Martin v. Löwis11437992002-04-12 09:54:03 +00007877
7878
Matthias Kloseb9621712010-04-24 17:59:49 +00007879$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007880
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007881
Guido van Rossum627b2d71993-12-24 10:39:16 +00007882fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007883rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007884
Matthias Kloseb9621712010-04-24 17:59:49 +00007885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7886$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007887
Matthias Kloseb9621712010-04-24 17:59:49 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7889$as_echo_n "checking for makedev... " >&6; }
7890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007891/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007892
Jesus Cea740f53a2010-04-28 11:35:30 +00007893#if defined(MAJOR_IN_MKDEV)
7894#include <sys/mkdev.h>
7895#elif defined(MAJOR_IN_SYSMACROS)
7896#include <sys/sysmacros.h>
7897#else
7898#include <sys/types.h>
7899#endif
7900
Neal Norwitz11690112002-07-30 01:08:28 +00007901int
7902main ()
7903{
Jesus Cea740f53a2010-04-28 11:35:30 +00007904
7905 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007906 ;
7907 return 0;
7908}
Matthias Kloseb159a552010-04-25 21:00:44 +00007909
Neal Norwitz11690112002-07-30 01:08:28 +00007910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007911if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007912 ac_cv_has_makedev=yes
7913else
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007916rm -f core conftest.err conftest.$ac_objext \
7917 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7919$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007920if test "$ac_cv_has_makedev" = "yes"; then
7921
Matthias Kloseb9621712010-04-24 17:59:49 +00007922$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007923
7924fi
7925
Christian Heimes985ecdc2013-11-20 11:46:18 +01007926# byte swapping
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7928$as_echo_n "checking for le64toh... " >&6; }
7929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7930/* end confdefs.h. */
7931
7932#ifdef HAVE_ENDIAN_H
7933#include <endian.h>
7934#elif defined(HAVE_SYS_ENDIAN_H)
7935#include <sys/endian.h>
7936#endif
7937
7938int
7939main ()
7940{
7941
7942 le64toh(1)
7943 ;
7944 return 0;
7945}
7946
7947_ACEOF
7948if ac_fn_c_try_link "$LINENO"; then :
7949 ac_cv_has_le64toh=yes
7950else
7951 ac_cv_has_le64toh=no
7952fi
7953rm -f core conftest.err conftest.$ac_objext \
7954 conftest$ac_exeext conftest.$ac_ext
7955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7956$as_echo "$ac_cv_has_le64toh" >&6; }
7957if test "$ac_cv_has_le64toh" = "yes"; then
7958
7959$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7960
7961fi
7962
Martin v. Löwis399a6892002-10-04 10:22:02 +00007963# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7964# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7965# defined, but the compiler does not support pragma redefine_extname,
7966# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7967# structures (such as rlimit64) without declaring them. As a
7968# work-around, disable LFS on such configurations
7969
7970use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7972$as_echo_n "checking Solaris LFS bug... " >&6; }
7973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007974/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007975
7976#define _LARGEFILE_SOURCE 1
7977#define _FILE_OFFSET_BITS 64
7978#include <sys/resource.h>
7979
Martin v. Löwis399a6892002-10-04 10:22:02 +00007980int
7981main ()
7982{
7983struct rlimit foo;
7984 ;
7985 return 0;
7986}
7987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007989 sol_lfs_bug=no
7990else
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7995$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007996if test "$sol_lfs_bug" = "yes"; then
7997 use_lfs=no
7998fi
7999
8000if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008001# Two defines needed to enable largefile support on various platforms
8002# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008003case $ac_sys_system/$ac_sys_release in
8004AIX*)
8005
8006$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8007
8008 ;;
8009esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008012
8013
Matthias Kloseb9621712010-04-24 17:59:49 +00008014$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008015
Martin v. Löwis399a6892002-10-04 10:22:02 +00008016fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008017
Guido van Rossum84e7b241996-08-19 21:59:00 +00008018# Add some code to confdefs.h so that the test for off_t works on SCO
8019cat >> confdefs.h <<\EOF
8020#if defined(SCO_DS)
8021#undef _OFF_T
8022#endif
8023EOF
8024
Guido van Rossumef2255b2000-03-10 22:30:29 +00008025# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008026ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008027if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008028
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008029else
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
8031cat >>confdefs.h <<_ACEOF
8032#define mode_t int
8033_ACEOF
8034
8035fi
8036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008038if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008040else
Martin v. Löwis11437992002-04-12 09:54:03 +00008041
8042cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008044_ACEOF
8045
8046fi
8047
Matthias Kloseb9621712010-04-24 17:59:49 +00008048ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008049if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008051else
Martin v. Löwis11437992002-04-12 09:54:03 +00008052
8053cat >>confdefs.h <<_ACEOF
8054#define pid_t int
8055_ACEOF
8056
8057fi
8058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008059
Martin v. Löwis11437992002-04-12 09:54:03 +00008060cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008061#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008062_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008065if test "x$ac_cv_type_size_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 size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008071_ACEOF
8072
8073fi
8074
Matthias Kloseb9621712010-04-24 17:59:49 +00008075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8076$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008077if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008079else
Matthias Kloseb9621712010-04-24 17:59:49 +00008080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008081/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008082#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008083
8084_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008087 ac_cv_type_uid_t=yes
8088else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008089 ac_cv_type_uid_t=no
8090fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008091rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008092
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8095$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008096if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008097
Matthias Kloseb9621712010-04-24 17:59:49 +00008098$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008099
8100
Matthias Kloseb9621712010-04-24 17:59:49 +00008101$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008102
8103fi
8104
Mark Dickinson983bc162012-12-02 12:11:38 +00008105
8106# There are two separate checks for each of the exact-width integer types we
8107# need. First we check whether the type is available using the usual
8108# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8109# and <stdint.h> where available). We then also use the special type checks of
8110# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8111# directly, #define's uint32_t to be a suitable type.
8112
8113ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8114if test "x$ac_cv_type_uint32_t" = xyes; then :
8115
8116$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8117
8118fi
8119
Matthias Kloseb9621712010-04-24 17:59:49 +00008120ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8121case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008122 no|yes) ;; #(
8123 *)
8124
Matthias Kloseb9621712010-04-24 17:59:49 +00008125$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008126
8127
8128cat >>confdefs.h <<_ACEOF
8129#define uint32_t $ac_cv_c_uint32_t
8130_ACEOF
8131;;
8132 esac
8133
Mark Dickinson983bc162012-12-02 12:11:38 +00008134
8135ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8136if test "x$ac_cv_type_uint64_t" = xyes; then :
8137
8138$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8139
8140fi
8141
Matthias Kloseb9621712010-04-24 17:59:49 +00008142ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8143case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008144 no|yes) ;; #(
8145 *)
8146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008148
8149
8150cat >>confdefs.h <<_ACEOF
8151#define uint64_t $ac_cv_c_uint64_t
8152_ACEOF
8153;;
8154 esac
8155
Mark Dickinson983bc162012-12-02 12:11:38 +00008156
8157ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8158if test "x$ac_cv_type_int32_t" = xyes; then :
8159
8160$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8161
8162fi
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8165case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008166 no|yes) ;; #(
8167 *)
8168
8169cat >>confdefs.h <<_ACEOF
8170#define int32_t $ac_cv_c_int32_t
8171_ACEOF
8172;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008173esac
8174
Mark Dickinson983bc162012-12-02 12:11:38 +00008175
8176ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8177if test "x$ac_cv_type_int64_t" = xyes; then :
8178
8179$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8180
8181fi
8182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8184case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008185 no|yes) ;; #(
8186 *)
8187
8188cat >>confdefs.h <<_ACEOF
8189#define int64_t $ac_cv_c_int64_t
8190_ACEOF
8191;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008192esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008193
Mark Dickinson983bc162012-12-02 12:11:38 +00008194
Matthias Kloseb9621712010-04-24 17:59:49 +00008195ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008196if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008199
8200fi
8201
Stefan Krah1919b7e2012-03-21 18:25:23 +01008202ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8203if test "x$ac_cv_type___uint128_t" = xyes; then :
8204
8205$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8206
8207fi
8208
Jack Jansendd19cf82001-12-06 22:36:17 +00008209
Michael W. Hudson54241132001-12-07 15:38:26 +00008210# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008211# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212# The cast to long int works around a bug in the HP C Compiler
8213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8215# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8217$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008218if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008220else
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 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 +00008222
Martin v. Löwis11437992002-04-12 09:54:03 +00008223else
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 if test "$ac_cv_type_int" = yes; then
8225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008227as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008228See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229 else
8230 ac_cv_sizeof_int=0
8231 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008233
Martin v. Löwis11437992002-04-12 09:54:03 +00008234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8236$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237
8238
8239
Martin v. Löwis11437992002-04-12 09:54:03 +00008240cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008241#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008242_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008243
8244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245# The cast to long int works around a bug in the HP C Compiler
8246# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8247# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8248# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8250$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008251if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008253else
Matthias Kloseb9621712010-04-24 17:59:49 +00008254 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 +00008255
Martin v. Löwis11437992002-04-12 09:54:03 +00008256else
Matthias Kloseb9621712010-04-24 17:59:49 +00008257 if test "$ac_cv_type_long" = yes; then
8258 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8259$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008260as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008261See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262 else
8263 ac_cv_sizeof_long=0
8264 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008266
Martin v. Löwis11437992002-04-12 09:54:03 +00008267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8269$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270
8271
8272
Martin v. Löwis11437992002-04-12 09:54:03 +00008273cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008274#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008275_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008276
8277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278# The cast to long int works around a bug in the HP C Compiler
8279# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8280# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8281# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8283$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008284if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008286else
Matthias Kloseb9621712010-04-24 17:59:49 +00008287 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 +00008288
Martin v. Löwis11437992002-04-12 09:54:03 +00008289else
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 if test "$ac_cv_type_void_p" = yes; then
8291 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8292$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008293as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008294See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295 else
8296 ac_cv_sizeof_void_p=0
8297 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008299
Martin v. Löwis11437992002-04-12 09:54:03 +00008300fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8302$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303
8304
8305
Martin v. Löwis11437992002-04-12 09:54:03 +00008306cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008307#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008308_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008309
8310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311# The cast to long int works around a bug in the HP C Compiler
8312# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8313# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8314# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8316$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008317if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008319else
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 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 +00008321
Martin v. Löwis11437992002-04-12 09:54:03 +00008322else
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 if test "$ac_cv_type_short" = yes; then
8324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008326as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008327See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328 else
8329 ac_cv_sizeof_short=0
8330 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332
Martin v. Löwis11437992002-04-12 09:54:03 +00008333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8335$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336
8337
8338
Martin v. Löwis11437992002-04-12 09:54:03 +00008339cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008340#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008341_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008342
8343
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008344# The cast to long int works around a bug in the HP C Compiler
8345# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8346# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8347# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8349$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008350if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008352else
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 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 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355else
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 if test "$ac_cv_type_float" = yes; then
8357 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8358$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008359as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008360See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361 else
8362 ac_cv_sizeof_float=0
8363 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008365
Martin v. Löwis11437992002-04-12 09:54:03 +00008366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8368$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369
8370
8371
Martin v. Löwis11437992002-04-12 09:54:03 +00008372cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008373#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008374_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008375
8376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377# The cast to long int works around a bug in the HP C Compiler
8378# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8379# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8380# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8382$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008383if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008385else
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 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 +00008387
Martin v. Löwis11437992002-04-12 09:54:03 +00008388else
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 if test "$ac_cv_type_double" = yes; then
8390 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008392as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008393See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394 else
8395 ac_cv_sizeof_double=0
8396 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8401$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402
8403
8404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008406#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008408
8409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410# The cast to long int works around a bug in the HP C Compiler
8411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8413# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8415$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008416if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008418else
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 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 +00008420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421else
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 if test "$ac_cv_type_fpos_t" = yes; then
8423 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008425as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008426See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427 else
8428 ac_cv_sizeof_fpos_t=0
8429 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8434$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435
8436
8437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008439#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008440_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008441
Michael W. Hudson54241132001-12-07 15:38:26 +00008442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443# The cast to long int works around a bug in the HP C Compiler
8444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8446# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8448$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008449if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 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 +00008453
Martin v. Löwis18e16552006-02-15 17:27:45 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 if test "$ac_cv_type_size_t" = yes; then
8456 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008458as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008459See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460 else
8461 ac_cv_sizeof_size_t=0
8462 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008464
Martin v. Löwis18e16552006-02-15 17:27:45 +00008465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8467$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468
8469
8470
Martin v. Löwis18e16552006-02-15 17:27:45 +00008471cat >>confdefs.h <<_ACEOF
8472#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8473_ACEOF
8474
8475
Christian Heimes400adb02008-02-01 08:12:03 +00008476# The cast to long int works around a bug in the HP C Compiler
8477# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8478# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8479# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8481$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008482if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008484else
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 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 +00008486
Christian Heimes400adb02008-02-01 08:12:03 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 if test "$ac_cv_type_pid_t" = yes; then
8489 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008491as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008492See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008493 else
8494 ac_cv_sizeof_pid_t=0
8495 fi
8496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008497
Christian Heimes400adb02008-02-01 08:12:03 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8500$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008501
8502
8503
8504cat >>confdefs.h <<_ACEOF
8505#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8506_ACEOF
8507
8508
Michael W. Hudson54241132001-12-07 15:38:26 +00008509
Matthias Kloseb9621712010-04-24 17:59:49 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8511$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008512have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008514/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516int
8517main ()
8518{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008519long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ;
8521 return 0;
8522}
8523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008525
8526
Matthias Kloseb9621712010-04-24 17:59:49 +00008527$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008528
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008529 have_long_long=yes
8530
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8534$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008535if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 long long" >&5
8541$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008542if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008544else
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008546
Martin v. Löwis11437992002-04-12 09:54:03 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 if test "$ac_cv_type_long_long" = 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 (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008552See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553 else
8554 ac_cv_sizeof_long_long=0
8555 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008557
Martin v. Löwis11437992002-04-12 09:54:03 +00008558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8560$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561
8562
8563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008565#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008566_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008567
Michael W. Hudson54241132001-12-07 15:38:26 +00008568
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008569fi
8570
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8572$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008573have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008575/* end confdefs.h. */
8576
8577int
8578main ()
8579{
8580long double x; x = (long double)0;
8581 ;
8582 return 0;
8583}
8584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008585if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008586
8587
Matthias Kloseb9621712010-04-24 17:59:49 +00008588$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008589
8590 have_long_double=yes
8591
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008592fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8595$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008596if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008597# The cast to long int works around a bug in the HP C Compiler
8598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8600# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8602$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008603if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008605else
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 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 +00008607
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 if test "$ac_cv_type_long_double" = yes; then
8610 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008612as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008613See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008614 else
8615 ac_cv_sizeof_long_double=0
8616 fi
8617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008618
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8621$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008622
8623
8624
8625cat >>confdefs.h <<_ACEOF
8626#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8627_ACEOF
8628
8629
8630fi
8631
8632
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8634$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008635have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008637/* end confdefs.h. */
8638
8639int
8640main ()
8641{
8642_Bool x; x = (_Bool)0;
8643 ;
8644 return 0;
8645}
8646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008647if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008648
8649
Matthias Kloseb9621712010-04-24 17:59:49 +00008650$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008651
8652 have_c99_bool=yes
8653
Thomas Woutersb2137042007-02-01 18:02:27 +00008654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8657$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008658if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659# The cast to long int works around a bug in the HP C Compiler
8660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8662# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8664$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008665if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008667else
Matthias Kloseb9621712010-04-24 17:59:49 +00008668 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 +00008669
Thomas Woutersb2137042007-02-01 18:02:27 +00008670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 if test "$ac_cv_type__Bool" = yes; then
8672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008674as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008675See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676 else
8677 ac_cv_sizeof__Bool=0
8678 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008680
Thomas Woutersb2137042007-02-01 18:02:27 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8683$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684
8685
8686
Thomas Woutersb2137042007-02-01 18:02:27 +00008687cat >>confdefs.h <<_ACEOF
8688#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8689_ACEOF
8690
8691
8692fi
8693
Matthias Kloseb9621712010-04-24 17:59:49 +00008694ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008695 #include <stdint.h>
8696 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008697 #ifdef HAVE_INTTYPES_H
8698 #include <inttypes.h>
8699 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008700"
Victor Stinnere0be4232011-10-25 13:06:09 +02008701if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008702
8703cat >>confdefs.h <<_ACEOF
8704#define HAVE_UINTPTR_T 1
8705_ACEOF
8706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707# The cast to long int works around a bug in the HP C Compiler
8708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8710# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8712$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008713if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008715else
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 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 +00008717
Martin v. Löwis11437992002-04-12 09:54:03 +00008718else
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 if test "$ac_cv_type_uintptr_t" = yes; then
8720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008722as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008723See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724 else
8725 ac_cv_sizeof_uintptr_t=0
8726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728
Martin v. Löwis11437992002-04-12 09:54:03 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8731$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732
8733
8734
Martin v. Löwis11437992002-04-12 09:54:03 +00008735cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008736#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008737_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008738
Michael W. Hudson54241132001-12-07 15:38:26 +00008739
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008740fi
8741
Thomas Wouters89f507f2006-12-13 04:49:30 +00008742
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008743# The cast to long int works around a bug in the HP C Compiler
8744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8746# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8748$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008749if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008751else
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008753#ifdef HAVE_SYS_TYPES_H
8754#include <sys/types.h>
8755#endif
8756
Matthias Kloseb9621712010-04-24 17:59:49 +00008757"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008758
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 if test "$ac_cv_type_off_t" = yes; then
8761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008763as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008764See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008765 else
8766 ac_cv_sizeof_off_t=0
8767 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8772$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008773
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774
8775
Martin v. Löwis11437992002-04-12 09:54:03 +00008776cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008777#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008778_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008779
Michael W. Hudson54241132001-12-07 15:38:26 +00008780
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008781
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8783$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008784if test "$have_long_long" = yes
8785then
8786if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008787 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008788
Matthias Kloseb9621712010-04-24 17:59:49 +00008789$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008790
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8792$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8795$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008796fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008797else
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8799$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008800fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008801
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008802# The cast to long int works around a bug in the HP C Compiler
8803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8805# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8807$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008808if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008810else
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008812#ifdef HAVE_SYS_TYPES_H
8813#include <sys/types.h>
8814#endif
8815#ifdef HAVE_TIME_H
8816#include <time.h>
8817#endif
8818
Matthias Kloseb9621712010-04-24 17:59:49 +00008819"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008820
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008821else
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 if test "$ac_cv_type_time_t" = yes; then
8823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008825as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008826See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827 else
8828 ac_cv_sizeof_time_t=0
8829 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8834$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008835
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008836
8837
Martin v. Löwis11437992002-04-12 09:54:03 +00008838cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008839#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008840_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008841
Michael W. Hudson54241132001-12-07 15:38:26 +00008842
8843
Trent Mick635f6fb2000-08-23 21:33:05 +00008844# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008845ac_save_cc="$CC"
8846if test "$ac_cv_kpthread" = "yes"
8847then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008848elif test "$ac_cv_kthread" = "yes"
8849then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850elif test "$ac_cv_pthread" = "yes"
8851then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008852fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008853
Matthias Kloseb9621712010-04-24 17:59:49 +00008854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8855$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008856have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008859
8860 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008861int
8862main ()
8863{
Guido van Rossum12580492000-09-24 16:47:19 +00008864pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 ;
8866 return 0;
8867}
Matthias Kloseb159a552010-04-25 21:00:44 +00008868
Martin v. Löwis11437992002-04-12 09:54:03 +00008869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008870if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008871 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8875$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008876if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8880# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8882$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008883if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008885else
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008887#ifdef HAVE_PTHREAD_H
8888#include <pthread.h>
8889#endif
8890
Matthias Kloseb9621712010-04-24 17:59:49 +00008891"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 if test "$ac_cv_type_pthread_t" = yes; then
8895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008897as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008898See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008899 else
8900 ac_cv_sizeof_pthread_t=0
8901 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903
Trent Mick635f6fb2000-08-23 21:33:05 +00008904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8906$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908
8909
Martin v. Löwis11437992002-04-12 09:54:03 +00008910cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008911#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008912_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008913
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008914
Trent Mick635f6fb2000-08-23 21:33:05 +00008915fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008916CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008917
Michael W. Hudson54241132001-12-07 15:38:26 +00008918
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008919case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008920 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008921 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8922 ;;
8923 Darwin/*)
8924 OTHER_LIBTOOL_OPT=""
8925 ;;
8926esac
8927
8928
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008929
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008930case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008931 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008932 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8933 if test "${enable_universalsdk}"; then
8934 :
8935 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008936 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008937 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008938 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008939 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008940 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008941 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008942 if test ${gcc_version} '<' 4.0
8943 then
8944 LIBTOOL_CRUFT="-lcc_dynamic"
8945 else
8946 LIBTOOL_CRUFT=""
8947 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008949 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008950else
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008952/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008953
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008954 #include <unistd.h>
8955 int main(int argc, char*argv[])
8956 {
8957 if (sizeof(long) == 4) {
8958 return 0;
8959 } else {
8960 return 1;
8961 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008962 }
8963
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008965if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008966 ac_osx_32bit=yes
8967else
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008972fi
8973
8974
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008975 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008976 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008977 i386)
8978 MACOSX_DEFAULT_ARCH="i386"
8979 ;;
8980 ppc)
8981 MACOSX_DEFAULT_ARCH="ppc"
8982 ;;
8983 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008984 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008985 ;;
8986 esac
8987 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008988 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008989 i386)
8990 MACOSX_DEFAULT_ARCH="x86_64"
8991 ;;
8992 ppc)
8993 MACOSX_DEFAULT_ARCH="ppc64"
8994 ;;
8995 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008996 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997 ;;
8998 esac
8999
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009000 fi
9001
9002 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009003 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009004 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009005esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9007$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009008if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009009then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009010 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009012 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009013
Matthias Kloseb9621712010-04-24 17:59:49 +00009014$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9017$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009018 if test $enable_shared = "yes"
9019 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009020 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 +00009021 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009022else
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9024$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009025fi
9026
Matthias Kloseb9621712010-04-24 17:59:49 +00009027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9028$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009029case $ac_sys_system/$ac_sys_release in
9030 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009031
Matthias Kloseb9621712010-04-24 17:59:49 +00009032$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009033
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9035$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009036 ;;
9037 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009040 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009041esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009042
Guido van Rossum0a516c91994-09-12 10:58:40 +00009043# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009044
Michael W. Hudson54241132001-12-07 15:38:26 +00009045
9046
9047
9048
Benjamin Peterson99f03762010-04-11 22:15:28 +00009049
Thomas Wouters477c8d52006-05-27 19:21:47 +00009050
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009051# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9052# -- usually .so, .sl on HP-UX, .dll on Cygwin
9053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9054$as_echo_n "checking the extension of shared libraries... " >&6; }
9055if test -z "$SHLIB_SUFFIX"; then
9056 case $ac_sys_system in
9057 hp*|HP*)
9058 case `uname -m` in
9059 ia64) SHLIB_SUFFIX=.so;;
9060 *) SHLIB_SUFFIX=.sl;;
9061 esac
9062 ;;
9063 CYGWIN*) SHLIB_SUFFIX=.dll;;
9064 *) SHLIB_SUFFIX=.so;;
9065 esac
9066fi
9067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9068$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009069
Guido van Rossum0a516c91994-09-12 10:58:40 +00009070# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009071# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009072# (Shared libraries in this instance are shared modules to be loaded into
9073# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9075$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009076if test -z "$LDSHARED"
9077then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009078 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009079 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009080 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009081 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009082 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009083 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009084 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009086 if test "$GCC" = "yes" ; then
9087 LDSHARED='$(CC) -shared'
9088 LDCXXSHARED='$(CXX) -shared'
9089 else
9090 LDSHARED='$(CC) -G'
9091 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009092 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009093 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009094 if test "$GCC" = "yes" ; then
9095 LDSHARED='$(CC) -shared'
9096 LDCXXSHARED='$(CXX) -shared'
9097 else
9098 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009099 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009100 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009101 LDSHARED='$(CC) -bundle'
9102 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009103 if test "$enable_framework" ; then
9104 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009105 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9106 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009107 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009108 else
9109 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009110 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009111 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009112 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009113 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009114 LDSHARED='$(CC) -bundle'
9115 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009116 if test "$enable_framework" ; then
9117 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009118 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9119 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009120 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009121 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009122 # No framework, use the Python app as bundle-loader
9123 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009124 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009125 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009126 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009127 Darwin/*)
9128 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9129 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009130
Ned Deily36820b62014-06-25 13:44:22 -07009131 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9132 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9133 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9134 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9135 if test ${dep_target_major} -eq 10 && \
9136 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009137 then
Ned Deily36820b62014-06-25 13:44:22 -07009138 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009139 LDSHARED='$(CC) -bundle'
9140 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009141 if test "$enable_framework" ; then
9142 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009143 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9144 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009145 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009146 else
9147 # No framework, use the Python app as bundle-loader
9148 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9149 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009150 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009151 fi
Ned Deily36820b62014-06-25 13:44:22 -07009152 else
9153 # building for OS X 10.3 and later
9154 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9155 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9156 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009157 fi
9158 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009159 Linux*|GNU*|QNX*)
9160 LDSHARED='$(CC) -shared'
9161 LDCXXSHARED='$(CXX) -shared';;
9162 BSD/OS*/4*)
9163 LDSHARED="gcc -shared"
9164 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009165 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009166 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009167 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009168 LDSHARED='$(CC) -shared'
9169 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009170 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009171 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009172 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009173 OpenBSD*)
9174 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9175 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009176 LDSHARED='$(CC) -shared $(CCSHARED)'
9177 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009178 else
9179 case `uname -r` in
9180 [01].* | 2.[0-7] | 2.[0-7].*)
9181 LDSHARED="ld -Bshareable ${LDFLAGS}"
9182 ;;
9183 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009184 LDSHARED='$(CC) -shared $(CCSHARED)'
9185 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009186 ;;
9187 esac
9188 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009189 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009190 LDSHARED='$(CC) -shared'
9191 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009192 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009193 if test "$GCC" = "yes" ; then
9194 LDSHARED='$(CC) -shared'
9195 LDCXXSHARED='$(CXX) -shared'
9196 else
9197 LDSHARED='$(CC) -G'
9198 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009199 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009200 SCO_SV*)
9201 LDSHARED='$(CC) -Wl,-G,-Bexport'
9202 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9203 CYGWIN*)
9204 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9205 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009206 *) LDSHARED="ld";;
9207 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9210$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009211LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009212BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009213# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009214# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9216$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009217if test -z "$CCSHARED"
9218then
Guido van Rossum07397971997-04-29 21:49:50 +00009219 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009220 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009221 then CCSHARED="-fPIC";
9222 elif test `uname -p` = sparc;
9223 then CCSHARED="-xcode=pic32";
9224 else CCSHARED="-Kpic";
9225 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009226 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009227 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009228 else CCSHARED="+z";
9229 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009230 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009231 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009232 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009233 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009234 if test "$GCC" = "yes"
9235 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009236 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009237 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009238 SCO_SV*)
9239 if test "$GCC" = "yes"
9240 then CCSHARED="-fPIC"
9241 else CCSHARED="-Kpic -belf"
9242 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009243 IRIX*/6*) case $CC in
9244 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009245 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009246 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009247 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9250$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009251# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009252# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9254$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009255if test -z "$LINKFORSHARED"
9256then
Guido van Rossum07397971997-04-29 21:49:50 +00009257 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009258 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009259 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009260 LINKFORSHARED="-Wl,-E -Wl,+s";;
9261# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009262 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009263 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009264 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009265 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009266 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009267
9268 # Issue #18075: the default maximum stack size (8MBytes) is too
9269 # small for the default recursion limit. Increase the stack size
9270 # to ensure that tests don't crash
9271 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9272
Jack Jansene578a632001-08-15 01:27:14 +00009273 if test "$enable_framework"
9274 then
Jack Jansenda49e192005-01-07 13:08:22 +00009275 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009276 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009277 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009278 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009279 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009280 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009281 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009282 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9283 then
9284 LINKFORSHARED="-Wl,--export-dynamic"
9285 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009286 SunOS/5*) case $CC in
9287 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009288 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009289 then
9290 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009291 fi;;
9292 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009293 CYGWIN*)
9294 if test $enable_shared = "no"
9295 then
9296 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9297 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009298 QNX*)
9299 # -Wl,-E causes the symbols to be added to the dynamic
9300 # symbol table so that they can be found when a module
9301 # is loaded. -N 2048K causes the stack size to be set
9302 # to 2048 kilobytes so that the stack doesn't overflow
9303 # when running test_compile.py.
9304 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009305 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9308$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009309
Michael W. Hudson54241132001-12-07 15:38:26 +00009310
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9313$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009314if test ! "$LIBRARY" = "$LDLIBRARY"
9315then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009316 case $ac_sys_system in
9317 CYGWIN*)
9318 # Cygwin needs CCSHARED when building extension DLLs
9319 # but not when building the interpreter DLL.
9320 CFLAGSFORSHARED='';;
9321 *)
9322 CFLAGSFORSHARED='$(CCSHARED)'
9323 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9326$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009327
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009328# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9329# library (with --enable-shared).
9330# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009331# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9332# if it is not required, since it creates a dependency of the shared library
9333# to LIBS. This, in turn, means that applications linking the shared libpython
9334# don't need to link LIBS explicitly. The default should be only changed
9335# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009336
Matthias Kloseb9621712010-04-24 17:59:49 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9338$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009339case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009340 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009341 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009342esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9344$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009345
9346
Guido van Rossum627b2d71993-12-24 10:39:16 +00009347# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9349$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009350if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009351 $as_echo_n "(cached) " >&6
9352else
9353 ac_check_lib_save_LIBS=$LIBS
9354LIBS="-lsendfile $LIBS"
9355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9356/* end confdefs.h. */
9357
9358/* Override any GCC internal prototype to avoid an error.
9359 Use char because int might match the return type of a GCC
9360 builtin and then its argument prototype would still apply. */
9361#ifdef __cplusplus
9362extern "C"
9363#endif
9364char sendfile ();
9365int
9366main ()
9367{
9368return sendfile ();
9369 ;
9370 return 0;
9371}
9372_ACEOF
9373if ac_fn_c_try_link "$LINENO"; then :
9374 ac_cv_lib_sendfile_sendfile=yes
9375else
9376 ac_cv_lib_sendfile_sendfile=no
9377fi
9378rm -f core conftest.err conftest.$ac_objext \
9379 conftest$ac_exeext conftest.$ac_ext
9380LIBS=$ac_check_lib_save_LIBS
9381fi
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9383$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009384if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009385 cat >>confdefs.h <<_ACEOF
9386#define HAVE_LIBSENDFILE 1
9387_ACEOF
9388
9389 LIBS="-lsendfile $LIBS"
9390
9391fi
9392
Matthias Kloseb9621712010-04-24 17:59:49 +00009393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9394$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009395if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009396 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009397else
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009399LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009403/* Override any GCC internal prototype to avoid an error.
9404 Use char because int might match the return type of a GCC
9405 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009406#ifdef __cplusplus
9407extern "C"
9408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009409char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009410int
9411main ()
9412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 ;
9415 return 0;
9416}
9417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009418if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009420else
Matthias Kloseb9621712010-04-24 17:59:49 +00009421 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009423rm -f core conftest.err conftest.$ac_objext \
9424 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009425LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9428$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009429if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 cat >>confdefs.h <<_ACEOF
9431#define HAVE_LIBDL 1
9432_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009433
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009434 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009435
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009436fi
9437 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9439$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009440if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009441 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009442else
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009444LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448/* Override any GCC internal prototype to avoid an error.
9449 Use char because int might match the return type of a GCC
9450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009451#ifdef __cplusplus
9452extern "C"
9453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009454char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009455int
9456main ()
9457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009458return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 ;
9460 return 0;
9461}
9462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009465else
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009468rm -f core conftest.err conftest.$ac_objext \
9469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009470LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9473$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009474if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 cat >>confdefs.h <<_ACEOF
9476#define HAVE_LIBDLD 1
9477_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009478
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009479 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009481fi
9482 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9484$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9485if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9486 $as_echo_n "(cached) " >&6
9487else
9488 ac_check_lib_save_LIBS=$LIBS
9489LIBS="-lcrypto $LIBS"
9490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9491/* end confdefs.h. */
9492
9493/* Override any GCC internal prototype to avoid an error.
9494 Use char because int might match the return type of a GCC
9495 builtin and then its argument prototype would still apply. */
9496#ifdef __cplusplus
9497extern "C"
9498#endif
9499char RAND_egd ();
9500int
9501main ()
9502{
9503return RAND_egd ();
9504 ;
9505 return 0;
9506}
9507_ACEOF
9508if ac_fn_c_try_link "$LINENO"; then :
9509 ac_cv_lib_crypto_RAND_egd=yes
9510else
9511 ac_cv_lib_crypto_RAND_egd=no
9512fi
9513rm -f core conftest.err conftest.$ac_objext \
9514 conftest$ac_exeext conftest.$ac_ext
9515LIBS=$ac_check_lib_save_LIBS
9516fi
9517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9518$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9519if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9520
9521$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9522
9523fi
9524
Martin v. Löwis519adae2003-09-20 10:47:47 +00009525
Georg Brandlb1441c72009-01-03 22:33:39 +00009526# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009527if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9529$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009530if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009531 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009532else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009533 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537/* Override any GCC internal prototype to avoid an error.
9538 Use char because int might match the return type of a GCC
9539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009540#ifdef __cplusplus
9541extern "C"
9542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009543char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009544int
9545main ()
9546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ;
9549 return 0;
9550}
9551_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009552for ac_lib in '' pthread rt posix4; do
9553 if test -z "$ac_lib"; then
9554 ac_res="none required"
9555 else
9556 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009557 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009562rm -f core conftest.err conftest.$ac_objext \
9563 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009564 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567done
Victor Stinnere0be4232011-10-25 13:06:09 +02009568if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570else
9571 ac_cv_search_sem_init=no
9572fi
9573rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009574LIBS=$ac_func_search_save_LIBS
9575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9577$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009579if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009581
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009582fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009583 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009584 # posix4 on Solaris 2.6
9585 # pthread (first!) on Linux
9586fi
9587
Martin v. Löwis19d17342003-06-14 21:03:05 +00009588# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9590$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009591if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009593else
9594 ac_check_lib_save_LIBS=$LIBS
9595LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009597/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599/* Override any GCC internal prototype to avoid an error.
9600 Use char because int might match the return type of a GCC
9601 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009602#ifdef __cplusplus
9603extern "C"
9604#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009605char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009606int
9607main ()
9608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009610 ;
9611 return 0;
9612}
9613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009615 ac_cv_lib_intl_textdomain=yes
9616else
Matthias Kloseb9621712010-04-24 17:59:49 +00009617 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009619rm -f core conftest.err conftest.$ac_objext \
9620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009621LIBS=$ac_check_lib_save_LIBS
9622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9624$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009625if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009626
Matthias Kloseb9621712010-04-24 17:59:49 +00009627$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009628
Brett Cannonc6d936e2009-06-07 20:09:53 +00009629 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630fi
9631
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009632
9633# checks for system dependent C++ extensions support
9634case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009635 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9636$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009638/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009639
Georg Brandl59e87bd2011-02-15 19:48:59 +00009640 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009641int
9642main ()
9643{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009644loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ;
9646 return 0;
9647}
Matthias Kloseb159a552010-04-25 21:00:44 +00009648
Martin v. Löwis11437992002-04-12 09:54:03 +00009649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009650if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009651
Matthias Kloseb159a552010-04-25 21:00:44 +00009652
Matthias Kloseb9621712010-04-24 17:59:49 +00009653$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009654
Matthias Kloseb159a552010-04-25 21:00:44 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009656$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009657
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009658else
Matthias Kloseb159a552010-04-25 21:00:44 +00009659
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009661$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009662
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009664rm -f core conftest.err conftest.$ac_objext \
9665 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009666 *) ;;
9667esac
9668
Christian Heimes985ecdc2013-11-20 11:46:18 +01009669# check for systems that require aligned memory access
9670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9671$as_echo_n "checking aligned memory access is required... " >&6; }
9672if test "$cross_compiling" = yes; then :
9673 aligned_required=yes
9674else
9675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9676/* end confdefs.h. */
9677
9678int main()
9679{
9680 char s[16];
9681 int i, *p1, *p2;
9682 for (i=0; i < 16; i++)
9683 s[i] = i;
9684 p1 = (int*)(s+1);
9685 p2 = (int*)(s+2);
9686 if (*p1 == *p2)
9687 return 1;
9688 return 0;
9689}
9690
9691_ACEOF
9692if ac_fn_c_try_run "$LINENO"; then :
9693 aligned_required=no
9694else
9695 aligned_required=yes
9696fi
9697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9698 conftest.$ac_objext conftest.beam conftest.$ac_ext
9699fi
9700
9701
9702if test "$aligned_required" = yes ; then
9703
9704$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9705
9706fi
9707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9708$as_echo "$aligned_required" >&6; }
9709
9710
9711# str, bytes and memoryview hash algorithm
9712
9713
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9715$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9716
9717# Check whether --with-hash_algorithm was given.
9718if test "${with_hash_algorithm+set}" = set; then :
9719 withval=$with_hash_algorithm;
9720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9721$as_echo "$withval" >&6; }
9722case "$withval" in
9723 siphash24)
9724 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9725
9726 ;;
9727 fnv)
9728 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9729
9730 ;;
9731 *)
9732 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9733 ;;
9734esac
9735
9736else
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9738$as_echo "default" >&6; }
9739fi
9740
9741
Charles-François Natalid30b0222014-05-08 23:08:51 +01009742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9743$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9744
9745# Check whether --with-address_sanitizer was given.
9746if test "${with_address_sanitizer+set}" = set; then :
9747 withval=$with_address_sanitizer;
9748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9749$as_echo "$withval" >&6; }
9750BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9751LDFLAGS="-fsanitize=address $LDFLAGS"
9752
9753else
9754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9755$as_echo "no" >&6; }
9756fi
9757
9758
Guido van Rossum70c7f481998-03-26 18:44:10 +00009759# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9761$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009762if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009763 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009764else
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009766LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770/* Override any GCC internal prototype to avoid an error.
9771 Use char because int might match the return type of a GCC
9772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009773#ifdef __cplusplus
9774extern "C"
9775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009776char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009777int
9778main ()
9779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ;
9782 return 0;
9783}
9784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009787else
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009790rm -f core conftest.err conftest.$ac_objext \
9791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009792LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9795$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009796if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009797 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009798fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009799 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9801$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009802if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009804else
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009806LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810/* Override any GCC internal prototype to avoid an error.
9811 Use char because int might match the return type of a GCC
9812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009813#ifdef __cplusplus
9814extern "C"
9815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009816char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009817int
9818main ()
9819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ;
9822 return 0;
9823}
9824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009825if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009827else
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009830rm -f core conftest.err conftest.$ac_objext \
9831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009832LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9835$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009836if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009837 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009838fi
9839 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009840
Matthias Kloseb9621712010-04-24 17:59:49 +00009841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9842$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009845if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9848$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009849LIBS="$withval $LIBS"
9850
9851else
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854fi
9855
Guido van Rossum7f43da71994-08-01 12:15:30 +00009856
Victor Stinner8291b5e2015-03-20 16:03:14 +01009857
9858
9859
9860
9861
9862
9863
9864if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9865 if test -n "$ac_tool_prefix"; then
9866 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9867set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9869$as_echo_n "checking for $ac_word... " >&6; }
9870if ${ac_cv_path_PKG_CONFIG+:} false; then :
9871 $as_echo_n "(cached) " >&6
9872else
9873 case $PKG_CONFIG in
9874 [\\/]* | ?:[\\/]*)
9875 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9876 ;;
9877 *)
9878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9879for as_dir in $PATH
9880do
9881 IFS=$as_save_IFS
9882 test -z "$as_dir" && as_dir=.
9883 for ac_exec_ext in '' $ac_executable_extensions; do
9884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9885 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9887 break 2
9888 fi
9889done
9890 done
9891IFS=$as_save_IFS
9892
9893 ;;
9894esac
9895fi
9896PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9897if test -n "$PKG_CONFIG"; then
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9899$as_echo "$PKG_CONFIG" >&6; }
9900else
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9902$as_echo "no" >&6; }
9903fi
9904
9905
9906fi
9907if test -z "$ac_cv_path_PKG_CONFIG"; then
9908 ac_pt_PKG_CONFIG=$PKG_CONFIG
9909 # Extract the first word of "pkg-config", so it can be a program name with args.
9910set dummy pkg-config; ac_word=$2
9911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9912$as_echo_n "checking for $ac_word... " >&6; }
9913if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9914 $as_echo_n "(cached) " >&6
9915else
9916 case $ac_pt_PKG_CONFIG in
9917 [\\/]* | ?:[\\/]*)
9918 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9919 ;;
9920 *)
9921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9922for as_dir in $PATH
9923do
9924 IFS=$as_save_IFS
9925 test -z "$as_dir" && as_dir=.
9926 for ac_exec_ext in '' $ac_executable_extensions; do
9927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9928 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9930 break 2
9931 fi
9932done
9933 done
9934IFS=$as_save_IFS
9935
9936 ;;
9937esac
9938fi
9939ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9940if test -n "$ac_pt_PKG_CONFIG"; then
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9942$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9943else
9944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9945$as_echo "no" >&6; }
9946fi
9947
9948 if test "x$ac_pt_PKG_CONFIG" = x; then
9949 PKG_CONFIG=""
9950 else
9951 case $cross_compiling:$ac_tool_warned in
9952yes:)
9953{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9954$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9955ac_tool_warned=yes ;;
9956esac
9957 PKG_CONFIG=$ac_pt_PKG_CONFIG
9958 fi
9959else
9960 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9961fi
9962
9963fi
9964if test -n "$PKG_CONFIG"; then
9965 _pkg_min_version=0.9.0
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9967$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9968 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9970$as_echo "yes" >&6; }
9971 else
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9973$as_echo "no" >&6; }
9974 PKG_CONFIG=""
9975 fi
9976fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009977
9978# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9980$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009981
9982# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009983if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009984 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009985else
9986 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009987fi
9988
9989
Matthias Kloseb9621712010-04-24 17:59:49 +00009990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9991$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009992
9993# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9995$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009996
9997# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009998if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009999 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +000010000else
10001 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010002fi
10003
10004
10005if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010006 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10007else
10008 LIBFFI_INCLUDEDIR=""
10009fi
10010
10011
Matthias Kloseb9621712010-04-24 17:59:49 +000010012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10013$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010014
Stefan Krah60187b52012-03-23 19:06:27 +010010015# Check for use of the system libmpdec library
10016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10017$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10018
10019# Check whether --with-system_libmpdec was given.
10020if test "${with_system_libmpdec+set}" = set; then :
10021 withval=$with_system_libmpdec;
10022else
10023 with_system_libmpdec="no"
10024fi
10025
10026
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10028$as_echo "$with_system_libmpdec" >&6; }
10029
Benjamin Peterson076ed002010-10-31 17:11:02 +000010030# Check for support for loadable sqlite extensions
10031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10032$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10033# Check whether --enable-loadable-sqlite-extensions was given.
10034if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10035 enableval=$enable_loadable_sqlite_extensions;
10036else
10037 enable_loadable_sqlite_extensions="no"
10038fi
10039
10040
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10042$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10043
Ned Deilyd819b932013-09-06 01:07:05 -070010044# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10045
10046
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10048$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10049
10050# Check whether --with-tcltk-includes was given.
10051if test "${with_tcltk_includes+set}" = set; then :
10052 withval=$with_tcltk_includes;
10053else
10054 with_tcltk_includes="default"
10055fi
10056
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10058$as_echo "$with_tcltk_includes" >&6; }
10059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10060$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10061
10062# Check whether --with-tcltk-libs was given.
10063if test "${with_tcltk_libs+set}" = set; then :
10064 withval=$with_tcltk_libs;
10065else
10066 with_tcltk_libs="default"
10067fi
10068
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10070$as_echo "$with_tcltk_libs" >&6; }
10071if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10072then
10073 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10074 then
10075 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10076 fi
10077 TCLTK_INCLUDES=""
10078 TCLTK_LIBS=""
10079else
10080 TCLTK_INCLUDES="$with_tcltk_includes"
10081 TCLTK_LIBS="$with_tcltk_libs"
10082fi
10083
Matthias Klose55708cc2009-04-30 08:06:49 +000010084# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10086$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010087
10088# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010089if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010090 withval=$with_dbmliborder;
10091if test x$with_dbmliborder = xyes
10092then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010093as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010094else
10095 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10096 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10097 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010098 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010099 fi
10100 done
10101fi
10102fi
10103
Matthias Kloseb9621712010-04-24 17:59:49 +000010104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10105$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010106
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010107# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010108
10109
Matthias Kloseb9621712010-04-24 17:59:49 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10111$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010113# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010114if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115 withval=$with_signal_module;
10116fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010117
10118
10119if test -z "$with_signal_module"
10120then with_signal_module="yes"
10121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10123$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010124
10125if test "${with_signal_module}" = "yes"; then
10126 USE_SIGNAL_MODULE=""
10127 SIGNAL_OBJS=""
10128else
10129 USE_SIGNAL_MODULE="#"
10130 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10131fi
10132
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010133# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010134
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010135USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137
Martin v. Löwis11437992002-04-12 09:54:03 +000010138
10139# Templates for things AC_DEFINEd more than once.
10140# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010141
10142
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
Matthias Kloseb9621712010-04-24 17:59:49 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10145$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010147# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010148if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149 withval=$with_threads;
10150fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010151
10152
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010153# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010156if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157 withval=$with_thread; with_threads=$with_thread
10158fi
10159
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010160
10161if test -z "$with_threads"
10162then with_threads="yes"
10163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10165$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010166
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010167
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010168if test "$with_threads" = "no"
10169then
10170 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010171elif test "$ac_cv_pthread_is_default" = yes
10172then
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010174
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010175 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010176 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010177
10178 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010180elif test "$ac_cv_kpthread" = "yes"
10181then
10182 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010183 if test "$ac_cv_cxx_thread" = "yes"; then
10184 CXX="$CXX -Kpthread"
10185 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010187
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010188 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010189 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010190elif test "$ac_cv_kthread" = "yes"
10191then
10192 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010193 if test "$ac_cv_cxx_thread" = "yes"; then
10194 CXX="$CXX -Kthread"
10195 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010197
10198 posix_threads=yes
10199 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010200elif test "$ac_cv_pthread" = "yes"
10201then
10202 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010203 if test "$ac_cv_cxx_thread" = "yes"; then
10204 CXX="$CXX -pthread"
10205 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010207
10208 posix_threads=yes
10209 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010210else
10211 if test ! -z "$with_threads" -a -d "$with_threads"
10212 then LDFLAGS="$LDFLAGS -L$with_threads"
10213 fi
10214 if test ! -z "$withval" -a -d "$withval"
10215 then LDFLAGS="$LDFLAGS -L$withval"
10216 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010217
10218 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010219 # define _POSIX_THREADS in unistd.h. Some apparently don't
10220 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10222$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010225
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010226#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010227#ifdef _POSIX_THREADS
10228yes
10229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
10231_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010234 unistd_defines_pthreads=yes
10235else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010236 unistd_defines_pthreads=no
10237fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010238rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10241$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010242
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010244
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010245 # Just looking for pthread_create in libpthread is not enough:
10246 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10247 # So we really have to include pthread.h, and then link.
10248 _libs=$LIBS
10249 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10251$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010253/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010254
10255#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010256#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010257
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010258void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010259int
10260main ()
10261{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010262
10263pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 ;
10265 return 0;
10266}
10267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10271$as_echo "yes" >&6; }
10272 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010273
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010274 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010275 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010276else
Martin v. Löwis11437992002-04-12 09:54:03 +000010277
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010278 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010280if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010282
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010283 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010284 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010285else
Guido van Rossumad678af1998-10-02 14:42:15 +000010286
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10288$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010289if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010291else
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010293LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297/* Override any GCC internal prototype to avoid an error.
10298 Use char because int might match the return type of a GCC
10299 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010300#ifdef __cplusplus
10301extern "C"
10302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010303char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010304int
10305main ()
10306{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 ;
10309 return 0;
10310}
10311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010312if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010314else
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010317rm -f core conftest.err conftest.$ac_objext \
10318 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010319LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10322$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010323if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010325
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010326 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010327 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010328 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010329else
Greg Steinadf63d62000-07-05 10:38:09 +000010330
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10332$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010333if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010335else
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010337LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341/* Override any GCC internal prototype to avoid an error.
10342 Use char because int might match the return type of a GCC
10343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010344#ifdef __cplusplus
10345extern "C"
10346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010347char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010348int
10349main ()
10350{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 ;
10353 return 0;
10354}
10355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010358else
Matthias Kloseb9621712010-04-24 17:59:49 +000010359 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010361rm -f core conftest.err conftest.$ac_objext \
10362 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010363LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10366$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010367if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010369
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010370 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010371 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010372 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010373else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10376$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010377if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010379else
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385/* Override any GCC internal prototype to avoid an error.
10386 Use char because int might match the return type of a GCC
10387 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010388#ifdef __cplusplus
10389extern "C"
10390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010391char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010392int
10393main ()
10394{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 ;
10397 return 0;
10398}
10399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010400if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010402else
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010405rm -f core conftest.err conftest.$ac_objext \
10406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010407LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10410$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010411if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010414 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010415 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010416 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010417else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010418
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10420$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010421if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010423else
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010425LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429/* Override any GCC internal prototype to avoid an error.
10430 Use char because int might match the return type of a GCC
10431 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010432#ifdef __cplusplus
10433extern "C"
10434#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010435char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010436int
10437main ()
10438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ;
10441 return 0;
10442}
10443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010444if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010446else
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010449rm -f core conftest.err conftest.$ac_objext \
10450 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010451LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10454$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010455if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010457
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010458 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010459 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010460 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010461else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010462
Martin v. Löwis130fb172001-07-19 11:00:41 +000010463 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010464fi
10465
Guido van Rossum627b2d71993-12-24 10:39:16 +000010466
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010467fi
10468
Guido van Rossum0be3e491997-05-22 20:33:33 +000010469fi
10470
Guido van Rossum49545951997-12-02 19:28:29 +000010471fi
10472
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473fi
10474
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010476rm -f core conftest.err conftest.$ac_objext \
10477 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010478
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10480$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010481if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010483else
Martin v. Löwis11437992002-04-12 09:54:03 +000010484 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010485LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010489/* Override any GCC internal prototype to avoid an error.
10490 Use char because int might match the return type of a GCC
10491 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010492#ifdef __cplusplus
10493extern "C"
10494#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010495char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010496int
10497main ()
10498{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ;
10501 return 0;
10502}
10503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010504if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010506else
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010509rm -f core conftest.err conftest.$ac_objext \
10510 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010511LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10514$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010515if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010517
Martin v. Löwis130fb172001-07-19 11:00:41 +000010518 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010519 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010520 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010521fi
10522
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010523
Neal Norwitza978ab02002-11-02 16:58:05 +000010524 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10526$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010527if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010529else
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010531LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535/* Override any GCC internal prototype to avoid an error.
10536 Use char because int might match the return type of a GCC
10537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010538#ifdef __cplusplus
10539extern "C"
10540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010541char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010542int
10543main ()
10544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 ;
10547 return 0;
10548}
10549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010550if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010552else
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010555rm -f core conftest.err conftest.$ac_objext \
10556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010557LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10560$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010561if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010563
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010564 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010565 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010566 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010567fi
10568
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010569 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010570fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010571
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572if test "$posix_threads" = "yes"; then
10573 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010574
Matthias Kloseb9621712010-04-24 17:59:49 +000010575$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010576
10577 fi
10578
10579 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10580 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010581 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010582$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010583
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010584 ;;
10585 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010586$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010587
10588 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010589 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010590$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010591
10592 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010593 esac
10594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10596$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010597 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010599else
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601 ac_cv_pthread_system_supported=no
10602else
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010604/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010605
10606 #include <stdio.h>
10607 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010608 void *foo(void *parm) {
10609 return NULL;
10610 }
10611 main() {
10612 pthread_attr_t attr;
10613 pthread_t id;
10614 if (pthread_attr_init(&attr)) exit(-1);
10615 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10616 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10617 exit(0);
10618 }
10619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010620if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621 ac_cv_pthread_system_supported=yes
10622else
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010627fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629
Guido van Rossum627b2d71993-12-24 10:39:16 +000010630fi
10631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10633$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010634 if test "$ac_cv_pthread_system_supported" = "yes"; then
10635
Matthias Kloseb9621712010-04-24 17:59:49 +000010636$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010637
10638 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 for ac_func in pthread_sigmask
10640do :
10641 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010642if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010643 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010644#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010646 case $ac_sys_system in
10647 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010650
10651 ;;
10652 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010653fi
10654done
10655
Christian Heimesf77b4b22013-08-21 13:26:05 +020010656 for ac_func in pthread_atfork
10657do :
10658 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10659if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10660 cat >>confdefs.h <<_ACEOF
10661#define HAVE_PTHREAD_ATFORK 1
10662_ACEOF
10663
10664fi
10665done
10666
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010667fi
10668
10669
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010670# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010671
Matthias Kloseb9621712010-04-24 17:59:49 +000010672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10673$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010675if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010677 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10679$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010680 ipv6=no
10681 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10683$as_echo "yes" >&6; }
10684 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010685
10686 ipv6=yes
10687 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010688 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689else
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693 /* AF_INET6 available check */
10694#include <sys/types.h>
10695#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010696int
10697main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010698{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010699int domain = AF_INET6;
10700 ;
10701 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702}
Martin v. Löwis11437992002-04-12 09:54:03 +000010703_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010704if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10707$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010709
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710else
Matthias Kloseb159a552010-04-25 21:00:44 +000010711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010715
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010719if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10721$as_echo_n "checking if RFC2553 API is available... " >&6; }
10722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010723/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010724
10725 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010726#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010727int
10728main ()
10729{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010730struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010731 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 ;
10733 return 0;
10734}
Matthias Kloseb159a552010-04-25 21:00:44 +000010735
Martin v. Löwis11437992002-04-12 09:54:03 +000010736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010737if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010738
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010740$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010741 ipv6=yes
10742
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010743else
Matthias Kloseb159a552010-04-25 21:00:44 +000010744
10745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010746$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010747 ipv6=no
10748
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010751fi
10752
10753if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010755
10756fi
10757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758fi
10759
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760
10761ipv6type=unknown
10762ipv6lib=none
10763ipv6trylibc=no
10764
10765if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10767$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010768 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10769 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770 case $i in
10771 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010773/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775#include <netinet/in.h>
10776#ifdef IPV6_INRIA_VERSION
10777yes
10778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010779_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010782 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010784rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785
10786 ;;
10787 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010789/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791#include <netinet/in.h>
10792#ifdef __KAME__
10793yes
10794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010795_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798 ipv6type=$i;
10799 ipv6lib=inet6
10800 ipv6libdir=/usr/local/v6/lib
10801 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010803rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804
10805 ;;
10806 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010808/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010809
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810#include <features.h>
10811#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10812yes
10813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010814_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817 ipv6type=$i;
10818 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010820rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821
10822 ;;
10823 linux-inet6)
10824 if test -d /usr/inet6; then
10825 ipv6type=$i
10826 ipv6lib=inet6
10827 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010828 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829 fi
10830 ;;
10831 solaris)
10832 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010833 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834 ipv6type=$i
10835 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836 fi
10837 fi
10838 ;;
10839 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010841/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010842
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843#include <sys/param.h>
10844#ifdef _TOSHIBA_INET6
10845yes
10846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010847_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850 ipv6type=$i;
10851 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010852 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010854rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855
10856 ;;
10857 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010859/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861#include </usr/local/v6/include/sys/v6config.h>
10862#ifdef __V6D__
10863yes
10864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010865_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868 ipv6type=$i;
10869 ipv6lib=v6;
10870 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010871 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010873rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874
10875 ;;
10876 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010878/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880#include <sys/param.h>
10881#ifdef _ZETA_MINAMI_INET6
10882yes
10883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887 ipv6type=$i;
10888 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010889 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010891rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892
10893 ;;
10894 esac
10895 if test "$ipv6type" != "unknown"; then
10896 break
10897 fi
10898 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10900$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901fi
10902
10903if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10904 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10905 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10906 echo "using lib$ipv6lib"
10907 else
10908 if test $ipv6trylibc = "yes"; then
10909 echo "using libc"
10910 else
10911 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10912 echo "You need to fetch lib$ipv6lib.a from appropriate"
10913 echo 'ipv6 kit and compile beforehand.'
10914 exit 1
10915 fi
10916 fi
10917fi
10918
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10920$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10922/* end confdefs.h. */
10923 /* CAN_RAW_FD_FRAMES available check */
10924#include <linux/can/raw.h>
10925int
10926main ()
10927{
10928int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10929 ;
10930 return 0;
10931}
10932_ACEOF
10933if ac_fn_c_try_compile "$LINENO"; then :
10934
10935
10936$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10937
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10939$as_echo "yes" >&6; }
10940
10941else
10942
10943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10944$as_echo "no" >&6; }
10945
10946fi
10947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10950$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010952/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010953
10954 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010955int
10956main ()
10957{
10958FSIORefNum fRef = 0
10959 ;
10960 return 0;
10961}
Matthias Kloseb159a552010-04-25 21:00:44 +000010962
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010964if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010965
Matthias Kloseb159a552010-04-25 21:00:44 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10970$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010971
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010972else
Matthias Kloseb159a552010-04-25 21:00:44 +000010973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10975$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010976
10977fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10979
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010980# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10982$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010986 withval=$with_doc_strings;
10987fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010988
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010989
10990if test -z "$with_doc_strings"
10991then with_doc_strings="yes"
10992fi
10993if test "$with_doc_strings" != "no"
10994then
10995
Matthias Kloseb9621712010-04-24 17:59:49 +000010996$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010997
10998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11000$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011001
Antoine Pitrou042b1282010-08-13 21:15:58 +000011002# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
11004$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011007if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011009if test "$withval" != no
11010then
11011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11015$as_echo "yes" >&6; }
11016else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11017$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011018fi
11019else
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11021$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022fi
11023
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011024
11025# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11027$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011030if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031 withval=$with_pymalloc;
11032fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011033
Neil Schemenauera35c6882001-02-27 04:45:05 +000011034
Neil Schemenauer16c22972002-03-22 15:34:49 +000011035if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011036then
11037 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011038fi
11039if test "$with_pymalloc" != "no"
11040then
Martin v. Löwis11437992002-04-12 09:54:03 +000011041
Matthias Kloseb9621712010-04-24 17:59:49 +000011042$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011043
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011044 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11047$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011048
Benjamin Peterson05159c42009-12-03 03:01:27 +000011049# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11051$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011052
11053# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011054if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011055 withval=$with_valgrind;
11056else
11057 with_valgrind=no
11058fi
11059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11061$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011062if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 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 +020011064if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011067
11068else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011069 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011070
11071fi
11072
11073
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011074 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011075fi
11076
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011077# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011078
Guido van Rossum98935bf2001-09-05 19:13:16 +000011079DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011080
Guido van Rossume97ee181999-12-20 21:27:22 +000011081# the dlopen() function means we might want to use dynload_shlib.o. some
11082# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011083for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011084do :
11085 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011086if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011089_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011090
Guido van Rossume97ee181999-12-20 21:27:22 +000011091fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011092done
Guido van Rossume97ee181999-12-20 21:27:22 +000011093
Michael W. Hudson54241132001-12-07 15:38:26 +000011094
Guido van Rossume97ee181999-12-20 21:27:22 +000011095# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11096# loading of modules.
11097
Matthias Kloseb9621712010-04-24 17:59:49 +000011098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11099$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011100if test -z "$DYNLOADFILE"
11101then
11102 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011103 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11104 if test "$ac_cv_func_dlopen" = yes
11105 then DYNLOADFILE="dynload_shlib.o"
11106 else DYNLOADFILE="dynload_aix.o"
11107 fi
11108 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011109 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011110 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11111 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011112 *)
11113 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11114 # out any dynamic loading
11115 if test "$ac_cv_func_dlopen" = yes
11116 then DYNLOADFILE="dynload_shlib.o"
11117 else DYNLOADFILE="dynload_stub.o"
11118 fi
11119 ;;
11120 esac
11121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11123$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011124if test "$DYNLOADFILE" != "dynload_stub.o"
11125then
Martin v. Löwis11437992002-04-12 09:54:03 +000011126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011128
11129fi
11130
Neil Schemenauer4e425612001-06-19 15:44:15 +000011131# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11132
Michael W. Hudson54241132001-12-07 15:38:26 +000011133
Matthias Kloseb9621712010-04-24 17:59:49 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11135$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011136if test -z "$MACHDEP_OBJS"
11137then
Jack Jansene578a632001-08-15 01:27:14 +000011138 MACHDEP_OBJS=$extra_machdep_objs
11139else
11140 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011141fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011142if test -z "$MACHDEP_OBJS"; then
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11144$as_echo "none" >&6; }
11145else
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11147$as_echo "$MACHDEP_OBJS" >&6; }
11148fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011149
Guido van Rossum627b2d71993-12-24 10:39:16 +000011150# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011151for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011152 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011153 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011154 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011155 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011156 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011157 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011158 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11159 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011160 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011161 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011162 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011163 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011164 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011165 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011166 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11167 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011168 sigaction sigaltstack siginterrupt sigpending sigrelse \
11169 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011170 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011171 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011172 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011173do :
11174 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11175ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011176if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011178#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011179_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011180
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011181fi
11182done
11183
Michael W. Hudson54241132001-12-07 15:38:26 +000011184
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011185ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11186 #include <dirent.h>
11187"
11188if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11189
11190$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11191
11192fi
11193
11194
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011195# For some functions, having a definition is not sufficient, since
11196# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11198$as_echo_n "checking for chroot... " >&6; }
11199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011200/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011201#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011202int
11203main ()
11204{
11205void *x=chroot
11206 ;
11207 return 0;
11208}
11209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011211
Matthias Kloseb9621712010-04-24 17:59:49 +000011212$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011213
Matthias Kloseb159a552010-04-25 21:00:44 +000011214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011215$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011216else
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011219
11220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11223$as_echo_n "checking for link... " >&6; }
11224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011225/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011226#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011227int
11228main ()
11229{
11230void *x=link
11231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011236
Matthias Kloseb9621712010-04-24 17:59:49 +000011237$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011238
Matthias Kloseb159a552010-04-25 21:00:44 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011241else
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011244
11245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11248$as_echo_n "checking for symlink... " >&6; }
11249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011250/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011251#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011252int
11253main ()
11254{
11255void *x=symlink
11256 ;
11257 return 0;
11258}
11259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011261
Matthias Kloseb9621712010-04-24 17:59:49 +000011262$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011263
Matthias Kloseb159a552010-04-25 21:00:44 +000011264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011265$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011266else
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11268$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011269
11270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11273$as_echo_n "checking for fchdir... " >&6; }
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011276#include <unistd.h>
11277int
11278main ()
11279{
11280void *x=fchdir
11281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011288
Matthias Kloseb159a552010-04-25 21:00:44 +000011289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011291else
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011294
11295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11298$as_echo_n "checking for fsync... " >&6; }
11299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011300/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011301#include <unistd.h>
11302int
11303main ()
11304{
11305void *x=fsync
11306 ;
11307 return 0;
11308}
11309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011311
Matthias Kloseb9621712010-04-24 17:59:49 +000011312$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011313
Matthias Kloseb159a552010-04-25 21:00:44 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011315$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011316else
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011319
11320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11323$as_echo_n "checking for fdatasync... " >&6; }
11324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011326#include <unistd.h>
11327int
11328main ()
11329{
11330void *x=fdatasync
11331 ;
11332 return 0;
11333}
11334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011335if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011336
Matthias Kloseb9621712010-04-24 17:59:49 +000011337$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011338
Matthias Kloseb159a552010-04-25 21:00:44 +000011339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011340$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011341else
Matthias Kloseb9621712010-04-24 17:59:49 +000011342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11343$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011344
11345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11348$as_echo_n "checking for epoll... " >&6; }
11349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011350/* end confdefs.h. */
11351#include <sys/epoll.h>
11352int
11353main ()
11354{
11355void *x=epoll_create
11356 ;
11357 return 0;
11358}
11359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011361
Matthias Kloseb9621712010-04-24 17:59:49 +000011362$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011363
Matthias Kloseb159a552010-04-25 21:00:44 +000011364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011365$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011366else
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11368$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011369
11370fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11373$as_echo_n "checking for epoll_create1... " >&6; }
11374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11375/* end confdefs.h. */
11376#include <sys/epoll.h>
11377int
11378main ()
11379{
11380void *x=epoll_create1
11381 ;
11382 return 0;
11383}
11384_ACEOF
11385if ac_fn_c_try_compile "$LINENO"; then :
11386
11387$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11388
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11390$as_echo "yes" >&6; }
11391else
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11393$as_echo "no" >&6; }
11394
11395fi
11396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11398$as_echo_n "checking for kqueue... " >&6; }
11399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011400/* end confdefs.h. */
11401
11402#include <sys/types.h>
11403#include <sys/event.h>
11404
11405int
11406main ()
11407{
11408int x=kqueue()
11409 ;
11410 return 0;
11411}
11412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011416
Matthias Kloseb159a552010-04-25 21:00:44 +000011417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011418$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011419else
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11421$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011422
11423fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11426$as_echo_n "checking for prlimit... " >&6; }
11427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11428/* end confdefs.h. */
11429
11430#include <sys/time.h>
11431#include <sys/resource.h>
11432
11433int
11434main ()
11435{
11436void *x=prlimit
11437 ;
11438 return 0;
11439}
11440_ACEOF
11441if ac_fn_c_try_compile "$LINENO"; then :
11442
11443$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11444
11445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11446$as_echo "yes" >&6; }
11447else
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11449$as_echo "no" >&6; }
11450
11451fi
11452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11453
Martin v. Löwisd5843682002-11-21 20:41:28 +000011454# On some systems (eg. FreeBSD 5), we would find a definition of the
11455# functions ctermid_r, setgroups in the library, but no prototype
11456# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11457# address to avoid compiler warnings and potential miscompilations
11458# because of the missing prototypes.
11459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11461$as_echo_n "checking for ctermid_r... " >&6; }
11462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011463/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011464
Martin v. Löwisd5843682002-11-21 20:41:28 +000011465#include <stdio.h>
11466
Martin v. Löwisd5843682002-11-21 20:41:28 +000011467int
11468main ()
11469{
11470void* p = ctermid_r
11471 ;
11472 return 0;
11473}
11474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011476
Matthias Kloseb9621712010-04-24 17:59:49 +000011477$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011478
Matthias Kloseb159a552010-04-25 21:00:44 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011480$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011481else
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011484
11485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11487
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11489$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011490if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011491 $as_echo_n "(cached) " >&6
11492else
11493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011495#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011496int
11497main ()
11498{
11499void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011500
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011501 ;
11502 return 0;
11503}
11504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011505if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011506 ac_cv_flock_decl=yes
11507else
11508 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011509
11510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011512
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011513fi
11514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11515$as_echo "$ac_cv_flock_decl" >&6; }
11516if test "x${ac_cv_flock_decl}" = xyes; then
11517 for ac_func in flock
11518do :
11519 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011520if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011521 cat >>confdefs.h <<_ACEOF
11522#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011523_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011524
Antoine Pitroua3000072010-09-07 14:52:42 +000011525else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011527$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011528if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011529 $as_echo_n "(cached) " >&6
11530else
11531 ac_check_lib_save_LIBS=$LIBS
11532LIBS="-lbsd $LIBS"
11533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11534/* end confdefs.h. */
11535
11536/* Override any GCC internal prototype to avoid an error.
11537 Use char because int might match the return type of a GCC
11538 builtin and then its argument prototype would still apply. */
11539#ifdef __cplusplus
11540extern "C"
11541#endif
11542char flock ();
11543int
11544main ()
11545{
11546return flock ();
11547 ;
11548 return 0;
11549}
11550_ACEOF
11551if ac_fn_c_try_link "$LINENO"; then :
11552 ac_cv_lib_bsd_flock=yes
11553else
11554 ac_cv_lib_bsd_flock=no
11555fi
11556rm -f core conftest.err conftest.$ac_objext \
11557 conftest$ac_exeext conftest.$ac_ext
11558LIBS=$ac_check_lib_save_LIBS
11559fi
11560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11561$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011562if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011563 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011564
11565
11566$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11567
11568
11569fi
11570
11571
11572fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011573done
11574
Antoine Pitroua3000072010-09-07 14:52:42 +000011575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576
Matthias Kloseb9621712010-04-24 17:59:49 +000011577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11578$as_echo_n "checking for getpagesize... " >&6; }
11579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011580/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011581
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011582#include <unistd.h>
11583
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011584int
11585main ()
11586{
11587void* p = getpagesize
11588 ;
11589 return 0;
11590}
11591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011595
Matthias Kloseb159a552010-04-25 21:00:44 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011597$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011601
11602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011604
Victor Stinner984890f2011-11-24 13:53:38 +010011605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11606$as_echo_n "checking for broken unsetenv... " >&6; }
11607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11608/* end confdefs.h. */
11609
11610#include <stdlib.h>
11611
11612int
11613main ()
11614{
11615int res = unsetenv("DUMMY")
11616 ;
11617 return 0;
11618}
11619_ACEOF
11620if ac_fn_c_try_compile "$LINENO"; then :
11621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11622$as_echo "no" >&6; }
11623else
11624
11625$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11626
11627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11628$as_echo "yes" >&6; }
11629
11630fi
11631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11632
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011633for ac_prog in true
11634do
11635 # Extract the first word of "$ac_prog", so it can be a program name with args.
11636set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11638$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011639if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011640 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011641else
11642 if test -n "$TRUE"; then
11643 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11644else
11645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11646for as_dir in $PATH
11647do
11648 IFS=$as_save_IFS
11649 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011651 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011652 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 $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 +000011654 break 2
11655 fi
11656done
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011658IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011659
11660fi
11661fi
11662TRUE=$ac_cv_prog_TRUE
11663if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11665$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011666else
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11668$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011669fi
11670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011671
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011672 test -n "$TRUE" && break
11673done
11674test -n "$TRUE" || TRUE="/bin/true"
11675
11676
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11678$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011679if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011681else
11682 ac_check_lib_save_LIBS=$LIBS
11683LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011685/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011687/* Override any GCC internal prototype to avoid an error.
11688 Use char because int might match the return type of a GCC
11689 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011690#ifdef __cplusplus
11691extern "C"
11692#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011693char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011694int
11695main ()
11696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011698 ;
11699 return 0;
11700}
11701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011703 ac_cv_lib_c_inet_aton=yes
11704else
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011707rm -f core conftest.err conftest.$ac_objext \
11708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011709LIBS=$ac_check_lib_save_LIBS
11710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11712$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011713if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011714 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011715else
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11717$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011718if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011720else
11721 ac_check_lib_save_LIBS=$LIBS
11722LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011724/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011726/* Override any GCC internal prototype to avoid an error.
11727 Use char because int might match the return type of a GCC
11728 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011729#ifdef __cplusplus
11730extern "C"
11731#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011732char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011733int
11734main ()
11735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011736return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011737 ;
11738 return 0;
11739}
11740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011742 ac_cv_lib_resolv_inet_aton=yes
11743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011746rm -f core conftest.err conftest.$ac_objext \
11747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011748LIBS=$ac_check_lib_save_LIBS
11749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11751$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011752if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011753 cat >>confdefs.h <<_ACEOF
11754#define HAVE_LIBRESOLV 1
11755_ACEOF
11756
11757 LIBS="-lresolv $LIBS"
11758
11759fi
11760
11761
11762fi
11763
11764
Christian Heimesd0764e22007-12-04 15:00:33 +000011765# On Tru64, chflags seems to be present, but calling it will
11766# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11768$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011769if ${ac_cv_have_chflags+:} 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_chflags=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(chflags(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_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +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 Vassalotti302825b2009-07-17 07:49:53 +000011795fi
11796
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011797
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_chflags" >&5
11800$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011801if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011803if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011804 ac_cv_have_chflags="yes"
11805else
11806 ac_cv_have_chflags="no"
11807fi
11808
11809fi
11810if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011811
Matthias Kloseb9621712010-04-24 17:59:49 +000011812$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011813
11814fi
11815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11817$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011818if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011820else
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011822 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011825/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011826
Christian Heimesd0764e22007-12-04 15:00:33 +000011827#include <sys/stat.h>
11828#include <unistd.h>
11829int main(int argc, char*argv[])
11830{
11831 if(lchflags(argv[0], 0) != 0)
11832 return 1;
11833 return 0;
11834}
Ned Deily3eb67d52011-06-28 00:00:28 -070011835
Christian Heimesd0764e22007-12-04 15:00:33 +000011836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011838 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011839else
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011844fi
11845
11846
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11849$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011850if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011852if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011853 ac_cv_have_lchflags="yes"
11854else
11855 ac_cv_have_lchflags="no"
11856fi
11857
11858fi
11859if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011862
11863fi
11864
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011865case $ac_sys_system/$ac_sys_release in
11866Darwin/*)
11867 _CUR_CFLAGS="${CFLAGS}"
11868 _CUR_LDFLAGS="${LDFLAGS}"
11869 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11870 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11871 ;;
11872esac
11873
Matthias Kloseb9621712010-04-24 17:59:49 +000011874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11875$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011876if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011878else
11879 ac_check_lib_save_LIBS=$LIBS
11880LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011882/* end confdefs.h. */
11883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011884/* Override any GCC internal prototype to avoid an error.
11885 Use char because int might match the return type of a GCC
11886 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011887#ifdef __cplusplus
11888extern "C"
11889#endif
11890char inflateCopy ();
11891int
11892main ()
11893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011894return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011895 ;
11896 return 0;
11897}
11898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011899if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011900 ac_cv_lib_z_inflateCopy=yes
11901else
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011904rm -f core conftest.err conftest.$ac_objext \
11905 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011906LIBS=$ac_check_lib_save_LIBS
11907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11909$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011910if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011911
Matthias Kloseb9621712010-04-24 17:59:49 +000011912$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011913
11914fi
11915
11916
11917case $ac_sys_system/$ac_sys_release in
11918Darwin/*)
11919 CFLAGS="${_CUR_CFLAGS}"
11920 LDFLAGS="${_CUR_LDFLAGS}"
11921 ;;
11922esac
11923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11925$as_echo_n "checking for hstrerror... " >&6; }
11926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011927/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011928
Martin v. Löwise9416172003-05-03 10:12:45 +000011929#include <netdb.h>
11930
Martin v. Löwise9416172003-05-03 10:12:45 +000011931int
11932main ()
11933{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011934void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011935 ;
11936 return 0;
11937}
11938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011939if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011940
Matthias Kloseb9621712010-04-24 17:59:49 +000011941$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011942
Matthias Kloseb159a552010-04-25 21:00:44 +000011943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011944$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011945else
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011948
11949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011950rm -f core conftest.err conftest.$ac_objext \
11951 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11954$as_echo_n "checking for inet_aton... " >&6; }
11955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011956/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011957
Martin v. Löwis86d66262006-02-17 08:40:11 +000011958#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011959#include <sys/socket.h>
11960#include <netinet/in.h>
11961#include <arpa/inet.h>
11962
Martin v. Löwise9416172003-05-03 10:12:45 +000011963int
11964main ()
11965{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011966void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011967 ;
11968 return 0;
11969}
11970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011971if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011974
Matthias Kloseb159a552010-04-25 21:00:44 +000011975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011976$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011977else
Matthias Kloseb9621712010-04-24 17:59:49 +000011978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11979$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011980
11981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011982rm -f core conftest.err conftest.$ac_objext \
11983 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11986$as_echo_n "checking for inet_pton... " >&6; }
11987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011988/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011989
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011990#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011991#include <sys/socket.h>
11992#include <netinet/in.h>
11993#include <arpa/inet.h>
11994
Martin v. Löwise9416172003-05-03 10:12:45 +000011995int
11996main ()
11997{
11998void* p = inet_pton
11999 ;
12000 return 0;
12001}
12002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012004
Matthias Kloseb9621712010-04-24 17:59:49 +000012005$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012006
Matthias Kloseb159a552010-04-25 21:00:44 +000012007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012008$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012009else
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12011$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012012
12013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012015
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012016# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12018$as_echo_n "checking for setgroups... " >&6; }
12019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012020/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012021
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012022#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012023#ifdef HAVE_GRP_H
12024#include <grp.h>
12025#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012026
Martin v. Löwisd5843682002-11-21 20:41:28 +000012027int
12028main ()
12029{
12030void* p = setgroups
12031 ;
12032 return 0;
12033}
12034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012035if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012036
Matthias Kloseb9621712010-04-24 17:59:49 +000012037$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012038
Matthias Kloseb159a552010-04-25 21:00:44 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012040$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12043$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012044
12045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012047
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012048# check for openpty and forkpty
12049
12050for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012051do :
12052 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012053if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012054 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012055#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012056_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012057
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012058else
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12060$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012061if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012063else
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012065LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069/* Override any GCC internal prototype to avoid an error.
12070 Use char because int might match the return type of a GCC
12071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012072#ifdef __cplusplus
12073extern "C"
12074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012075char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012076int
12077main ()
12078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012080 ;
12081 return 0;
12082}
12083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012086else
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012089rm -f core conftest.err conftest.$ac_objext \
12090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012091LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12094$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012095if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012097 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12100$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012101if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012103else
12104 ac_check_lib_save_LIBS=$LIBS
12105LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012107/* end confdefs.h. */
12108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109/* Override any GCC internal prototype to avoid an error.
12110 Use char because int might match the return type of a GCC
12111 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012112#ifdef __cplusplus
12113extern "C"
12114#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012115char openpty ();
12116int
12117main ()
12118{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012119return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012120 ;
12121 return 0;
12122}
12123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012125 ac_cv_lib_bsd_openpty=yes
12126else
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012129rm -f core conftest.err conftest.$ac_objext \
12130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012131LIBS=$ac_check_lib_save_LIBS
12132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12134$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012135if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012137 LIBS="$LIBS -lbsd"
12138fi
12139
12140
12141fi
12142
Fred Drake8cef4cf2000-06-28 16:40:38 +000012143
12144fi
12145done
12146
12147for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012148do :
12149 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012150if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012152#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012153_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012154
Fred Drake8cef4cf2000-06-28 16:40:38 +000012155else
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12157$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012158if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012160else
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012162LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166/* Override any GCC internal prototype to avoid an error.
12167 Use char because int might match the return type of a GCC
12168 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012169#ifdef __cplusplus
12170extern "C"
12171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012172char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012173int
12174main ()
12175{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 ;
12178 return 0;
12179}
12180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012183else
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012186rm -f core conftest.err conftest.$ac_objext \
12187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012188LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12191$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012194 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12197$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012198if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012200else
12201 ac_check_lib_save_LIBS=$LIBS
12202LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012204/* end confdefs.h. */
12205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206/* Override any GCC internal prototype to avoid an error.
12207 Use char because int might match the return type of a GCC
12208 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012209#ifdef __cplusplus
12210extern "C"
12211#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012212char forkpty ();
12213int
12214main ()
12215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012217 ;
12218 return 0;
12219}
12220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012221if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012222 ac_cv_lib_bsd_forkpty=yes
12223else
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012226rm -f core conftest.err conftest.$ac_objext \
12227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012228LIBS=$ac_check_lib_save_LIBS
12229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12231$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012232if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012234 LIBS="$LIBS -lbsd"
12235fi
12236
12237
12238fi
12239
Fred Drake8cef4cf2000-06-28 16:40:38 +000012240
12241fi
12242done
12243
Jack Jansendd19cf82001-12-06 22:36:17 +000012244
Christian Heimesb186d002008-03-18 15:15:01 +000012245# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012246for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012247do :
12248 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012249if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012250 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012251#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012252_ACEOF
12253
12254fi
12255done
12256
12257
Michael W. Hudson54241132001-12-07 15:38:26 +000012258# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012259for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012260do :
12261 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12262ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012263if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012266_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012267
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012268fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012269done
12270
Michael W. Hudson54241132001-12-07 15:38:26 +000012271
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012272ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012273if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012274 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012275
Martin v. Löwis1142de32002-03-29 16:28:31 +000012276else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012277 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012278 *" dup2.$ac_objext "* ) ;;
12279 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012281esac
12282
Martin v. Löwis1142de32002-03-29 16:28:31 +000012283fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012284
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012285ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012286if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012287 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12288
12289else
12290 case " $LIBOBJS " in
12291 *" strdup.$ac_objext "* ) ;;
12292 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12293 ;;
12294esac
12295
12296fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012297
12298
12299for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012300do :
12301 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012302if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012303 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012304#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012307/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012308#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012309int
12310main ()
12311{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012312getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012313 ;
12314 return 0;
12315}
12316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012318
Matthias Kloseb9621712010-04-24 17:59:49 +000012319$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012320
Guido van Rossum627b2d71993-12-24 10:39:16 +000012321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012323
Guido van Rossum627b2d71993-12-24 10:39:16 +000012324fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012325done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012326
Jack Jansen150753c2003-03-29 22:07:47 +000012327for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012328do :
12329 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012330if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012335/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012336#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012337int
12338main ()
12339{
12340setpgrp(0,0);
12341 ;
12342 return 0;
12343}
12344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012346
Matthias Kloseb9621712010-04-24 17:59:49 +000012347$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012348
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012351
12352fi
12353done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012354
Thomas Wouters3a584202000-08-05 23:28:51 +000012355for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012356do :
12357 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012358if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012360#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012363/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012364#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012365int
12366main ()
12367{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012368gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 ;
12370 return 0;
12371}
12372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012373if ac_fn_c_try_compile "$LINENO"; then :
12374
Guido van Rossum627b2d71993-12-24 10:39:16 +000012375else
Skip Montanaro6dead952003-09-25 14:50:04 +000012376
Matthias Kloseb9621712010-04-24 17:59:49 +000012377$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012378
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
Guido van Rossum627b2d71993-12-24 10:39:16 +000012380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012382
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012383fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012384done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385
Michael W. Hudson54241132001-12-07 15:38:26 +000012386
Victor Stinnere0be4232011-10-25 13:06:09 +020012387for ac_func in clock_gettime
12388do :
12389 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12390if test "x$ac_cv_func_clock_gettime" = xyes; then :
12391 cat >>confdefs.h <<_ACEOF
12392#define HAVE_CLOCK_GETTIME 1
12393_ACEOF
12394
12395else
12396
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12398$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12399if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12400 $as_echo_n "(cached) " >&6
12401else
12402 ac_check_lib_save_LIBS=$LIBS
12403LIBS="-lrt $LIBS"
12404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12405/* end confdefs.h. */
12406
12407/* Override any GCC internal prototype to avoid an error.
12408 Use char because int might match the return type of a GCC
12409 builtin and then its argument prototype would still apply. */
12410#ifdef __cplusplus
12411extern "C"
12412#endif
12413char clock_gettime ();
12414int
12415main ()
12416{
12417return clock_gettime ();
12418 ;
12419 return 0;
12420}
12421_ACEOF
12422if ac_fn_c_try_link "$LINENO"; then :
12423 ac_cv_lib_rt_clock_gettime=yes
12424else
12425 ac_cv_lib_rt_clock_gettime=no
12426fi
12427rm -f core conftest.err conftest.$ac_objext \
12428 conftest$ac_exeext conftest.$ac_ext
12429LIBS=$ac_check_lib_save_LIBS
12430fi
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12432$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12433if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12434
Victor Stinner7efb8332014-08-29 15:41:08 +020012435 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012436 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12437
12438
12439$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12440
12441
12442fi
12443
12444
12445fi
12446done
12447
12448
12449for ac_func in clock_getres
12450do :
12451 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12452if test "x$ac_cv_func_clock_getres" = xyes; then :
12453 cat >>confdefs.h <<_ACEOF
12454#define HAVE_CLOCK_GETRES 1
12455_ACEOF
12456
12457else
12458
12459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12460$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12461if ${ac_cv_lib_rt_clock_getres+:} false; then :
12462 $as_echo_n "(cached) " >&6
12463else
12464 ac_check_lib_save_LIBS=$LIBS
12465LIBS="-lrt $LIBS"
12466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12467/* end confdefs.h. */
12468
12469/* Override any GCC internal prototype to avoid an error.
12470 Use char because int might match the return type of a GCC
12471 builtin and then its argument prototype would still apply. */
12472#ifdef __cplusplus
12473extern "C"
12474#endif
12475char clock_getres ();
12476int
12477main ()
12478{
12479return clock_getres ();
12480 ;
12481 return 0;
12482}
12483_ACEOF
12484if ac_fn_c_try_link "$LINENO"; then :
12485 ac_cv_lib_rt_clock_getres=yes
12486else
12487 ac_cv_lib_rt_clock_getres=no
12488fi
12489rm -f core conftest.err conftest.$ac_objext \
12490 conftest$ac_exeext conftest.$ac_ext
12491LIBS=$ac_check_lib_save_LIBS
12492fi
12493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12494$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12495if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12496
12497 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12498
12499
12500fi
12501
12502
12503fi
12504done
12505
12506
Matthias Kloseb9621712010-04-24 17:59:49 +000012507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12508$as_echo_n "checking for major... " >&6; }
12509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012510/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012511
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012512#if defined(MAJOR_IN_MKDEV)
12513#include <sys/mkdev.h>
12514#elif defined(MAJOR_IN_SYSMACROS)
12515#include <sys/sysmacros.h>
12516#else
12517#include <sys/types.h>
12518#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012519
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012520int
12521main ()
12522{
12523
12524 makedev(major(0),minor(0));
12525
12526 ;
12527 return 0;
12528}
12529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012531
12532
Matthias Kloseb9621712010-04-24 17:59:49 +000012533$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012534
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12536$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012537
12538else
Skip Montanaro6dead952003-09-25 14:50:04 +000012539
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12541$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012542
12543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012544rm -f core conftest.err conftest.$ac_objext \
12545 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012546
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012547# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012548# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12550$as_echo_n "checking for getaddrinfo... " >&6; }
12551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012552/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012553
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012554#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012555#include <sys/socket.h>
12556#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012557#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012558
Martin v. Löwis11437992002-04-12 09:54:03 +000012559int
12560main ()
12561{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012562getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012563 ;
12564 return 0;
12565}
12566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012567if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012568 have_getaddrinfo=yes
12569else
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012572rm -f core conftest.err conftest.$ac_objext \
12573 conftest$ac_exeext conftest.$ac_ext
12574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12575$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012576if test $have_getaddrinfo = yes
12577then
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12579$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012580 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012582else
Matthias Kloseb9621712010-04-24 17:59:49 +000012583 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012584
12585if test "${enable_ipv6+set}" = set; then
12586 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12587else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012588 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012589fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012590else
Matthias Kloseb9621712010-04-24 17:59:49 +000012591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012592/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012593
Stefan Krah19c21392012-11-22 23:47:32 +010012594#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012595#include <sys/types.h>
12596#include <netdb.h>
12597#include <string.h>
12598#include <sys/socket.h>
12599#include <netinet/in.h>
12600
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012601int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012602{
12603 int passive, gaierr, inet4 = 0, inet6 = 0;
12604 struct addrinfo hints, *ai, *aitop;
12605 char straddr[INET6_ADDRSTRLEN], strport[16];
12606
12607 for (passive = 0; passive <= 1; passive++) {
12608 memset(&hints, 0, sizeof(hints));
12609 hints.ai_family = AF_UNSPEC;
12610 hints.ai_flags = passive ? AI_PASSIVE : 0;
12611 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012612 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012613 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12614 (void)gai_strerror(gaierr);
12615 goto bad;
12616 }
12617 for (ai = aitop; ai; ai = ai->ai_next) {
12618 if (ai->ai_addr == NULL ||
12619 ai->ai_addrlen == 0 ||
12620 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12621 straddr, sizeof(straddr), strport, sizeof(strport),
12622 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12623 goto bad;
12624 }
12625 switch (ai->ai_family) {
12626 case AF_INET:
12627 if (strcmp(strport, "54321") != 0) {
12628 goto bad;
12629 }
12630 if (passive) {
12631 if (strcmp(straddr, "0.0.0.0") != 0) {
12632 goto bad;
12633 }
12634 } else {
12635 if (strcmp(straddr, "127.0.0.1") != 0) {
12636 goto bad;
12637 }
12638 }
12639 inet4++;
12640 break;
12641 case AF_INET6:
12642 if (strcmp(strport, "54321") != 0) {
12643 goto bad;
12644 }
12645 if (passive) {
12646 if (strcmp(straddr, "::") != 0) {
12647 goto bad;
12648 }
12649 } else {
12650 if (strcmp(straddr, "::1") != 0) {
12651 goto bad;
12652 }
12653 }
12654 inet6++;
12655 break;
12656 case AF_UNSPEC:
12657 goto bad;
12658 break;
12659 default:
12660 /* another family support? */
12661 break;
12662 }
12663 }
12664 }
12665
12666 if (!(inet4 == 0 || inet4 == 2))
12667 goto bad;
12668 if (!(inet6 == 0 || inet6 == 2))
12669 goto bad;
12670
12671 if (aitop)
12672 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012673 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012674
12675 bad:
12676 if (aitop)
12677 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012678 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012679}
12680
Martin v. Löwis11437992002-04-12 09:54:03 +000012681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012682if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012683 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012684else
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012690
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012691fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012692
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12696$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12697
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012698if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012699then
12700 if test $ipv6 = yes
12701 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012702 echo 'Fatal: You must get working getaddrinfo() function.'
12703 echo ' or you can specify "--disable-ipv6"'.
12704 exit 1
12705 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012706else
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012709
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012710fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012711
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012712for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012713do :
12714 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012715if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012717#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012718_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012719
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012720fi
12721done
12722
Michael W. Hudson54241132001-12-07 15:38:26 +000012723
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012724# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12726$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012727if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012732#include <sys/types.h>
12733#include <sys/time.h>
12734#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012735
Martin v. Löwis11437992002-04-12 09:54:03 +000012736int
12737main ()
12738{
12739if ((struct tm *) 0)
12740return 0;
12741 ;
12742 return 0;
12743}
12744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012745if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012746 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012747else
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12753$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012754if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012757
12758fi
12759
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12761$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012762if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012763 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012766/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767#include <sys/types.h>
12768#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
Martin v. Löwis11437992002-04-12 09:54:03 +000012770int
12771main ()
12772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773struct tm tm;
12774 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 ;
12777 return 0;
12778}
12779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012780if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012781 ac_cv_struct_tm=time.h
12782else
Matthias Kloseb9621712010-04-24 17:59:49 +000012783 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12788$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012789if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012790
Matthias Kloseb9621712010-04-24 17:59:49 +000012791$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012792
12793fi
12794
Matthias Kloseb9621712010-04-24 17:59:49 +000012795ac_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 +000012796#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Matthias Kloseb9621712010-04-24 17:59:49 +000012798"
Victor Stinnere0be4232011-10-25 13:06:09 +020012799if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012800
12801cat >>confdefs.h <<_ACEOF
12802#define HAVE_STRUCT_TM_TM_ZONE 1
12803_ACEOF
12804
12805
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012806fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012807
Martin v. Löwis11437992002-04-12 09:54:03 +000012808if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811
12812else
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12814"
Victor Stinnere0be4232011-10-25 13:06:09 +020012815if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817else
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012819fi
12820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012822#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823_ACEOF
12824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12826$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012827if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012829else
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012831/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012832#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833#if !HAVE_DECL_TZNAME
12834extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012836
Martin v. Löwis11437992002-04-12 09:54:03 +000012837int
12838main ()
12839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 ;
12842 return 0;
12843}
12844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012845if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846 ac_cv_var_tzname=yes
12847else
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012850rm -f core conftest.err conftest.$ac_objext \
12851 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12854$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012855 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012858
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859 fi
12860fi
12861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862ac_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 +020012863if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012864
12865cat >>confdefs.h <<_ACEOF
12866#define HAVE_STRUCT_STAT_ST_RDEV 1
12867_ACEOF
12868
12869
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012870fi
12871
Matthias Kloseb9621712010-04-24 17:59:49 +000012872ac_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 +020012873if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012874
Martin v. Löwis11437992002-04-12 09:54:03 +000012875cat >>confdefs.h <<_ACEOF
12876#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12877_ACEOF
12878
12879
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012880fi
12881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882ac_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 +020012883if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012884
12885cat >>confdefs.h <<_ACEOF
12886#define HAVE_STRUCT_STAT_ST_FLAGS 1
12887_ACEOF
12888
12889
12890fi
12891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892ac_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 +020012893if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012894
12895cat >>confdefs.h <<_ACEOF
12896#define HAVE_STRUCT_STAT_ST_GEN 1
12897_ACEOF
12898
12899
12900fi
12901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902ac_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 +020012903if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012904
12905cat >>confdefs.h <<_ACEOF
12906#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12907_ACEOF
12908
12909
12910fi
12911
Matthias Kloseb9621712010-04-24 17:59:49 +000012912ac_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 +020012913if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012914
Martin v. Löwis11437992002-04-12 09:54:03 +000012915cat >>confdefs.h <<_ACEOF
12916#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12917_ACEOF
12918
12919
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012920fi
12921
Michael W. Hudson54241132001-12-07 15:38:26 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12924$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012925if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927else
Matthias Kloseb159a552010-04-25 21:00:44 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012930/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012931#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012932int
12933main ()
12934{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012935return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 ;
12937 return 0;
12938}
12939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012940if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012941 ac_cv_header_time_altzone=yes
12942else
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947fi
12948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12950$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012951if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954
12955fi
12956
Guido van Rossumda88dad1995-01-26 00:46:29 +000012957was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12959$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012961/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012962
12963#include <sys/types.h>
12964#include <sys/select.h>
12965#include <sys/time.h>
12966
Martin v. Löwis11437992002-04-12 09:54:03 +000012967int
12968main ()
12969{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970;
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 ;
12972 return 0;
12973}
12974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012975if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
12977
Matthias Kloseb9621712010-04-24 17:59:49 +000012978$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012979
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012980 was_it_defined=yes
12981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12985$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12988$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012989if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012991else
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012993/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012994#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012995int
12996main ()
12997{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012998struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 ;
13000 return 0;
13001}
13002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004 ac_cv_struct_addrinfo=yes
13005else
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13009fi
13010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13012$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013013if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013016
13017fi
13018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13020$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013021if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013023else
Matthias Kloseb9621712010-04-24 17:59:49 +000013024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013025/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013026
13027# include <sys/types.h>
13028# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013029int
13030main ()
13031{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013032struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ;
13034 return 0;
13035}
13036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013038 ac_cv_struct_sockaddr_storage=yes
13039else
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13043fi
13044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13046$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013047if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013050
13051fi
13052
Guido van Rossum627b2d71993-12-24 10:39:16 +000013053# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13056$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013057if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013063int
13064main ()
13065{
13066static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013067test_array [0] = 0;
13068return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013069
13070 ;
13071 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013072}
Martin v. Löwis11437992002-04-12 09:54:03 +000013073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013074if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013075 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013076else
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13082$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013085
13086fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13089$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013090if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013092else
Matthias Kloseb9621712010-04-24 17:59:49 +000013093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013094/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013095
Martin v. Löwis11437992002-04-12 09:54:03 +000013096int
13097main ()
13098{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013101 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013103 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013104 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013105 char const *const *pcpcc;
13106 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013107 /* NEC SVR4.0.2 mips cc rejects this. */
13108 struct point {int x, y;};
13109 static struct point const zero = {0,0};
13110 /* AIX XL C 1.02.0.0 rejects this.
13111 It does not let you subtract one const X* pointer from another in
13112 an arm of an if-expression whose if-part is not a constant
13113 expression */
13114 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013116 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117 ++pcpcc;
13118 ppc = (char**) pcpcc;
13119 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013120 { /* SCO 3.2v4 cc rejects this sort of thing. */
13121 char tx;
13122 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 }
13128 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13129 int x[] = {25, 17};
13130 const int *foo = &x[0];
13131 ++foo;
13132 }
13133 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13134 typedef const int *iptr;
13135 iptr p = 0;
13136 ++p;
13137 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013138 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013140 struct s { int j; const int *ap[3]; } bx;
13141 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 }
13143 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13144 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013148#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013149
Martin v. Löwis11437992002-04-12 09:54:03 +000013150 ;
13151 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013152}
Martin v. Löwis11437992002-04-12 09:54:03 +000013153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013154if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013155 ac_cv_c_const=yes
13156else
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13162$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013163if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013166
13167fi
13168
Michael W. Hudson54241132001-12-07 15:38:26 +000013169
Guido van Rossumda88dad1995-01-26 00:46:29 +000013170works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13172$as_echo_n "checking for working volatile... " >&6; }
13173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013174/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013175
Martin v. Löwis11437992002-04-12 09:54:03 +000013176int
13177main ()
13178{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013179volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 ;
13181 return 0;
13182}
13183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013184if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013185 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013186else
Skip Montanaro6dead952003-09-25 14:50:04 +000013187
Matthias Kloseb9621712010-04-24 17:59:49 +000013188$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013189
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013190
Guido van Rossum627b2d71993-12-24 10:39:16 +000013191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13194$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013195
Guido van Rossumda88dad1995-01-26 00:46:29 +000013196works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13198$as_echo_n "checking for working signed char... " >&6; }
13199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013200/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013201
Martin v. Löwis11437992002-04-12 09:54:03 +000013202int
13203main ()
13204{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013205signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013206 ;
13207 return 0;
13208}
13209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013210if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013211 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013212else
Skip Montanaro6dead952003-09-25 14:50:04 +000013213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013215
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013216
Guido van Rossum7f43da71994-08-01 12:15:30 +000013217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13220$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013221
Guido van Rossumda88dad1995-01-26 00:46:29 +000013222have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13224$as_echo_n "checking for prototypes... " >&6; }
13225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013226/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013227int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013228int
13229main ()
13230{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013231return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 ;
13233 return 0;
13234}
13235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013236if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Matthias Kloseb159a552010-04-25 21:00:44 +000013240 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13244$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013245
Guido van Rossumda88dad1995-01-26 00:46:29 +000013246works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13248$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013251
13252#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013253int foo(int x, ...) {
13254 va_list va;
13255 va_start(va, x);
13256 va_arg(va, int);
13257 va_arg(va, char *);
13258 va_arg(va, double);
13259 return 0;
13260}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013261
Martin v. Löwis11437992002-04-12 09:54:03 +000013262int
13263main ()
13264{
Guido van Rossum90eea071996-08-30 20:58:57 +000013265return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013266 ;
13267 return 0;
13268}
13269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013270if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013275 works=yes
13276
Guido van Rossum627b2d71993-12-24 10:39:16 +000013277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13280$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013281
Martin v. Löwisd6320502004-08-12 13:45:08 +000013282# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13284$as_echo_n "checking for socketpair... " >&6; }
13285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013286/* end confdefs.h. */
13287
13288#include <sys/types.h>
13289#include <sys/socket.h>
13290
13291int
13292main ()
13293{
13294void *x=socketpair
13295 ;
13296 return 0;
13297}
13298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013302
Matthias Kloseb159a552010-04-25 21:00:44 +000013303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013304$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013305else
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13307$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013308
13309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013311
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013312# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13314$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013316/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013317#include <sys/types.h>
13318#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013319int
13320main ()
13321{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013322struct sockaddr x;
13323x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013324 ;
13325 return 0;
13326}
13327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013328if ac_fn_c_try_compile "$LINENO"; then :
13329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13330$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013333
13334else
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13336$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013337
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013340
Guido van Rossumda88dad1995-01-26 00:46:29 +000013341va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13343$as_echo_n "checking whether va_list is an array... " >&6; }
13344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013345/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346
13347#ifdef HAVE_STDARG_PROTOTYPES
13348#include <stdarg.h>
13349#else
13350#include <varargs.h>
13351#endif
13352
Martin v. Löwis11437992002-04-12 09:54:03 +000013353int
13354main ()
13355{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 ;
13358 return 0;
13359}
13360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013361if ac_fn_c_try_compile "$LINENO"; then :
13362
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013363else
Skip Montanaro6dead952003-09-25 14:50:04 +000013364
Martin v. Löwis11437992002-04-12 09:54:03 +000013365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013367
Guido van Rossumda88dad1995-01-26 00:46:29 +000013368 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013369
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13373$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013375# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
13377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013379if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13384$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013385 OLD_CFLAGS=$CFLAGS
13386 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013388/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013389
13390# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
Martin v. Löwis11437992002-04-12 09:54:03 +000013392int
13393main ()
13394{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013395
13396 char *name;
13397 struct hostent *he, *res;
13398 char buffer[2048];
13399 int buflen = 2048;
13400 int h_errnop;
13401
13402 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
13404 ;
13405 return 0;
13406}
13407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13416$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013418else
Skip Montanaro6dead952003-09-25 14:50:04 +000013419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13421$as_echo "no" >&6; }
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13423$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013425/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013426
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013427# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
Martin v. Löwis11437992002-04-12 09:54:03 +000013429int
13430main ()
13431{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013432
13433 char *name;
13434 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013435 char buffer[2048];
13436 int buflen = 2048;
13437 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013438
Matthias Kloseb159a552010-04-25 21:00:44 +000013439 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
13441 ;
13442 return 0;
13443}
13444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013448
Martin v. Löwis11437992002-04-12 09:54:03 +000013449
Matthias Kloseb159a552010-04-25 21:00:44 +000013450$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013451
Matthias Kloseb9621712010-04-24 17:59:49 +000013452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13453$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013455else
Skip Montanaro6dead952003-09-25 14:50:04 +000013456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13458$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13460$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13462/* end confdefs.h. */
13463
13464# include <netdb.h>
13465
13466int
13467main ()
13468{
13469
13470 char *name;
13471 struct hostent *he;
13472 struct hostent_data data;
13473
13474 (void) gethostbyname_r(name, he, &data);
13475
13476 ;
13477 return 0;
13478}
13479_ACEOF
13480if ac_fn_c_try_compile "$LINENO"; then :
13481
13482 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13483
13484
13485$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13486
13487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13488$as_echo "yes" >&6; }
13489
13490else
13491
13492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13493$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013497
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013500
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013503 CFLAGS=$OLD_CFLAGS
13504
13505else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 for ac_func in gethostbyname
13508do :
13509 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013510if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013513_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013514
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013515fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013516done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013517
Michael W. Hudson54241132001-12-07 15:38:26 +000013518
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013519fi
13520
Michael W. Hudson54241132001-12-07 15:38:26 +000013521
13522
13523
13524
13525
13526
Guido van Rossum627b2d71993-12-24 10:39:16 +000013527# checks for system services
13528# (none yet)
13529
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013530# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013531ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013532if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013533
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013534else
Matthias Kloseb9621712010-04-24 17:59:49 +000013535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13536$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013537if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539else
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013541LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545/* Override any GCC internal prototype to avoid an error.
13546 Use char because int might match the return type of a GCC
13547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013548#ifdef __cplusplus
13549extern "C"
13550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013551char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013552int
13553main ()
13554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013555return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 ;
13557 return 0;
13558}
13559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013560if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013565rm -f core conftest.err conftest.$ac_objext \
13566 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013567LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13570$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013571if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013572 cat >>confdefs.h <<_ACEOF
13573#define HAVE_LIBIEEE 1
13574_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013576 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577
Guido van Rossum627b2d71993-12-24 10:39:16 +000013578fi
13579
Michael W. Hudson54241132001-12-07 15:38:26 +000013580
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013581fi
13582
Michael W. Hudson54241132001-12-07 15:38:26 +000013583
Guido van Rossum7f253911997-05-09 02:42:48 +000013584# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13586$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013588# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013589if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013590 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013591if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013592then
13593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13597$as_echo "yes" >&6; }
13598else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13599$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013600fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013601else
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13603$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604fi
13605
Guido van Rossum7f253911997-05-09 02:42:48 +000013606
Guido van Rossum7f43da71994-08-01 12:15:30 +000013607# check for --with-libm=...
13608
Guido van Rossum563e7081996-09-10 18:20:48 +000013609case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013610Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013611*) LIBM=-lm
13612esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13614$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013617if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013618 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013619if test "$withval" = no
13620then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13622$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013623elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013624then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13626$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013627else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013628fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013629else
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13631$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013632fi
13633
Guido van Rossum7f43da71994-08-01 12:15:30 +000013634
13635# check for --with-libc=...
13636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13638$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013640# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013641if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013643if test "$withval" = no
13644then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13646$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013647elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013648then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13650$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013651else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013652fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13655$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013656fi
13657
Guido van Rossum7f43da71994-08-01 12:15:30 +000013658
Stefan Krah1919b7e2012-03-21 18:25:23 +010013659# **************************************
13660# * Check for gcc x64 inline assembler *
13661# **************************************
13662
13663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13664$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13666/* end confdefs.h. */
13667
13668int
13669main ()
13670{
13671
13672 __asm__ __volatile__ ("movq %rcx, %rax");
13673
13674 ;
13675 return 0;
13676}
13677_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013678if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013679 have_gcc_asm_for_x64=yes
13680else
13681 have_gcc_asm_for_x64=no
13682fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013683rm -f core conftest.err conftest.$ac_objext \
13684 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13686$as_echo "$have_gcc_asm_for_x64" >&6; }
13687if test "$have_gcc_asm_for_x64" = yes
13688then
13689
13690$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13691
13692fi
13693
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013694# **************************************************
13695# * Check for various properties of floating point *
13696# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013697
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13699$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013700if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013702else
13703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013705 ac_cv_little_endian_double=no
13706else
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013708/* end confdefs.h. */
13709
13710#include <string.h>
13711int main() {
13712 double x = 9006104071832581.0;
13713 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13714 return 0;
13715 else
13716 return 1;
13717}
13718
13719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013720if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013721 ac_cv_little_endian_double=yes
13722else
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013727fi
13728
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013729fi
13730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13732$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013733if test "$ac_cv_little_endian_double" = yes
13734then
13735
Matthias Kloseb9621712010-04-24 17:59:49 +000013736$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013737
13738fi
13739
Matthias Kloseb9621712010-04-24 17:59:49 +000013740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13741$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013742if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013744else
13745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013747 ac_cv_big_endian_double=no
13748else
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013750/* end confdefs.h. */
13751
13752#include <string.h>
13753int main() {
13754 double x = 9006104071832581.0;
13755 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13756 return 0;
13757 else
13758 return 1;
13759}
13760
13761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013762if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013763 ac_cv_big_endian_double=yes
13764else
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013769fi
13770
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013771fi
13772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13774$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013775if test "$ac_cv_big_endian_double" = yes
13776then
13777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779
13780fi
13781
13782# Some ARM platforms use a mixed-endian representation for doubles.
13783# While Python doesn't currently have full support for these platforms
13784# (see e.g., issue 1762561), we can at least make sure that float <-> string
13785# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13787$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013788if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013790else
13791
Matthias Kloseb9621712010-04-24 17:59:49 +000013792if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013793 ac_cv_mixed_endian_double=no
13794else
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013796/* end confdefs.h. */
13797
13798#include <string.h>
13799int main() {
13800 double x = 9006104071832581.0;
13801 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13802 return 0;
13803 else
13804 return 1;
13805}
13806
13807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013808if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013809 ac_cv_mixed_endian_double=yes
13810else
Matthias Kloseb9621712010-04-24 17:59:49 +000013811 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815fi
13816
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013817fi
13818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13820$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013821if test "$ac_cv_mixed_endian_double" = yes
13822then
13823
Matthias Kloseb9621712010-04-24 17:59:49 +000013824$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013825
13826fi
13827
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013828# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013829# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013830# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013831# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013832# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013833# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013834
13835# This inline assembler syntax may also work for suncc and icc,
13836# so we try it on all platforms.
13837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13839$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013841/* end confdefs.h. */
13842
13843int
13844main ()
13845{
13846
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013847 unsigned short cw;
13848 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13849 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013850
13851 ;
13852 return 0;
13853}
13854_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013855if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013856 have_gcc_asm_for_x87=yes
13857else
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013859fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013860rm -f core conftest.err conftest.$ac_objext \
13861 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13863$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013864if test "$have_gcc_asm_for_x87" = yes
13865then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013866
Matthias Kloseb9621712010-04-24 17:59:49 +000013867$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013868
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013870
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13872$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13874/* end confdefs.h. */
13875
13876int
13877main ()
13878{
13879
13880 unsigned int fpcr;
13881 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13882 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13883
13884 ;
13885 return 0;
13886}
13887_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013888if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013889 have_gcc_asm_for_mc68881=yes
13890else
13891 have_gcc_asm_for_mc68881=no
13892fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013893rm -f core conftest.err conftest.$ac_objext \
13894 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13896$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13897if test "$have_gcc_asm_for_mc68881" = yes
13898then
13899
13900$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13901
13902fi
13903
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013904# Detect whether system arithmetic is subject to x87-style double
13905# rounding issues. The result of this test has little meaning on non
13906# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13907# mode is round-to-nearest and double rounding issues are present, and
13908# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13910$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013911# $BASECFLAGS may affect the result
13912ac_save_cc="$CC"
13913CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013914if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013915 ac_cv_x87_double_rounding=no
13916else
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013918/* end confdefs.h. */
13919
13920#include <stdlib.h>
13921#include <math.h>
13922int main() {
13923 volatile double x, y, z;
13924 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13925 x = 0.99999999999999989; /* 1-2**-53 */
13926 y = 1./x;
13927 if (y != 1.)
13928 exit(0);
13929 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13930 x = 1e16;
13931 y = 2.99999;
13932 z = x + y;
13933 if (z != 1e16+4.)
13934 exit(0);
13935 /* both tests show evidence of double rounding */
13936 exit(1);
13937}
13938
13939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013940if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013941 ac_cv_x87_double_rounding=no
13942else
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013947fi
13948
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13951$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013952if test "$ac_cv_x87_double_rounding" = yes
13953then
13954
Matthias Kloseb9621712010-04-24 17:59:49 +000013955$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013956
13957fi
13958
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013959# ************************************
13960# * Check for mathematical functions *
13961# ************************************
13962
13963LIBS_SAVE=$LIBS
13964LIBS="$LIBS $LIBM"
13965
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013966for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13967do :
13968 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13969ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013970if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013971 cat >>confdefs.h <<_ACEOF
13972#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13973_ACEOF
13974
13975fi
13976done
13977
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013978for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013979do :
13980 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13981ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013982if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013983 cat >>confdefs.h <<_ACEOF
13984#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13985_ACEOF
13986
13987fi
13988done
13989
13990ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13991"
Victor Stinnere0be4232011-10-25 13:06:09 +020013992if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013993 ac_have_decl=1
13994else
13995 ac_have_decl=0
13996fi
13997
13998cat >>confdefs.h <<_ACEOF
13999#define HAVE_DECL_ISINF $ac_have_decl
14000_ACEOF
14001ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14002"
Victor Stinnere0be4232011-10-25 13:06:09 +020014003if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014004 ac_have_decl=1
14005else
14006 ac_have_decl=0
14007fi
14008
14009cat >>confdefs.h <<_ACEOF
14010#define HAVE_DECL_ISNAN $ac_have_decl
14011_ACEOF
14012ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14013"
Victor Stinnere0be4232011-10-25 13:06:09 +020014014if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014015 ac_have_decl=1
14016else
14017 ac_have_decl=0
14018fi
14019
14020cat >>confdefs.h <<_ACEOF
14021#define HAVE_DECL_ISFINITE $ac_have_decl
14022_ACEOF
14023
14024
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014025# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14026# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14028$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014029if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014031else
14032
Matthias Kloseb9621712010-04-24 17:59:49 +000014033if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014034 ac_cv_tanh_preserves_zero_sign=no
14035else
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014037/* end confdefs.h. */
14038
14039#include <math.h>
14040#include <stdlib.h>
14041int main() {
14042 /* return 0 if either negative zeros don't exist
14043 on this platform or if negative zeros exist
14044 and tanh(-0.) == -0. */
14045 if (atan2(0., -1.) == atan2(-0., -1.) ||
14046 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14047 else exit(1);
14048}
14049
14050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014051if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014052 ac_cv_tanh_preserves_zero_sign=yes
14053else
Matthias Kloseb9621712010-04-24 17:59:49 +000014054 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014058fi
14059
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014060fi
14061
Matthias Kloseb9621712010-04-24 17:59:49 +000014062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14063$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014064if test "$ac_cv_tanh_preserves_zero_sign" = yes
14065then
14066
Matthias Kloseb9621712010-04-24 17:59:49 +000014067$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014068
14069fi
14070
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014071if test "$ac_cv_func_log1p" = yes
14072then
14073 # On some versions of AIX, log1p(-0.) returns 0. instead of
14074 # -0. See issue #9920.
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14076$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014077 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014078 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014079else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014080
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014081 if test "$cross_compiling" = yes; then :
14082 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014083else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14085/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014086
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014087 #include <math.h>
14088 #include <stdlib.h>
14089 int main() {
14090 /* Fail if the signs of log1p(-0.) and -0. can be
14091 distinguished. */
14092 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14093 return 0;
14094 else
14095 return 1;
14096 }
14097
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014098_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014099if ac_fn_c_try_run "$LINENO"; then :
14100 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014101else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014102 ac_cv_log1p_drops_zero_sign=yes
14103fi
14104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014106fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014107
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014108fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014109
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14111$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14112fi
14113if test "$ac_cv_log1p_drops_zero_sign" = yes
14114then
14115
14116$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14117
14118fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014119
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014120LIBS=$LIBS_SAVE
14121
Mark Dickinsona614f042009-11-28 12:48:43 +000014122# For multiprocessing module, check that sem_open
14123# actually works. For FreeBSD versions <= 7.2,
14124# the kernel module that provides POSIX semaphores
14125# isn't loaded by default, so an attempt to call
14126# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14128$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014129if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014131else
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014133 ac_cv_posix_semaphores_enabled=yes
14134else
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014136/* end confdefs.h. */
14137
14138#include <unistd.h>
14139#include <fcntl.h>
14140#include <stdio.h>
14141#include <semaphore.h>
14142#include <sys/stat.h>
14143
14144int main(void) {
14145 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14146 if (a == SEM_FAILED) {
14147 perror("sem_open");
14148 return 1;
14149 }
14150 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014151 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014152 return 0;
14153}
14154
14155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014156if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014157 ac_cv_posix_semaphores_enabled=yes
14158else
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14162 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014163fi
14164
14165
Mark Dickinsona614f042009-11-28 12:48:43 +000014166fi
14167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14169$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014170if test $ac_cv_posix_semaphores_enabled = no
14171then
14172
Matthias Kloseb9621712010-04-24 17:59:49 +000014173$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014174
14175fi
14176
Mark Dickinson10683072009-04-18 21:18:19 +000014177# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14179$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014180if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182else
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014185else
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014187/* end confdefs.h. */
14188
14189#include <unistd.h>
14190#include <fcntl.h>
14191#include <stdio.h>
14192#include <semaphore.h>
14193#include <sys/stat.h>
14194
14195int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014196 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014197 int count;
14198 int res;
14199 if(a==SEM_FAILED){
14200 perror("sem_open");
14201 return 1;
14202
14203 }
14204 res = sem_getvalue(a, &count);
14205 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014206 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014207 return res==-1 ? 1 : 0;
14208}
14209
Mark Dickinson10683072009-04-18 21:18:19 +000014210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014211if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014212 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014213else
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014218fi
14219
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014221fi
14222
Matthias Kloseb9621712010-04-24 17:59:49 +000014223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14224$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014225if test $ac_cv_broken_sem_getvalue = yes
14226then
14227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014229
14230fi
14231
Mark Dickinsonbd792642009-03-18 20:06:12 +000014232# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14234$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014235# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014236if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014237 enableval=$enable_big_digits; case $enable_big_digits in
14238yes)
14239 enable_big_digits=30 ;;
14240no)
14241 enable_big_digits=15 ;;
1424215|30)
14243 ;;
14244*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014245 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 +000014246esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14248$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014249
14250cat >>confdefs.h <<_ACEOF
14251#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14252_ACEOF
14253
14254
14255else
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14257$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014258fi
14259
14260
Guido van Rossumef2255b2000-03-10 22:30:29 +000014261# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014262ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014263if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014264
14265
Matthias Kloseb9621712010-04-24 17:59:49 +000014266$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014267
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014268 wchar_h="yes"
14269
Guido van Rossumef2255b2000-03-10 22:30:29 +000014270else
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014272
14273fi
14274
Michael W. Hudson54241132001-12-07 15:38:26 +000014275
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014277# determine wchar_t size
14278if test "$wchar_h" = yes
14279then
Matthias Kloseb9621712010-04-24 17:59:49 +000014280 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014281# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14282# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14283# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14285$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014286if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014288else
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14290"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014291
Martin v. Löwis11437992002-04-12 09:54:03 +000014292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 if test "$ac_cv_type_wchar_t" = yes; then
14294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014296as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014297See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014298 else
14299 ac_cv_sizeof_wchar_t=0
14300 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014302
Martin v. Löwis11437992002-04-12 09:54:03 +000014303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14305$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306
14307
14308
Martin v. Löwis11437992002-04-12 09:54:03 +000014309cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014310#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014311_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014312
Michael W. Hudson54241132001-12-07 15:38:26 +000014313
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014314fi
14315
Matthias Kloseb9621712010-04-24 17:59:49 +000014316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14317$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014318have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014320/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014321
14322#include <tcl.h>
14323#if TCL_UTF_MAX != 6
14324# error "NOT UCS4_TCL"
14325#endif
14326int
14327main ()
14328{
14329
14330 ;
14331 return 0;
14332}
14333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014335
14336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014338
14339 have_ucs4_tcl=yes
14340
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14344$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014345
Skip Montanaro6dead952003-09-25 14:50:04 +000014346# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014347if test "$wchar_h" = yes
14348then
14349 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14351$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014352 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014354else
14355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014357 ac_cv_wchar_t_signed=yes
14358else
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014360/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014361
14362 #include <wchar.h>
14363 int main()
14364 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014365 /* Success: exit code 0 */
14366 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014367 }
14368
14369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014370if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014371 ac_cv_wchar_t_signed=yes
14372else
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14376 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014377fi
14378
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014379fi
14380
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14382$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383fi
14384
Georg Brandl52d168a2008-01-07 18:10:24 +000014385# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014386if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014387 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014388then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014389 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014390
Matthias Kloseb9621712010-04-24 17:59:49 +000014391$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
Georg Brandl52d168a2008-01-07 18:10:24 +000014393else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014394 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014395fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14397$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014398
14399# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14401$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014402if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014404else
Matthias Kloseb9621712010-04-24 17:59:49 +000014405 ac_cv_c_bigendian=unknown
14406 # See if we're dealing with a universal compiler.
14407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14408/* end confdefs.h. */
14409#ifndef __APPLE_CC__
14410 not a universal capable compiler
14411 #endif
14412 typedef int dummy;
14413
Skip Montanaro6dead952003-09-25 14:50:04 +000014414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014415if ac_fn_c_try_compile "$LINENO"; then :
14416
14417 # Check for potential -arch flags. It is not universal unless
14418 # there are at least two -arch flags with different values.
14419 ac_arch=
14420 ac_prev=
14421 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14422 if test -n "$ac_prev"; then
14423 case $ac_word in
14424 i?86 | x86_64 | ppc | ppc64)
14425 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14426 ac_arch=$ac_word
14427 else
14428 ac_cv_c_bigendian=universal
14429 break
14430 fi
14431 ;;
14432 esac
14433 ac_prev=
14434 elif test "x$ac_word" = "x-arch"; then
14435 ac_prev=arch
14436 fi
14437 done
14438fi
14439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14440 if test $ac_cv_c_bigendian = unknown; then
14441 # See if sys/param.h defines the BYTE_ORDER macro.
14442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014443/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014444#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014446
Martin v. Löwis11437992002-04-12 09:54:03 +000014447int
14448main ()
14449{
Matthias Kloseb9621712010-04-24 17:59:49 +000014450#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14451 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14452 && LITTLE_ENDIAN)
14453 bogus endian macros
14454 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014455
14456 ;
14457 return 0;
14458}
14459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014460if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014461 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014463/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014464#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014466
Martin v. Löwis11437992002-04-12 09:54:03 +000014467int
14468main ()
14469{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014470#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 not big endian
14472 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014473
14474 ;
14475 return 0;
14476}
14477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014478if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014479 ac_cv_c_bigendian=yes
14480else
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014484fi
14485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14486 fi
14487 if test $ac_cv_c_bigendian = unknown; then
14488 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014490/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014491#include <limits.h>
14492
Martin v. Löwis11437992002-04-12 09:54:03 +000014493int
14494main ()
14495{
Matthias Kloseb9621712010-04-24 17:59:49 +000014496#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14497 bogus endian macros
14498 #endif
14499
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 ;
14501 return 0;
14502}
14503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014504if ac_fn_c_try_compile "$LINENO"; then :
14505 # It does; now see whether it defined to _BIG_ENDIAN or not.
14506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14507/* end confdefs.h. */
14508#include <limits.h>
14509
14510int
14511main ()
14512{
14513#ifndef _BIG_ENDIAN
14514 not big endian
14515 #endif
14516
14517 ;
14518 return 0;
14519}
14520_ACEOF
14521if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014522 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014523else
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14527fi
14528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14529 fi
14530 if test $ac_cv_c_bigendian = unknown; then
14531 # Compile a test program.
14532 if test "$cross_compiling" = yes; then :
14533 # Try to guess by grepping values from an object file.
14534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14535/* end confdefs.h. */
14536short int ascii_mm[] =
14537 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14538 short int ascii_ii[] =
14539 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14540 int use_ascii (int i) {
14541 return ascii_mm[i] + ascii_ii[i];
14542 }
14543 short int ebcdic_ii[] =
14544 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14545 short int ebcdic_mm[] =
14546 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14547 int use_ebcdic (int i) {
14548 return ebcdic_mm[i] + ebcdic_ii[i];
14549 }
14550 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014551
Matthias Kloseb9621712010-04-24 17:59:49 +000014552int
14553main ()
14554{
14555return use_ascii (foo) == use_ebcdic (foo);
14556 ;
14557 return 0;
14558}
14559_ACEOF
14560if ac_fn_c_try_compile "$LINENO"; then :
14561 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14562 ac_cv_c_bigendian=yes
14563 fi
14564 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14565 if test "$ac_cv_c_bigendian" = unknown; then
14566 ac_cv_c_bigendian=no
14567 else
14568 # finding both strings is unlikely to happen, but who knows?
14569 ac_cv_c_bigendian=unknown
14570 fi
14571 fi
14572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014574else
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014576/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014578int
14579main ()
14580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 /* Are we little or big endian? From Harbison&Steele. */
14583 union
14584 {
14585 long int l;
14586 char c[sizeof (long int)];
14587 } u;
14588 u.l = 1;
14589 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590
14591 ;
14592 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014593}
Martin v. Löwis11437992002-04-12 09:54:03 +000014594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014595if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014596 ac_cv_c_bigendian=no
14597else
Matthias Kloseb9621712010-04-24 17:59:49 +000014598 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14601 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14607$as_echo "$ac_cv_c_bigendian" >&6; }
14608 case $ac_cv_c_bigendian in #(
14609 yes)
14610 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14611;; #(
14612 no)
14613 ;; #(
14614 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014617
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 ;; #(
14619 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014620 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014621 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014623
Michael W. Hudson54241132001-12-07 15:38:26 +000014624
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014625# ABI version string for Python extension modules. This appears between the
14626# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14627# from the following attributes which affect the ABI of this Python build (in
14628# this order):
14629#
14630# * The Python implementation (always 'cpython-' for us)
14631# * The major and minor version numbers
14632# * --with-pydebug (adds a 'd')
14633# * --with-pymalloc (adds a 'm')
14634# * --with-wide-unicode (adds a 'u')
14635#
14636# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014637# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14638# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014639
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14641$as_echo_n "checking ABIFLAGS... " >&6; }
14642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14643$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14645$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014646SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14648$as_echo "$SOABI" >&6; }
14649
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014650
14651case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014652 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014653 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14654 *)
14655 EXT_SUFFIX=${SHLIB_SUFFIX};;
14656esac
14657
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14659$as_echo_n "checking LDVERSION... " >&6; }
14660LDVERSION='$(VERSION)$(ABIFLAGS)'
14661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14662$as_echo "$LDVERSION" >&6; }
14663
doko@python.org87421192013-01-26 11:39:31 +010014664
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014665LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014666
14667
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014668# Check whether right shifting a negative integer extends the sign bit
14669# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14671$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014672if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014674else
Martin v. Löwis11437992002-04-12 09:54:03 +000014675
Matthias Kloseb9621712010-04-24 17:59:49 +000014676if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014677 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014678else
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014680/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014681
14682int main()
14683{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014684 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014685}
14686
Martin v. Löwis11437992002-04-12 09:54:03 +000014687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014688if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014689 ac_cv_rshift_extends_sign=yes
14690else
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14694 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014695fi
14696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014697fi
14698
Matthias Kloseb9621712010-04-24 17:59:49 +000014699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14700$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014701if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014702then
Martin v. Löwis11437992002-04-12 09:54:03 +000014703
Matthias Kloseb9621712010-04-24 17:59:49 +000014704$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014705
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014706fi
14707
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014708# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14710$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014711if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014713else
Martin v. Löwis11437992002-04-12 09:54:03 +000014714
Matthias Kloseb9621712010-04-24 17:59:49 +000014715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014716/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014717#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014718int
14719main ()
14720{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014721
14722 FILE *f = fopen("/dev/null", "r");
14723 flockfile(f);
14724 getc_unlocked(f);
14725 funlockfile(f);
14726
Martin v. Löwis11437992002-04-12 09:54:03 +000014727 ;
14728 return 0;
14729}
14730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014731if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014732 ac_cv_have_getc_unlocked=yes
14733else
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 ac_cv_have_getc_unlocked=no
14735fi
14736rm -f core conftest.err conftest.$ac_objext \
14737 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739
Matthias Kloseb9621712010-04-24 17:59:49 +000014740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14741$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014742if test "$ac_cv_have_getc_unlocked" = yes
14743then
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014746
14747fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014748
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014749# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014750# save the value of LIBS so we don't actually link Python with readline
14751LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014752
Gregory P. Smith18820942008-09-07 06:24:49 +000014753# On some systems we need to link readline to a termcap compatible
14754# library. NOTE: Keep the precedence of listed libraries synchronised
14755# with setup.py.
14756py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14758$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014759for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014760 if test -z "$py_libtermcap"; then
14761 READLINE_LIBS="-lreadline"
14762 else
14763 READLINE_LIBS="-lreadline -l$py_libtermcap"
14764 fi
14765 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014767/* end confdefs.h. */
14768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769/* Override any GCC internal prototype to avoid an error.
14770 Use char because int might match the return type of a GCC
14771 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014772#ifdef __cplusplus
14773extern "C"
14774#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014775char readline ();
14776int
14777main ()
14778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014780 ;
14781 return 0;
14782}
14783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014784if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014785 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014787rm -f core conftest.err conftest.$ac_objext \
14788 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014789 if test $py_cv_lib_readline = yes; then
14790 break
14791 fi
14792done
14793# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14794#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014795if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14797$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014798else
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14800$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014801
Matthias Kloseb9621712010-04-24 17:59:49 +000014802$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014803
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014804fi
14805
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014806# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14808$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014809if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014811else
14812 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014813LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014815/* end confdefs.h. */
14816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817/* Override any GCC internal prototype to avoid an error.
14818 Use char because int might match the return type of a GCC
14819 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014820#ifdef __cplusplus
14821extern "C"
14822#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014823char rl_callback_handler_install ();
14824int
14825main ()
14826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014828 ;
14829 return 0;
14830}
14831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014832if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014833 ac_cv_lib_readline_rl_callback_handler_install=yes
14834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014837rm -f core conftest.err conftest.$ac_objext \
14838 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014839LIBS=$ac_check_lib_save_LIBS
14840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14842$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014843if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014846
14847fi
14848
14849
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014850# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014852/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014853#include <readline/readline.h>
14854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014855if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014856 have_readline=yes
14857else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014858 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014859
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014860fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014861rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014862if test $have_readline = yes
14863then
Matthias Kloseb9621712010-04-24 17:59:49 +000014864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014865/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014866#include <readline/readline.h>
14867
14868_ACEOF
14869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014871
Matthias Kloseb9621712010-04-24 17:59:49 +000014872$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014873
14874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014875rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014878/* end confdefs.h. */
14879#include <readline/readline.h>
14880
14881_ACEOF
14882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014884
Matthias Kloseb9621712010-04-24 17:59:49 +000014885$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014886
14887fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014888rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014889
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014890fi
14891
Martin v. Löwis0daad592001-09-30 21:09:59 +000014892# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14894$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014895if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014897else
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014899LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903/* Override any GCC internal prototype to avoid an error.
14904 Use char because int might match the return type of a GCC
14905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014906#ifdef __cplusplus
14907extern "C"
14908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014909char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014910int
14911main ()
14912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 ;
14915 return 0;
14916}
14917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014918if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014920else
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014923rm -f core conftest.err conftest.$ac_objext \
14924 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014925LIBS=$ac_check_lib_save_LIBS
14926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14928$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014929if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014930
Matthias Kloseb9621712010-04-24 17:59:49 +000014931$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014932
Martin v. Löwis0daad592001-09-30 21:09:59 +000014933fi
14934
Michael W. Hudson54241132001-12-07 15:38:26 +000014935
Thomas Wouters89d996e2007-09-08 17:39:28 +000014936# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14938$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014939if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014941else
14942 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014943LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014945/* end confdefs.h. */
14946
14947/* Override any GCC internal prototype to avoid an error.
14948 Use char because int might match the return type of a GCC
14949 builtin and then its argument prototype would still apply. */
14950#ifdef __cplusplus
14951extern "C"
14952#endif
14953char rl_completion_display_matches_hook ();
14954int
14955main ()
14956{
14957return rl_completion_display_matches_hook ();
14958 ;
14959 return 0;
14960}
14961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014962if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014963 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14964else
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014967rm -f core conftest.err conftest.$ac_objext \
14968 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014969LIBS=$ac_check_lib_save_LIBS
14970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14972$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014973if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014974
Matthias Kloseb9621712010-04-24 17:59:49 +000014975$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014976
14977fi
14978
14979
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014980# also in 4.0, but not in editline
14981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14982$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14983if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14984 $as_echo_n "(cached) " >&6
14985else
14986 ac_check_lib_save_LIBS=$LIBS
14987LIBS="-lreadline $READLINE_LIBS $LIBS"
14988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14989/* end confdefs.h. */
14990
14991/* Override any GCC internal prototype to avoid an error.
14992 Use char because int might match the return type of a GCC
14993 builtin and then its argument prototype would still apply. */
14994#ifdef __cplusplus
14995extern "C"
14996#endif
14997char rl_resize_terminal ();
14998int
14999main ()
15000{
15001return rl_resize_terminal ();
15002 ;
15003 return 0;
15004}
15005_ACEOF
15006if ac_fn_c_try_link "$LINENO"; then :
15007 ac_cv_lib_readline_rl_resize_terminal=yes
15008else
15009 ac_cv_lib_readline_rl_resize_terminal=no
15010fi
15011rm -f core conftest.err conftest.$ac_objext \
15012 conftest$ac_exeext conftest.$ac_ext
15013LIBS=$ac_check_lib_save_LIBS
15014fi
15015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15016$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15017if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15018
15019$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15020
15021fi
15022
15023
Martin v. Löwis0daad592001-09-30 21:09:59 +000015024# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15026$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015027if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015029else
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015031LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035/* Override any GCC internal prototype to avoid an error.
15036 Use char because int might match the return type of a GCC
15037 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015038#ifdef __cplusplus
15039extern "C"
15040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015041char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015042int
15043main ()
15044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 ;
15047 return 0;
15048}
15049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015052else
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015055rm -f core conftest.err conftest.$ac_objext \
15056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015057LIBS=$ac_check_lib_save_LIBS
15058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15060$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015061if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015064
Guido van Rossum353ae582001-07-10 16:45:32 +000015065fi
15066
Jack Jansendd19cf82001-12-06 22:36:17 +000015067
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015068# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015070/* end confdefs.h. */
15071#include <readline/readline.h>
15072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015073if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015074 have_readline=yes
15075else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015076 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015077
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015078fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015079rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015080if test $have_readline = yes
15081then
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015083/* end confdefs.h. */
15084#include <readline/readline.h>
15085
15086_ACEOF
15087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015089
Matthias Kloseb9621712010-04-24 17:59:49 +000015090$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015091
15092fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015093rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015094
15095fi
15096
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15098$as_echo_n "checking for append_history in -lreadline... " >&6; }
15099if ${ac_cv_lib_readline_append_history+:} false; then :
15100 $as_echo_n "(cached) " >&6
15101else
15102 ac_check_lib_save_LIBS=$LIBS
15103LIBS="-lreadline $READLINE_LIBS $LIBS"
15104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15105/* end confdefs.h. */
15106
15107/* Override any GCC internal prototype to avoid an error.
15108 Use char because int might match the return type of a GCC
15109 builtin and then its argument prototype would still apply. */
15110#ifdef __cplusplus
15111extern "C"
15112#endif
15113char append_history ();
15114int
15115main ()
15116{
15117return append_history ();
15118 ;
15119 return 0;
15120}
15121_ACEOF
15122if ac_fn_c_try_link "$LINENO"; then :
15123 ac_cv_lib_readline_append_history=yes
15124else
15125 ac_cv_lib_readline_append_history=no
15126fi
15127rm -f core conftest.err conftest.$ac_objext \
15128 conftest$ac_exeext conftest.$ac_ext
15129LIBS=$ac_check_lib_save_LIBS
15130fi
15131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15132$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15133if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15134
15135$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15136
15137fi
15138
15139
Martin v. Löwis82bca632006-02-10 20:49:30 +000015140# End of readline checks: restore LIBS
15141LIBS=$LIBS_no_readline
15142
Matthias Kloseb9621712010-04-24 17:59:49 +000015143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15144$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015145if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015147else
Martin v. Löwis11437992002-04-12 09:54:03 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015150 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015151else
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015153/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015154
15155int main()
15156{
15157 int val1 = nice(1);
15158 if (val1 != -1 && val1 == nice(2))
15159 exit(0);
15160 exit(1);
15161}
15162
Martin v. Löwis11437992002-04-12 09:54:03 +000015163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015164if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015165 ac_cv_broken_nice=yes
15166else
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015171fi
15172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015173fi
15174
Matthias Kloseb9621712010-04-24 17:59:49 +000015175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15176$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015177if test "$ac_cv_broken_nice" = yes
15178then
Martin v. Löwis11437992002-04-12 09:54:03 +000015179
Matthias Kloseb9621712010-04-24 17:59:49 +000015180$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015181
15182fi
15183
Matthias Kloseb9621712010-04-24 17:59:49 +000015184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15185$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015186if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015188else
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015190 ac_cv_broken_poll=no
15191else
Matthias Kloseb9621712010-04-24 17:59:49 +000015192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015193/* end confdefs.h. */
15194
15195#include <poll.h>
15196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015197int main()
15198{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015199 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015200 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015201
15202 close (42);
15203
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015204 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015205 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015206 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015207 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015208 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015209 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015210 return 1;
15211}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015212
15213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015214if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015215 ac_cv_broken_poll=yes
15216else
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15220 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015223fi
15224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15226$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015227if test "$ac_cv_broken_poll" = yes
15228then
15229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015231
15232fi
15233
Brett Cannon43802422005-02-10 20:48:03 +000015234# 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 +000015235# (which is not required by ISO C or UNIX spec) and/or if we support
15236# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015237ac_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 +000015238#include <$ac_cv_struct_tm>
15239
Matthias Kloseb9621712010-04-24 17:59:49 +000015240"
Victor Stinnere0be4232011-10-25 13:06:09 +020015241if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015242
15243cat >>confdefs.h <<_ACEOF
15244#define HAVE_STRUCT_TM_TM_ZONE 1
15245_ACEOF
15246
15247
15248fi
15249
15250if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15251
Matthias Kloseb9621712010-04-24 17:59:49 +000015252$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015253
15254else
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15256"
Victor Stinnere0be4232011-10-25 13:06:09 +020015257if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259else
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261fi
15262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015264#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265_ACEOF
15266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15268$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015269if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271else
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015273/* end confdefs.h. */
15274#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275#if !HAVE_DECL_TZNAME
15276extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015277#endif
15278
15279int
15280main ()
15281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015283 ;
15284 return 0;
15285}
15286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015287if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015288 ac_cv_var_tzname=yes
15289else
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015292rm -f core conftest.err conftest.$ac_objext \
15293 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15296$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015297 if test $ac_cv_var_tzname = yes; then
15298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015300
15301 fi
15302fi
15303
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015304
Martin v. Löwis1d459062005-03-14 21:23:33 +000015305# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15307$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015308if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015309 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015310else
15311
Matthias Kloseb9621712010-04-24 17:59:49 +000015312if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015313 ac_cv_working_tzset=no
15314else
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015316/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015317
15318#include <stdlib.h>
15319#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015320#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015321
15322#if HAVE_TZNAME
15323extern char *tzname[];
15324#endif
15325
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015326int main()
15327{
Brett Cannon18367812003-09-19 00:59:16 +000015328 /* Note that we need to ensure that not only does tzset(3)
15329 do 'something' with localtime, but it works as documented
15330 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015331 This includes making sure that tzname is set properly if
15332 tm->tm_zone does not exist since it is the alternative way
15333 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015334
15335 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015336 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015337 */
15338
Martin v. Löwis1d459062005-03-14 21:23:33 +000015339 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015340 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15341
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015342 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015343 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015344 if (localtime(&groundhogday)->tm_hour != 0)
15345 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015346#if HAVE_TZNAME
15347 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15348 if (strcmp(tzname[0], "UTC") ||
15349 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15350 exit(1);
15351#endif
Brett Cannon18367812003-09-19 00:59:16 +000015352
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015353 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015354 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015355 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015356 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015357#if HAVE_TZNAME
15358 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15359 exit(1);
15360#endif
Brett Cannon18367812003-09-19 00:59:16 +000015361
15362 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15363 tzset();
15364 if (localtime(&groundhogday)->tm_hour != 11)
15365 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015366#if HAVE_TZNAME
15367 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15368 exit(1);
15369#endif
15370
15371#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015372 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15373 exit(1);
15374 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15375 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015376#endif
Brett Cannon18367812003-09-19 00:59:16 +000015377
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015378 exit(0);
15379}
15380
15381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015382if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015383 ac_cv_working_tzset=yes
15384else
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15388 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015389fi
15390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391fi
15392
Matthias Kloseb9621712010-04-24 17:59:49 +000015393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15394$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015395if test "$ac_cv_working_tzset" = yes
15396then
15397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015399
15400fi
15401
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015402# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15404$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015405if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015409/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015410#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015411int
15412main ()
15413{
15414
15415struct stat st;
15416st.st_mtim.tv_nsec = 1;
15417
15418 ;
15419 return 0;
15420}
15421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015423 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015424else
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15428fi
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15431$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015432if test "$ac_cv_stat_tv_nsec" = yes
15433then
15434
Matthias Kloseb9621712010-04-24 17:59:49 +000015435$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015436
15437fi
15438
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015439# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15441$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015442if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015444else
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015446/* end confdefs.h. */
15447#include <sys/stat.h>
15448int
15449main ()
15450{
15451
15452struct stat st;
15453st.st_mtimespec.tv_nsec = 1;
15454
15455 ;
15456 return 0;
15457}
15458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015460 ac_cv_stat_tv_nsec2=yes
15461else
Matthias Kloseb9621712010-04-24 17:59:49 +000015462 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15465fi
15466
Matthias Kloseb9621712010-04-24 17:59:49 +000015467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15468$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015469if test "$ac_cv_stat_tv_nsec2" = yes
15470then
15471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015473
15474fi
15475
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015476# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015477ac_save_cppflags="$CPPFLAGS"
15478CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015479
15480for ac_header in curses.h ncurses.h
15481do :
15482 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15483ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15484if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15485 cat >>confdefs.h <<_ACEOF
15486#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15487_ACEOF
15488
15489fi
15490
15491done
15492
15493
15494# On Solaris, term.h requires curses.h
15495for ac_header in term.h
15496do :
15497 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15498#ifdef HAVE_CURSES_H
15499#include <curses.h>
15500#endif
15501
15502"
15503if test "x$ac_cv_header_term_h" = xyes; then :
15504 cat >>confdefs.h <<_ACEOF
15505#define HAVE_TERM_H 1
15506_ACEOF
15507
15508fi
15509
15510done
15511
15512
Jack Jansen666b1e72001-10-31 12:11:48 +000015513# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15515$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015516if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015518else
Matthias Kloseb9621712010-04-24 17:59:49 +000015519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015520/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015521#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015522int
15523main ()
15524{
Jack Jansen666b1e72001-10-31 12:11:48 +000015525
15526 int rtn;
15527 rtn = mvwdelch(0,0,0);
15528
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 ;
15530 return 0;
15531}
15532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015533if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015534 ac_cv_mvwdelch_is_expression=yes
15535else
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15539fi
15540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15542$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015543
15544if test "$ac_cv_mvwdelch_is_expression" = yes
15545then
Martin v. Löwis11437992002-04-12 09:54:03 +000015546
Matthias Kloseb9621712010-04-24 17:59:49 +000015547$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015548
15549fi
15550
Matthias Kloseb9621712010-04-24 17:59:49 +000015551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15552$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015553if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015555else
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015557/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015558#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015559int
15560main ()
15561{
Jack Jansen666b1e72001-10-31 12:11:48 +000015562
15563 WINDOW *w;
15564 w->_flags = 0;
15565
Martin v. Löwis11437992002-04-12 09:54:03 +000015566 ;
15567 return 0;
15568}
15569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015570if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015571 ac_cv_window_has_flags=yes
15572else
Matthias Kloseb9621712010-04-24 17:59:49 +000015573 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15576fi
15577
Matthias Kloseb9621712010-04-24 17:59:49 +000015578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15579$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015580
Jack Jansen666b1e72001-10-31 12:11:48 +000015581
15582if test "$ac_cv_window_has_flags" = yes
15583then
Martin v. Löwis11437992002-04-12 09:54:03 +000015584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015586
15587fi
15588
Matthias Kloseb9621712010-04-24 17:59:49 +000015589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15590$as_echo_n "checking for is_term_resized... " >&6; }
15591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015592/* end confdefs.h. */
15593#include <curses.h>
15594int
15595main ()
15596{
15597void *x=is_term_resized
15598 ;
15599 return 0;
15600}
15601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015602if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015603
Matthias Kloseb9621712010-04-24 17:59:49 +000015604$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015605
Matthias Kloseb159a552010-04-25 21:00:44 +000015606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015607$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015608else
Matthias Kloseb9621712010-04-24 17:59:49 +000015609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15610$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015611
15612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15614
Matthias Kloseb9621712010-04-24 17:59:49 +000015615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15616$as_echo_n "checking for resize_term... " >&6; }
15617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015618/* end confdefs.h. */
15619#include <curses.h>
15620int
15621main ()
15622{
15623void *x=resize_term
15624 ;
15625 return 0;
15626}
15627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015628if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015629
Matthias Kloseb9621712010-04-24 17:59:49 +000015630$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015631
Matthias Kloseb159a552010-04-25 21:00:44 +000015632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015633$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015634else
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15636$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015637
15638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15640
Matthias Kloseb9621712010-04-24 17:59:49 +000015641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15642$as_echo_n "checking for resizeterm... " >&6; }
15643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015644/* end confdefs.h. */
15645#include <curses.h>
15646int
15647main ()
15648{
15649void *x=resizeterm
15650 ;
15651 return 0;
15652}
15653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015654if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015657
Matthias Kloseb159a552010-04-25 21:00:44 +000015658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015659$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015660else
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15662$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015663
15664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015666# last curses configure check
15667CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015668
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15670$as_echo "$as_me: checking for device files" >&6;}
15671
15672if test "x$cross_compiling" = xyes; then
15673 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15675$as_echo_n "checking for /dev/ptmx... " >&6; }
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15677$as_echo "not set" >&6; }
15678 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15679 fi
15680 if test "${ac_cv_file__dev_ptc+set}" != set; then
15681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15682$as_echo_n "checking for /dev/ptc... " >&6; }
15683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15684$as_echo "not set" >&6; }
15685 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15686 fi
15687fi
15688
Matthias Kloseb9621712010-04-24 17:59:49 +000015689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15690$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015691if ${ac_cv_file__dev_ptmx+:} false; then :
15692 $as_echo_n "(cached) " >&6
15693else
15694 test "$cross_compiling" = yes &&
15695 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15696if test -r "/dev/ptmx"; then
15697 ac_cv_file__dev_ptmx=yes
15698else
15699 ac_cv_file__dev_ptmx=no
15700fi
15701fi
15702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15703$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15704if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015705
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015706fi
15707
15708if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015709
Matthias Kloseb9621712010-04-24 17:59:49 +000015710$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015711
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15714$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015715if ${ac_cv_file__dev_ptc+:} false; then :
15716 $as_echo_n "(cached) " >&6
15717else
15718 test "$cross_compiling" = yes &&
15719 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15720if test -r "/dev/ptc"; then
15721 ac_cv_file__dev_ptc=yes
15722else
15723 ac_cv_file__dev_ptc=no
15724fi
15725fi
15726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15727$as_echo "$ac_cv_file__dev_ptc" >&6; }
15728if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015729
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015730fi
15731
15732if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015733
Matthias Kloseb9621712010-04-24 17:59:49 +000015734$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015735
Neal Norwitz865400f2003-03-21 01:42:58 +000015736fi
15737
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015738if test "$have_long_long" = yes
15739then
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15741$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015742 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015744else
Matthias Kloseb9621712010-04-24 17:59:49 +000015745 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015746 ac_cv_have_long_long_format="cross -- assuming no"
15747 if test x$GCC = xyes; then
15748 save_CFLAGS=$CFLAGS
15749 CFLAGS="$CFLAGS -Werror -Wformat"
15750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15751/* end confdefs.h. */
15752
15753 #include <stdio.h>
15754 #include <stddef.h>
15755
15756int
15757main ()
15758{
15759
15760 char *buffer;
15761 sprintf(buffer, "%lld", (long long)123);
15762 sprintf(buffer, "%lld", (long long)-123);
15763 sprintf(buffer, "%llu", (unsigned long long)123);
15764
15765 ;
15766 return 0;
15767}
15768_ACEOF
15769if ac_fn_c_try_compile "$LINENO"; then :
15770 ac_cv_have_long_long_format=yes
15771
15772fi
15773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15774 CFLAGS=$save_CFLAGS
15775 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015776else
Matthias Kloseb9621712010-04-24 17:59:49 +000015777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015778/* end confdefs.h. */
15779
15780 #include <stdio.h>
15781 #include <stddef.h>
15782 #include <string.h>
15783
15784 #ifdef HAVE_SYS_TYPES_H
15785 #include <sys/types.h>
15786 #endif
15787
15788 int main()
15789 {
15790 char buffer[256];
15791
15792 if (sprintf(buffer, "%lld", (long long)123) < 0)
15793 return 1;
15794 if (strcmp(buffer, "123"))
15795 return 1;
15796
15797 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15798 return 1;
15799 if (strcmp(buffer, "-123"))
15800 return 1;
15801
15802 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15803 return 1;
15804 if (strcmp(buffer, "123"))
15805 return 1;
15806
15807 return 0;
15808 }
15809
15810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015811if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015812 ac_cv_have_long_long_format=yes
15813else
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15817 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015818fi
15819
15820
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015821fi
15822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15824$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015825fi
15826
Mark Dickinson89d7d412009-12-31 20:50:59 +000015827if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015828then
15829
Matthias Kloseb9621712010-04-24 17:59:49 +000015830$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015831
15832fi
15833
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015834if test $ac_sys_system = Darwin
15835then
15836 LIBS="$LIBS -framework CoreFoundation"
15837fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15840$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015841if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015843else
Matthias Kloseb9621712010-04-24 17:59:49 +000015844 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015845 ac_cv_have_size_t_format="cross -- assuming yes"
15846
Thomas Wouters477c8d52006-05-27 19:21:47 +000015847else
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015849/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015850
Thomas Wouters477c8d52006-05-27 19:21:47 +000015851#include <stdio.h>
15852#include <stddef.h>
15853#include <string.h>
15854
Christian Heimes2c181612007-12-17 20:04:13 +000015855#ifdef HAVE_SYS_TYPES_H
15856#include <sys/types.h>
15857#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015858
15859#ifdef HAVE_SSIZE_T
15860typedef ssize_t Py_ssize_t;
15861#elif SIZEOF_VOID_P == SIZEOF_LONG
15862typedef long Py_ssize_t;
15863#else
15864typedef int Py_ssize_t;
15865#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015866
Christian Heimes2c181612007-12-17 20:04:13 +000015867int main()
15868{
15869 char buffer[256];
15870
Thomas Wouters477c8d52006-05-27 19:21:47 +000015871 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15872 return 1;
15873
Thomas Wouters89f507f2006-12-13 04:49:30 +000015874 if (strcmp(buffer, "123"))
15875 return 1;
15876
15877 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15878 return 1;
15879
15880 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015881 return 1;
15882
15883 return 0;
15884}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015885
Thomas Wouters477c8d52006-05-27 19:21:47 +000015886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015887if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015888 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015889else
Matthias Kloseb9621712010-04-24 17:59:49 +000015890 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015894fi
15895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15898$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015899if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015900
Matthias Kloseb9621712010-04-24 17:59:49 +000015901$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015902
15903fi
15904
Matthias Kloseb9621712010-04-24 17:59:49 +000015905ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015906#ifdef HAVE_SYS_TYPES_H
15907#include <sys/types.h>
15908#endif
15909#ifdef HAVE_SYS_SOCKET_H
15910#include <sys/socket.h>
15911#endif
15912
Matthias Kloseb9621712010-04-24 17:59:49 +000015913"
Victor Stinnere0be4232011-10-25 13:06:09 +020015914if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015915
Martin v. Löwis11437992002-04-12 09:54:03 +000015916else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015917
Matthias Kloseb9621712010-04-24 17:59:49 +000015918$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015919
15920fi
15921
Michael W. Hudson54241132001-12-07 15:38:26 +000015922
Matthias Kloseb9621712010-04-24 17:59:49 +000015923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15924$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015925if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015926 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015927else
Matthias Kloseb9621712010-04-24 17:59:49 +000015928 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015929 ac_cv_broken_mbstowcs=no
15930else
Matthias Kloseb9621712010-04-24 17:59:49 +000015931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015932/* end confdefs.h. */
15933
Stefan Krah19c21392012-11-22 23:47:32 +010015934#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015935#include<stdlib.h>
15936int main() {
15937 size_t len = -1;
15938 const char *str = "text";
15939 len = mbstowcs(NULL, str, 0);
15940 return (len != 4);
15941}
15942
15943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015944if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015945 ac_cv_broken_mbstowcs=no
15946else
Matthias Kloseb9621712010-04-24 17:59:49 +000015947 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15950 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015951fi
15952
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015953fi
15954
Matthias Kloseb9621712010-04-24 17:59:49 +000015955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15956$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015957if test "$ac_cv_broken_mbstowcs" = yes
15958then
15959
Matthias Kloseb9621712010-04-24 17:59:49 +000015960$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015961
15962fi
15963
Antoine Pitroub52ec782009-01-25 16:34:23 +000015964# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15966$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015967
15968# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015969if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015970 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015971if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015972then
15973
Matthias Kloseb9621712010-04-24 17:59:49 +000015974$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015975
Matthias Kloseb9621712010-04-24 17:59:49 +000015976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15977$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015978fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015979if test "$withval" = no
15980then
15981
15982$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15983
Matthias Kloseb9621712010-04-24 17:59:49 +000015984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15985$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015986fi
15987
Antoine Pitrou042b1282010-08-13 21:15:58 +000015988else
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15990$as_echo "no value specified" >&6; }
15991fi
15992
Antoine Pitroub52ec782009-01-25 16:34:23 +000015993
Matthias Kloseb17289e2012-03-15 19:51:34 +010015994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15995$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15996if ${ac_cv_computed_gotos+:} false; then :
15997 $as_echo_n "(cached) " >&6
15998else
15999 if test "$cross_compiling" = yes; then :
16000 if test "${with_computed_gotos+set}" = set; then
16001 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16002 else
16003 ac_cv_computed_gotos=no
16004 fi
16005else
16006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16007/* end confdefs.h. */
16008
16009int main(int argc, char **argv)
16010{
16011 static void *targets[1] = { &&LABEL1 };
16012 goto LABEL2;
16013LABEL1:
16014 return 0;
16015LABEL2:
16016 goto *targets[0];
16017 return 1;
16018}
16019
16020_ACEOF
16021if ac_fn_c_try_run "$LINENO"; then :
16022 ac_cv_computed_gotos=yes
16023else
16024 ac_cv_computed_gotos=no
16025fi
16026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16027 conftest.$ac_objext conftest.beam conftest.$ac_ext
16028fi
16029
16030fi
16031
16032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16033$as_echo "$ac_cv_computed_gotos" >&6; }
16034case "$ac_cv_computed_gotos" in yes*)
16035
16036$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16037
16038esac
16039
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016040case $ac_sys_system in
16041AIX*)
16042
16043$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16044 ;;
16045esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016046
Michael W. Hudson54241132001-12-07 15:38:26 +000016047
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016048
16049
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016050for h in `(cd $srcdir;echo Python/thread_*.h)`
16051do
16052 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16053done
16054
Michael W. Hudson54241132001-12-07 15:38:26 +000016055
Ned Deily0db50cf2014-07-25 12:41:31 -070016056SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16058$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016059for dir in $SRCDIRS; do
16060 if test ! -d $dir; then
16061 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016062 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016063done
Matthias Kloseb9621712010-04-24 17:59:49 +000016064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16065$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016066
Stefan Krah1919b7e2012-03-21 18:25:23 +010016067# Availability of -O2:
16068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16069$as_echo_n "checking for -O2... " >&6; }
16070saved_cflags="$CFLAGS"
16071CFLAGS="-O2"
16072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16073/* end confdefs.h. */
16074
16075int
16076main ()
16077{
16078
16079
16080 ;
16081 return 0;
16082}
16083_ACEOF
16084if ac_fn_c_try_compile "$LINENO"; then :
16085 have_O2=yes
16086else
16087 have_O2=no
16088fi
16089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16091$as_echo "$have_O2" >&6; }
16092CFLAGS="$saved_cflags"
16093
16094# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16095# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16097$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16098saved_cflags="$CFLAGS"
16099CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16100if test "$have_O2" = no; then
16101 CFLAGS=""
16102fi
16103if test "$cross_compiling" = yes; then :
16104 have_glibc_memmove_bug=undefined
16105else
16106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16107/* end confdefs.h. */
16108
16109#include <stdio.h>
16110#include <stdlib.h>
16111#include <string.h>
16112void foo(void *p, void *q) { memmove(p, q, 19); }
16113int main() {
16114 char a[32] = "123456789000000000";
16115 foo(&a[9], a);
16116 if (strcmp(a, "123456789123456789000000000") != 0)
16117 return 1;
16118 foo(a, &a[9]);
16119 if (strcmp(a, "123456789000000000") != 0)
16120 return 1;
16121 return 0;
16122}
16123
16124_ACEOF
16125if ac_fn_c_try_run "$LINENO"; then :
16126 have_glibc_memmove_bug=no
16127else
16128 have_glibc_memmove_bug=yes
16129fi
16130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16131 conftest.$ac_objext conftest.beam conftest.$ac_ext
16132fi
16133
16134CFLAGS="$saved_cflags"
16135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16136$as_echo "$have_glibc_memmove_bug" >&6; }
16137if test "$have_glibc_memmove_bug" = yes; then
16138
16139$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16140
16141fi
16142
16143if test "$have_gcc_asm_for_x87" = yes; then
16144 # Some versions of gcc miscompile inline asm:
16145 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16146 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16147 case $CC in
16148 *gcc*)
16149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16150$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16151 saved_cflags="$CFLAGS"
16152 CFLAGS="-O2"
16153 if test "$cross_compiling" = yes; then :
16154 have_ipa_pure_const_bug=undefined
16155else
16156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16157/* end confdefs.h. */
16158
16159 __attribute__((noinline)) int
16160 foo(int *p) {
16161 int r;
16162 asm ( "movl \$6, (%1)\n\t"
16163 "xorl %0, %0\n\t"
16164 : "=r" (r) : "r" (p) : "memory"
16165 );
16166 return r;
16167 }
16168 int main() {
16169 int p = 8;
16170 if ((foo(&p) ? : p) != 6)
16171 return 1;
16172 return 0;
16173 }
16174
16175_ACEOF
16176if ac_fn_c_try_run "$LINENO"; then :
16177 have_ipa_pure_const_bug=no
16178else
16179 have_ipa_pure_const_bug=yes
16180fi
16181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16182 conftest.$ac_objext conftest.beam conftest.$ac_ext
16183fi
16184
16185 CFLAGS="$saved_cflags"
16186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16187$as_echo "$have_ipa_pure_const_bug" >&6; }
16188 if test "$have_ipa_pure_const_bug" = yes; then
16189
16190$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16191
16192 fi
16193 ;;
16194 esac
16195fi
16196
Victor Stinner4f5366e2015-01-09 02:13:19 +010016197# Check for stdatomic.h
16198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16199$as_echo_n "checking for stdatomic.h... " >&6; }
16200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201/* end confdefs.h. */
16202
16203
16204 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016205 atomic_int value = ATOMIC_VAR_INIT(1);
16206 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016207 int main() {
16208 int loaded_value = atomic_load(&value);
16209 return 0;
16210 }
16211
16212
16213_ACEOF
16214if ac_fn_c_try_link "$LINENO"; then :
16215 have_stdatomic_h=yes
16216else
16217 have_stdatomic_h=no
16218fi
16219rm -f core conftest.err conftest.$ac_objext \
16220 conftest$ac_exeext conftest.$ac_ext
16221
16222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16223$as_echo "$have_stdatomic_h" >&6; }
16224
16225if test "$have_stdatomic_h" = yes; then
16226
16227$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16228
16229fi
16230
16231# Check for GCC >= 4.7 __atomic builtins
16232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16233$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16235/* end confdefs.h. */
16236
16237
16238 volatile int val = 1;
16239 int main() {
16240 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16241 return 0;
16242 }
16243
16244
16245_ACEOF
16246if ac_fn_c_try_link "$LINENO"; then :
16247 have_builtin_atomic=yes
16248else
16249 have_builtin_atomic=no
16250fi
16251rm -f core conftest.err conftest.$ac_objext \
16252 conftest$ac_exeext conftest.$ac_ext
16253
16254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16255$as_echo "$have_builtin_atomic" >&6; }
16256
16257if test "$have_builtin_atomic" = yes; then
16258
16259$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16260
16261fi
16262
Ned Deily322f5ba2013-11-21 23:01:59 -080016263# ensurepip option
16264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16265$as_echo_n "checking for ensurepip... " >&6; }
16266
16267# Check whether --with-ensurepip was given.
16268if test "${with_ensurepip+set}" = set; then :
16269 withval=$with_ensurepip;
16270else
16271 with_ensurepip=upgrade
16272fi
16273
16274case $with_ensurepip in #(
16275 yes|upgrade) :
16276 ENSUREPIP=upgrade ;; #(
16277 install) :
16278 ENSUREPIP=install ;; #(
16279 no) :
16280 ENSUREPIP=no ;; #(
16281 *) :
16282 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16283esac
16284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16285$as_echo "$ENSUREPIP" >&6; }
16286
16287
Victor Stinner35a97c02015-03-08 02:59:09 +010016288# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16290$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16292/* end confdefs.h. */
16293
16294
16295 #include <dirent.h>
16296
16297 int main() {
16298 struct dirent entry;
16299 return entry.d_type == DT_UNKNOWN;
16300 }
16301
16302
16303_ACEOF
16304if ac_fn_c_try_link "$LINENO"; then :
16305 have_dirent_d_type=yes
16306else
16307 have_dirent_d_type=no
16308fi
16309rm -f core conftest.err conftest.$ac_objext \
16310 conftest$ac_exeext conftest.$ac_ext
16311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16312$as_echo "$have_dirent_d_type" >&6; }
16313
16314if test "$have_dirent_d_type" = yes; then
16315
16316$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16317
16318fi
16319
Victor Stinner9eb57c52015-03-19 22:21:49 +010016320# check if the Linux getrandom() syscall is available
16321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16322$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16324/* end confdefs.h. */
16325
16326
Victor Stinner1b80b242016-04-12 22:34:58 +020016327 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016328 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016329 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016330
16331 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016332 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016333 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016334 const int flags = GRND_NONBLOCK;
16335 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016336 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016337 return 0;
16338 }
16339
16340
16341_ACEOF
16342if ac_fn_c_try_link "$LINENO"; then :
16343 have_getrandom_syscall=yes
16344else
16345 have_getrandom_syscall=no
16346fi
16347rm -f core conftest.err conftest.$ac_objext \
16348 conftest$ac_exeext conftest.$ac_ext
16349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16350$as_echo "$have_getrandom_syscall" >&6; }
16351
16352if test "$have_getrandom_syscall" = yes; then
16353
16354$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16355
16356fi
16357
Victor Stinnerbae2d622015-10-01 09:47:30 +020016358# check if the getrandom() function is available
16359# the test was written for the Solaris function of <sys/random.h>
16360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16361$as_echo_n "checking for the getrandom() function... " >&6; }
16362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16363/* end confdefs.h. */
16364
16365
16366 #include <sys/random.h>
16367
16368 int main() {
16369 char buffer[1];
16370 const size_t buflen = sizeof(buffer);
16371 const int flags = 0;
16372 /* ignore the result, Python checks for ENOSYS at runtime */
16373 (void)getrandom(buffer, buflen, flags);
16374 return 0;
16375 }
16376
16377
16378_ACEOF
16379if ac_fn_c_try_link "$LINENO"; then :
16380 have_getrandom=yes
16381else
16382 have_getrandom=no
16383fi
16384rm -f core conftest.err conftest.$ac_objext \
16385 conftest$ac_exeext conftest.$ac_ext
16386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16387$as_echo "$have_getrandom" >&6; }
16388
16389if test "$have_getrandom" = yes; then
16390
16391$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16392
16393fi
16394
Guido van Rossum627b2d71993-12-24 10:39:16 +000016395# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016396ac_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 +000016397
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016398ac_config_files="$ac_config_files Modules/ld_so_aix"
16399
Martin v. Löwis11437992002-04-12 09:54:03 +000016400cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016401# This file is a shell script that caches the results of configure
16402# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016403# scripts and configure runs, see configure's option --config-cache.
16404# It is not useful on other systems. If it contains results you don't
16405# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016406#
Martin v. Löwis11437992002-04-12 09:54:03 +000016407# config.status only pays attention to the cache file if you give it
16408# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016409#
Skip Montanaro6dead952003-09-25 14:50:04 +000016410# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016411# loading this file, other *unset* `ac_cv_foo' will be assigned the
16412# following values.
16413
16414_ACEOF
16415
Guido van Rossumf78abae1997-01-21 22:02:36 +000016416# The following way of writing the cache mishandles newlines in values,
16417# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016418# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016419# Ultrix sh set writes to stderr and can't be redirected directly,
16420# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016421(
16422 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16423 eval ac_val=\$$ac_var
16424 case $ac_val in #(
16425 *${as_nl}*)
16426 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016427 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16428$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016429 esac
16430 case $ac_var in #(
16431 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016432 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16433 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434 esac ;;
16435 esac
16436 done
16437
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016439 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16440 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016441 # `set' does not quote correctly, so add quotes: double-quote
16442 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016443 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016444 "s/'/'\\\\''/g;
16445 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 *)
16448 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016450 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016451 esac |
16452 sort
16453) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016454 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016455 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016456 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016458 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16459 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016460 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16461 :end' >>confcache
16462if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16463 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016464 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016465 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16466$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016467 if test ! -f "$cache_file" || test -h "$cache_file"; then
16468 cat confcache >"$cache_file"
16469 else
16470 case $cache_file in #(
16471 */* | ?:*)
16472 mv -f confcache "$cache_file"$$ &&
16473 mv -f "$cache_file"$$ "$cache_file" ;; #(
16474 *)
16475 mv -f confcache "$cache_file" ;;
16476 esac
16477 fi
16478 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016479 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016480 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16481$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016482 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016483fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016484rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016485
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016486test "x$prefix" = xNONE && prefix=$ac_default_prefix
16487# Let make expand exec_prefix.
16488test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016489
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016490DEFS=-DHAVE_CONFIG_H
16491
Skip Montanaro6dead952003-09-25 14:50:04 +000016492ac_libobjs=
16493ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016494U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016495for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16496 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016497 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016498 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016499 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16500 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016501 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16502 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016503done
16504LIBOBJS=$ac_libobjs
16505
16506LTLIBOBJS=$ac_ltlibobjs
16507
16508
Martin v. Löwis11437992002-04-12 09:54:03 +000016509
Matthias Kloseb9621712010-04-24 17:59:49 +000016510
Victor Stinnere0be4232011-10-25 13:06:09 +020016511: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016512ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016513ac_clean_files_save=$ac_clean_files
16514ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016515{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16516$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16517as_write_fail=0
16518cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016519#! $SHELL
16520# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016521# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016522# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016523# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016524
Martin v. Löwis11437992002-04-12 09:54:03 +000016525debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016526ac_cs_recheck=false
16527ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016528
Matthias Kloseb9621712010-04-24 17:59:49 +000016529SHELL=\${CONFIG_SHELL-$SHELL}
16530export SHELL
16531_ASEOF
16532cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16533## -------------------- ##
16534## M4sh Initialization. ##
16535## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537# Be more Bourne compatible
16538DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016539if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016540 emulate sh
16541 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016542 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016543 # is contrary to our usage. Disable this feature.
16544 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016545 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016546else
Matthias Kloseb9621712010-04-24 17:59:49 +000016547 case `(set -o) 2>/dev/null` in #(
16548 *posix*) :
16549 set -o posix ;; #(
16550 *) :
16551 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016553fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016554
16555
Matthias Kloseb9621712010-04-24 17:59:49 +000016556as_nl='
16557'
16558export as_nl
16559# Printing a long string crashes Solaris 7 /usr/bin/printf.
16560as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16561as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16562as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16563# Prefer a ksh shell builtin over an external printf program on Solaris,
16564# but without wasting forks for bash or zsh.
16565if test -z "$BASH_VERSION$ZSH_VERSION" \
16566 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16567 as_echo='print -r --'
16568 as_echo_n='print -rn --'
16569elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16570 as_echo='printf %s\n'
16571 as_echo_n='printf %s'
16572else
16573 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16574 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16575 as_echo_n='/usr/ucb/echo -n'
16576 else
16577 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16578 as_echo_n_body='eval
16579 arg=$1;
16580 case $arg in #(
16581 *"$as_nl"*)
16582 expr "X$arg" : "X\\(.*\\)$as_nl";
16583 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16584 esac;
16585 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16586 '
16587 export as_echo_n_body
16588 as_echo_n='sh -c $as_echo_n_body as_echo'
16589 fi
16590 export as_echo_body
16591 as_echo='sh -c $as_echo_body as_echo'
16592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016593
16594# The user is always right.
16595if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016596 PATH_SEPARATOR=:
16597 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16598 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16599 PATH_SEPARATOR=';'
16600 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603
16604# IFS
16605# We need space, tab and new line, in precisely that order. Quoting is
16606# there to prevent editors from complaining about space-tab.
16607# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16608# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609IFS=" "" $as_nl"
16610
16611# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016612as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016613case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614 *[\\/]* ) as_myself=$0 ;;
16615 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016616for as_dir in $PATH
16617do
16618 IFS=$as_save_IFS
16619 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016620 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16621 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016622IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016624 ;;
16625esac
16626# We did not find ourselves, most probably we were run as `sh COMMAND'
16627# in which case we are not to be found in the path.
16628if test "x$as_myself" = x; then
16629 as_myself=$0
16630fi
16631if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016632 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16633 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634fi
16635
Matthias Kloseb9621712010-04-24 17:59:49 +000016636# Unset variables that we do not need and which cause bugs (e.g. in
16637# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16638# suppresses any "Segmentation fault" message there. '((' could
16639# trigger a bug in pdksh 5.2.14.
16640for as_var in BASH_ENV ENV MAIL MAILPATH
16641do eval test x\${$as_var+set} = xset \
16642 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643done
16644PS1='$ '
16645PS2='> '
16646PS4='+ '
16647
16648# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016649LC_ALL=C
16650export LC_ALL
16651LANGUAGE=C
16652export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016653
Matthias Kloseb9621712010-04-24 17:59:49 +000016654# CDPATH.
16655(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16656
16657
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016658# as_fn_error STATUS ERROR [LINENO LOG_FD]
16659# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016660# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16661# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016662# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016663as_fn_error ()
16664{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016665 as_status=$1; test $as_status -eq 0 && as_status=1
16666 if test "$4"; then
16667 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16668 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016669 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016670 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016671 as_fn_exit $as_status
16672} # as_fn_error
16673
16674
16675# as_fn_set_status STATUS
16676# -----------------------
16677# Set $? to STATUS, without forking.
16678as_fn_set_status ()
16679{
16680 return $1
16681} # as_fn_set_status
16682
16683# as_fn_exit STATUS
16684# -----------------
16685# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16686as_fn_exit ()
16687{
16688 set +e
16689 as_fn_set_status $1
16690 exit $1
16691} # as_fn_exit
16692
16693# as_fn_unset VAR
16694# ---------------
16695# Portably unset VAR.
16696as_fn_unset ()
16697{
16698 { eval $1=; unset $1;}
16699}
16700as_unset=as_fn_unset
16701# as_fn_append VAR VALUE
16702# ----------------------
16703# Append the text in VALUE to the end of the definition contained in VAR. Take
16704# advantage of any shell optimizations that allow amortized linear growth over
16705# repeated appends, instead of the typical quadratic growth present in naive
16706# implementations.
16707if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16708 eval 'as_fn_append ()
16709 {
16710 eval $1+=\$2
16711 }'
16712else
16713 as_fn_append ()
16714 {
16715 eval $1=\$$1\$2
16716 }
16717fi # as_fn_append
16718
16719# as_fn_arith ARG...
16720# ------------------
16721# Perform arithmetic evaluation on the ARGs, and store the result in the
16722# global $as_val. Take advantage of shells that can avoid forks. The arguments
16723# must be portable across $(()) and expr.
16724if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16725 eval 'as_fn_arith ()
16726 {
16727 as_val=$(( $* ))
16728 }'
16729else
16730 as_fn_arith ()
16731 {
16732 as_val=`expr "$@" || test $? -eq 1`
16733 }
16734fi # as_fn_arith
16735
16736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737if expr a : '\(a\)' >/dev/null 2>&1 &&
16738 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16739 as_expr=expr
16740else
16741 as_expr=false
16742fi
16743
16744if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16745 as_basename=basename
16746else
16747 as_basename=false
16748fi
16749
Matthias Kloseb9621712010-04-24 17:59:49 +000016750if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16751 as_dirname=dirname
16752else
16753 as_dirname=false
16754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756as_me=`$as_basename -- "$0" ||
16757$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16758 X"$0" : 'X\(//\)$' \| \
16759 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016760$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016761 sed '/^.*\/\([^/][^/]*\)\/*$/{
16762 s//\1/
16763 q
16764 }
16765 /^X\/\(\/\/\)$/{
16766 s//\1/
16767 q
16768 }
16769 /^X\/\(\/\).*/{
16770 s//\1/
16771 q
16772 }
16773 s/.*/./; q'`
16774
Matthias Kloseb9621712010-04-24 17:59:49 +000016775# Avoid depending upon Character Ranges.
16776as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16777as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16778as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16779as_cr_digits='0123456789'
16780as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016781
16782ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016783case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016784-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016785 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016787 xy) ECHO_C='\c';;
16788 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16789 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790 esac;;
16791*)
16792 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016794
Martin v. Löwis11437992002-04-12 09:54:03 +000016795rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016796if test -d conf$$.dir; then
16797 rm -f conf$$.dir/conf$$.file
16798else
16799 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016800 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016802if (echo >conf$$.file) 2>/dev/null; then
16803 if ln -s conf$$.file conf$$ 2>/dev/null; then
16804 as_ln_s='ln -s'
16805 # ... but there are two gotchas:
16806 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16807 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016808 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016809 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016810 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016811 elif ln conf$$.file conf$$ 2>/dev/null; then
16812 as_ln_s=ln
16813 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016814 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016815 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016816else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016817 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16820rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016821
Matthias Kloseb9621712010-04-24 17:59:49 +000016822
16823# as_fn_mkdir_p
16824# -------------
16825# Create "$as_dir" as a directory, including parents if necessary.
16826as_fn_mkdir_p ()
16827{
16828
16829 case $as_dir in #(
16830 -*) as_dir=./$as_dir;;
16831 esac
16832 test -d "$as_dir" || eval $as_mkdir_p || {
16833 as_dirs=
16834 while :; do
16835 case $as_dir in #(
16836 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16837 *) as_qdir=$as_dir;;
16838 esac
16839 as_dirs="'$as_qdir' $as_dirs"
16840 as_dir=`$as_dirname -- "$as_dir" ||
16841$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16842 X"$as_dir" : 'X\(//\)[^/]' \| \
16843 X"$as_dir" : 'X\(//\)$' \| \
16844 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16845$as_echo X"$as_dir" |
16846 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16847 s//\1/
16848 q
16849 }
16850 /^X\(\/\/\)[^/].*/{
16851 s//\1/
16852 q
16853 }
16854 /^X\(\/\/\)$/{
16855 s//\1/
16856 q
16857 }
16858 /^X\(\/\).*/{
16859 s//\1/
16860 q
16861 }
16862 s/.*/./; q'`
16863 test -d "$as_dir" && break
16864 done
16865 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016866 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016867
16868
16869} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016870if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016871 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016872else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016873 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016874 as_mkdir_p=false
16875fi
16876
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016877
16878# as_fn_executable_p FILE
16879# -----------------------
16880# Test if FILE is an executable regular file.
16881as_fn_executable_p ()
16882{
16883 test -f "$1" && test -x "$1"
16884} # as_fn_executable_p
16885as_test_x='test -x'
16886as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016887
16888# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016889as_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 +000016890
16891# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016892as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016893
16894
Martin v. Löwis11437992002-04-12 09:54:03 +000016895exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016896## ----------------------------------- ##
16897## Main body of $CONFIG_STATUS script. ##
16898## ----------------------------------- ##
16899_ASEOF
16900test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016901
Matthias Kloseb9621712010-04-24 17:59:49 +000016902cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16903# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016904# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905# values after options handling.
16906ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016907This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016908generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016909
16910 CONFIG_FILES = $CONFIG_FILES
16911 CONFIG_HEADERS = $CONFIG_HEADERS
16912 CONFIG_LINKS = $CONFIG_LINKS
16913 CONFIG_COMMANDS = $CONFIG_COMMANDS
16914 $ $0 $@
16915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916on `(hostname || uname -n) 2>/dev/null | sed 1q`
16917"
16918
Martin v. Löwis11437992002-04-12 09:54:03 +000016919_ACEOF
16920
Matthias Kloseb9621712010-04-24 17:59:49 +000016921case $ac_config_files in *"
16922"*) set x $ac_config_files; shift; ac_config_files=$*;;
16923esac
16924
16925case $ac_config_headers in *"
16926"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16927esac
16928
16929
16930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016931# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016932config_files="$ac_config_files"
16933config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016936
Matthias Kloseb9621712010-04-24 17:59:49 +000016937cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016938ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016939\`$as_me' instantiates files and other configuration actions
16940from templates according to the current configuration. Unless the files
16941and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016942
Matthias Kloseb9621712010-04-24 17:59:49 +000016943Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016944
16945 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016946 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016947 --config print configuration, then exit
16948 -q, --quiet, --silent
16949 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016950 -d, --debug don't remove temporary files
16951 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016952 --file=FILE[:TEMPLATE]
16953 instantiate the configuration file FILE
16954 --header=FILE[:TEMPLATE]
16955 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016956
16957Configuration files:
16958$config_files
16959
16960Configuration headers:
16961$config_headers
16962
Matthias Kloseb9621712010-04-24 17:59:49 +000016963Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016966cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16967ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016968ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016969python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016970configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016971 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016972
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016973Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016974This config.status script is free software; the Free Software Foundation
16975gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976
16977ac_pwd='$ac_pwd'
16978srcdir='$srcdir'
16979INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016980MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016981test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016982_ACEOF
16983
Matthias Kloseb9621712010-04-24 17:59:49 +000016984cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16985# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016986ac_need_defaults=:
16987while test $# != 0
16988do
16989 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016990 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16992 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016993 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016994 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016995 --*=)
16996 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16997 ac_optarg=
16998 ac_shift=:
16999 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017001 ac_option=$1
17002 ac_optarg=$2
17003 ac_shift=shift
17004 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017005 esac
17006
Skip Montanaro6dead952003-09-25 14:50:04 +000017007 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017008 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017009 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17010 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017012 $as_echo "$ac_cs_version"; exit ;;
17013 --config | --confi | --conf | --con | --co | --c )
17014 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017016 debug=: ;;
17017 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017018 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017019 case $ac_optarg in
17020 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017021 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017022 esac
17023 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017024 ac_need_defaults=false;;
17025 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017026 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017027 case $ac_optarg in
17028 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17029 esac
17030 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017031 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017032 --he | --h)
17033 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017034 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017035Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017037 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017038 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17039 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17040 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017041
17042 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017043 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017044Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017045
Matthias Kloseb9621712010-04-24 17:59:49 +000017046 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017048
17049 esac
17050 shift
17051done
17052
Skip Montanaro6dead952003-09-25 14:50:04 +000017053ac_configure_extra_args=
17054
17055if $ac_cs_silent; then
17056 exec 6>/dev/null
17057 ac_configure_extra_args="$ac_configure_extra_args --silent"
17058fi
17059
17060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017062if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017063 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017064 shift
17065 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17066 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017068 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017069fi
17070
Martin v. Löwis11437992002-04-12 09:54:03 +000017071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073exec 5>>config.log
17074{
17075 echo
17076 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17077## Running $as_me. ##
17078_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017079 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017083cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017085
Matthias Kloseb9621712010-04-24 17:59:49 +000017086cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087
17088# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017089for ac_config_target in $ac_config_targets
17090do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091 case $ac_config_target in
17092 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17093 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17094 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017095 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17096 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17098 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017099 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017100 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017101 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017102
Victor Stinnere0be4232011-10-25 13:06:09 +020017103 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017104 esac
17105done
17106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107
Martin v. Löwis11437992002-04-12 09:54:03 +000017108# If the user did not use the arguments to specify the items to instantiate,
17109# then the envvar interface is used. Set only those that are not.
17110# We use the long form for the default assignment because of an extremely
17111# bizarre bug on SunOS 4.1.3.
17112if $ac_need_defaults; then
17113 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17114 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17115fi
17116
Skip Montanaro6dead952003-09-25 14:50:04 +000017117# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017118# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017119# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120# Hook for its removal unless debugging.
17121# Note that there is a small window in which the directory will not be cleaned:
17122# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017123$debug ||
17124{
Victor Stinnere0be4232011-10-25 13:06:09 +020017125 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017127 : "${ac_tmp:=$tmp}"
17128 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017129' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017130 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017131}
Martin v. Löwis11437992002-04-12 09:54:03 +000017132# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017133
Martin v. Löwis11437992002-04-12 09:54:03 +000017134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017135 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017136 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017137} ||
17138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017139 tmp=./conf$$-$RANDOM
17140 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017141} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017142ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017143
Matthias Kloseb9621712010-04-24 17:59:49 +000017144# Set up the scripts for CONFIG_FILES section.
17145# No need to generate them if there are no CONFIG_FILES.
17146# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017148
Matthias Kloseb9621712010-04-24 17:59:49 +000017149
17150ac_cr=`echo X | tr X '\015'`
17151# On cygwin, bash can eat \r inside `` if the user requested igncr.
17152# But we know of no other shell where ac_cr would be empty at this
17153# point, so we can use a bashism as a fallback.
17154if test "x$ac_cr" = x; then
17155 eval ac_cr=\$\'\\r\'
17156fi
17157ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17158if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017159 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017160else
17161 ac_cs_awk_cr=$ac_cr
17162fi
17163
Victor Stinnere0be4232011-10-25 13:06:09 +020017164echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017165_ACEOF
17166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017167
Matthias Kloseb9621712010-04-24 17:59:49 +000017168{
17169 echo "cat >conf$$subs.awk <<_ACEOF" &&
17170 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17171 echo "_ACEOF"
17172} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017173 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17174ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175ac_delim='%!_!# '
17176for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017177 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017178 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017179
Matthias Kloseb9621712010-04-24 17:59:49 +000017180 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17181 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182 break
17183 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017184 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185 else
17186 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017187 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188done
Matthias Kloseb9621712010-04-24 17:59:49 +000017189rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190
Matthias Kloseb9621712010-04-24 17:59:49 +000017191cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017192cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017194sed -n '
17195h
17196s/^/S["/; s/!.*/"]=/
17197p
17198g
17199s/^[^!]*!//
17200:repl
17201t repl
17202s/'"$ac_delim"'$//
17203t delim
17204:nl
17205h
17206s/\(.\{148\}\)..*/\1/
17207t more1
17208s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17209p
17210n
17211b repl
17212:more1
17213s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17214p
17215g
17216s/.\{148\}//
17217t nl
17218:delim
17219h
17220s/\(.\{148\}\)..*/\1/
17221t more2
17222s/["\\]/\\&/g; s/^/"/; s/$/"/
17223p
17224b
17225:more2
17226s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17227p
17228g
17229s/.\{148\}//
17230t delim
17231' <conf$$subs.awk | sed '
17232/^[^""]/{
17233 N
17234 s/\n//
17235}
17236' >>$CONFIG_STATUS || ac_write_fail=1
17237rm -f conf$$subs.awk
17238cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17239_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017240cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017241 for (key in S) S_is_set[key] = 1
17242 FS = ""
17243
17244}
17245{
17246 line = $ 0
17247 nfields = split(line, field, "@")
17248 substed = 0
17249 len = length(field[1])
17250 for (i = 2; i < nfields; i++) {
17251 key = field[i]
17252 keylen = length(key)
17253 if (S_is_set[key]) {
17254 value = S[key]
17255 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17256 len += length(value) + length(field[++i])
17257 substed = 1
17258 } else
17259 len += 1 + keylen
17260 }
17261
17262 print line
17263}
17264
17265_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017267cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17268if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17269 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17270else
17271 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017272fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017273 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017274_ACEOF
17275
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017276# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17277# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278# trailing colons and then remove the whole line if VPATH becomes empty
17279# (actually we leave an empty line to preserve line numbers).
17280if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017281 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17282h
17283s///
17284s/^/:/
17285s/[ ]*$/:/
17286s/:\$(srcdir):/:/g
17287s/:\${srcdir}:/:/g
17288s/:@srcdir@:/:/g
17289s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017291x
17292s/\(=[ ]*\).*/\1/
17293G
17294s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295s/^[^=]*=[ ]*$//
17296}'
17297fi
17298
Matthias Kloseb9621712010-04-24 17:59:49 +000017299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017300fi # test -n "$CONFIG_FILES"
17301
Matthias Kloseb9621712010-04-24 17:59:49 +000017302# Set up the scripts for CONFIG_HEADERS section.
17303# No need to generate them if there are no CONFIG_HEADERS.
17304# This happens for instance with `./config.status Makefile'.
17305if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017306cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017307BEGIN {
17308_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309
Matthias Kloseb9621712010-04-24 17:59:49 +000017310# Transform confdefs.h into an awk script `defines.awk', embedded as
17311# here-document in config.status, that substitutes the proper values into
17312# config.h.in to produce config.h.
17313
17314# Create a delimiter string that does not exist in confdefs.h, to ease
17315# handling of long lines.
17316ac_delim='%!_!# '
17317for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017318 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17319 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017320 break
17321 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017322 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017323 else
17324 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17325 fi
17326done
17327
17328# For the awk script, D is an array of macro values keyed by name,
17329# likewise P contains macro parameters if any. Preserve backslash
17330# newline sequences.
17331
17332ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17333sed -n '
17334s/.\{148\}/&'"$ac_delim"'/g
17335t rset
17336:rset
17337s/^[ ]*#[ ]*define[ ][ ]*/ /
17338t def
17339d
17340:def
17341s/\\$//
17342t bsnl
17343s/["\\]/\\&/g
17344s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17345D["\1"]=" \3"/p
17346s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17347d
17348:bsnl
17349s/["\\]/\\&/g
17350s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17351D["\1"]=" \3\\\\\\n"\\/p
17352t cont
17353s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17354t cont
17355d
17356:cont
17357n
17358s/.\{148\}/&'"$ac_delim"'/g
17359t clear
17360:clear
17361s/\\$//
17362t bsnlc
17363s/["\\]/\\&/g; s/^/"/; s/$/"/p
17364d
17365:bsnlc
17366s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17367b cont
17368' <confdefs.h | sed '
17369s/'"$ac_delim"'/"\\\
17370"/g' >>$CONFIG_STATUS || ac_write_fail=1
17371
17372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17373 for (key in D) D_is_set[key] = 1
17374 FS = ""
17375}
17376/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17377 line = \$ 0
17378 split(line, arg, " ")
17379 if (arg[1] == "#") {
17380 defundef = arg[2]
17381 mac1 = arg[3]
17382 } else {
17383 defundef = substr(arg[1], 2)
17384 mac1 = arg[2]
17385 }
17386 split(mac1, mac2, "(") #)
17387 macro = mac2[1]
17388 prefix = substr(line, 1, index(line, defundef) - 1)
17389 if (D_is_set[macro]) {
17390 # Preserve the white space surrounding the "#".
17391 print prefix "define", macro P[macro] D[macro]
17392 next
17393 } else {
17394 # Replace #undef with comments. This is necessary, for example,
17395 # in the case of _POSIX_SOURCE, which is predefined and required
17396 # on some systems where configure will not decide to define it.
17397 if (defundef == "undef") {
17398 print "/*", prefix defundef, macro, "*/"
17399 next
17400 }
17401 }
17402}
17403{ print }
17404_ACAWK
17405_ACEOF
17406cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017407 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017408fi # test -n "$CONFIG_HEADERS"
17409
17410
17411eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17412shift
17413for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414do
17415 case $ac_tag in
17416 :[FHLC]) ac_mode=$ac_tag; continue;;
17417 esac
17418 case $ac_mode$ac_tag in
17419 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017420 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421 :[FH]-) ac_tag=-:-;;
17422 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17423 esac
17424 ac_save_IFS=$IFS
17425 IFS=:
17426 set x $ac_tag
17427 IFS=$ac_save_IFS
17428 shift
17429 ac_file=$1
17430 shift
17431
17432 case $ac_mode in
17433 :L) ac_source=$1;;
17434 :[FH])
17435 ac_file_inputs=
17436 for ac_f
17437 do
17438 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017439 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440 *) # Look for the file first in the build tree, then in the source tree
17441 # (if the path is not absolute). The absolute path cannot be DOS-style,
17442 # because $ac_f cannot contain `:'.
17443 test -f "$ac_f" ||
17444 case $ac_f in
17445 [\\/$]*) false;;
17446 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17447 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017448 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017450 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17451 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452 done
17453
17454 # Let's still pretend it is `configure' which instantiates (i.e., don't
17455 # use $as_me), people would be surprised to read:
17456 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017457 configure_input='Generated from '`
17458 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17459 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460 if test x"$ac_file" != x-; then
17461 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017462 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17463$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017465 # Neutralize special characters interpreted by sed in replacement strings.
17466 case $configure_input in #(
17467 *\&* | *\|* | *\\* )
17468 ac_sed_conf_input=`$as_echo "$configure_input" |
17469 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17470 *) ac_sed_conf_input=$configure_input;;
17471 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472
17473 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017474 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17475 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476 esac
17477 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017478 esac
17479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017481$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017482 X"$ac_file" : 'X\(//\)[^/]' \| \
17483 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017485$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017486 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17487 s//\1/
17488 q
17489 }
17490 /^X\(\/\/\)[^/].*/{
17491 s//\1/
17492 q
17493 }
17494 /^X\(\/\/\)$/{
17495 s//\1/
17496 q
17497 }
17498 /^X\(\/\).*/{
17499 s//\1/
17500 q
17501 }
17502 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017503 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017504 ac_builddir=.
17505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506case "$ac_dir" in
17507.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17508*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017509 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017512 case $ac_top_builddir_sub in
17513 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17514 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17515 esac ;;
17516esac
17517ac_abs_top_builddir=$ac_pwd
17518ac_abs_builddir=$ac_pwd$ac_dir_suffix
17519# for backward compatibility:
17520ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017521
17522case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017524 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525 ac_top_srcdir=$ac_top_builddir_sub
17526 ac_abs_top_srcdir=$ac_pwd ;;
17527 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017528 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017529 ac_top_srcdir=$srcdir
17530 ac_abs_top_srcdir=$srcdir ;;
17531 *) # Relative name.
17532 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17533 ac_top_srcdir=$ac_top_build_prefix$srcdir
17534 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017535esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017537
Martin v. Löwis11437992002-04-12 09:54:03 +000017538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539 case $ac_mode in
17540 :F)
17541 #
17542 # CONFIG_FILE
17543 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017544
17545 case $INSTALL in
17546 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017548 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017549 ac_MKDIR_P=$MKDIR_P
17550 case $MKDIR_P in
17551 [\\/$]* | ?:[\\/]* ) ;;
17552 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17553 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017554_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555
Matthias Kloseb9621712010-04-24 17:59:49 +000017556cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557# If the template does not know about datarootdir, expand it.
17558# FIXME: This hack should be removed a few years after 2.60.
17559ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017560ac_sed_dataroot='
17561/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 p
17563 q
17564}
17565/@datadir@/p
17566/@docdir@/p
17567/@infodir@/p
17568/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017569/@mandir@/p'
17570case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571*datarootdir*) ac_datarootdir_seen=yes;;
17572*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17574$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017576cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577 ac_datarootdir_hack='
17578 s&@datadir@&$datadir&g
17579 s&@docdir@&$docdir&g
17580 s&@infodir@&$infodir&g
17581 s&@localedir@&$localedir&g
17582 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017583 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584esac
17585_ACEOF
17586
17587# Neutralize VPATH when `$srcdir' = `.'.
17588# Shell code in configure.ac might set extrasub.
17589# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017590cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17591ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017592$extrasub
17593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017594cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017595:t
17596/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017597s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017598s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017599s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017600s&@srcdir@&$ac_srcdir&;t t
17601s&@abs_srcdir@&$ac_abs_srcdir&;t t
17602s&@top_srcdir@&$ac_top_srcdir&;t t
17603s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17604s&@builddir@&$ac_builddir&;t t
17605s&@abs_builddir@&$ac_abs_builddir&;t t
17606s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17607s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017608s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017610"
Victor Stinnere0be4232011-10-25 13:06:09 +020017611eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17612 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017615 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17616 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17617 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017618 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017619which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017620$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017621which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017622
Victor Stinnere0be4232011-10-25 13:06:09 +020017623 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017624 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017625 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17626 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017627 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017628 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629 ;;
17630 :H)
17631 #
17632 # CONFIG_HEADER
17633 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017635 {
17636 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017637 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17638 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017639 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017640 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017641 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17642$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017644 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017645 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017646 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017647 fi
17648 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017649 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017650 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017651 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655
17656 esac
17657
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017658
17659 case $ac_file$ac_mode in
17660 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17661
17662 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663done # for ac_tag
17664
Guido van Rossum627b2d71993-12-24 10:39:16 +000017665
Matthias Kloseb9621712010-04-24 17:59:49 +000017666as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017667_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017668ac_clean_files=$ac_clean_files_save
17669
Matthias Kloseb9621712010-04-24 17:59:49 +000017670test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017671 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017672
Martin v. Löwis11437992002-04-12 09:54:03 +000017673
17674# configure is writing to config.log, and then calls config.status.
17675# config.status does its own redirection, appending to config.log.
17676# Unfortunately, on DOS this fails, as config.log is still kept open
17677# by configure, so config.status won't be able to write to it; its
17678# output is simply discarded. So we exec the FD to /dev/null,
17679# effectively closing config.log, so it can be properly (re)opened and
17680# appended to by config.status. When coming back to configure, we
17681# need to make the FD available again.
17682if test "$no_create" != yes; then
17683 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017684 ac_config_status_args=
17685 test "$silent" = yes &&
17686 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017687 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017688 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017689 exec 5>>config.log
17690 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17691 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017692 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017693fi
17694if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17695 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17696$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017697fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017698
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017699
Christian Heimes75ed8902013-11-20 01:11:18 +010017700echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017701if test ! -f Modules/Setup
17702then
17703 cp $srcdir/Modules/Setup.dist Modules/Setup
17704fi
17705
Christian Heimes75ed8902013-11-20 01:11:18 +010017706echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017707if test ! -f Modules/Setup.local
17708then
17709 echo "# Edit this file for local setup changes" >Modules/Setup.local
17710fi
17711
Christian Heimes75ed8902013-11-20 01:11:18 +010017712echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017713$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17714 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017715 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017716mv config.c Modules