blob: 28fcd077e2940a279468294a390afeb0478fe4fe [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.
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003# 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'
Larry Hastingsf5002bd2014-03-16 23:05:59 -0700583PACKAGE_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
653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
665BASECFLAGS
666OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000667ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100669MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000670INSTALL_DATA
671INSTALL_SCRIPT
672INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530673OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200674PYTHON
675ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200676ac_ct_READELF
677READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000678ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200679ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000680AR
681RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000682USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000683GNULD
684LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000685LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000686RUNSHARED
687INSTSONAME
688LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000689PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000690BLDLIBRARY
691DLLLIBRARY
692LDLIBRARY
693LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100694MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000695BUILDEXEEXT
696EGREP
697GREP
698CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000701MAINCC
702CXX
703OBJEXT
704EXEEXT
705ac_ct_CC
706CPPFLAGS
707LDFLAGS
708CFLAGS
709CC
710EXPORT_MACOSX_DEPLOYMENT_TARGET
711CONFIGURE_MACOSX_DEPLOYMENT_TARGET
712SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200713_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000715FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800717FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000718FRAMEWORKALTINSTALLLAST
719FRAMEWORKALTINSTALLFIRST
720FRAMEWORKINSTALLLAST
721FRAMEWORKINSTALLFIRST
722PYTHONFRAMEWORKINSTALLDIR
723PYTHONFRAMEWORKPREFIX
724PYTHONFRAMEWORKDIR
725PYTHONFRAMEWORKIDENTIFIER
726PYTHONFRAMEWORK
727LIPO_32BIT_FLAGS
728ARCH_RUN_32BIT
729UNIVERSALSDK
730CONFIG_ARGS
731SOVERSION
732VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500742HAS_HG
743HGBRANCH
744HGTAG
745HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400746BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000747target_alias
748host_alias
749build_alias
750LIBS
751ECHO_T
752ECHO_N
753ECHO_C
754DEFS
755mandir
756localedir
757libdir
758psdir
759pdfdir
760dvidir
761htmldir
762infodir
763docdir
764oldincludedir
765includedir
766localstatedir
767sharedstatedir
768sysconfdir
769datadir
770datarootdir
771libexecdir
772sbindir
773bindir
774program_transform_name
775prefix
776exec_prefix
777PACKAGE_URL
778PACKAGE_BUGREPORT
779PACKAGE_STRING
780PACKAGE_VERSION
781PACKAGE_TARNAME
782PACKAGE_NAME
783PATH_SEPARATOR
784SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000785ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_user_opts='
787enable_option_checking
788enable_universalsdk
789with_universal_archs
790with_framework_name
791enable_framework
792with_gcc
793with_cxx_main
794with_suffix
795enable_shared
796enable_profiling
797with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100798with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100799with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000800with_libs
801with_system_expat
802with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100803with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000804enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700805with_tcltk_includes
806with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_dbmliborder
808with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_threads
810with_thread
811enable_ipv6
812with_doc_strings
813with_tsc
814with_pymalloc
815with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_fpectl
817with_libm
818with_libc
819enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800821with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000822'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823 ac_precious_vars='build_alias
824host_alias
825target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100826MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827CC
828CFLAGS
829LDFLAGS
830LIBS
831CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200832CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000836ac_init_help=
837ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000838ac_unrecognized_opts=
839ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840# The variables have the same names as the options, with
841# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000842cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845no_recursion=
846prefix=NONE
847program_prefix=NONE
848program_suffix=NONE
849program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854x_includes=NONE
855x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000856
857# Installation directory options.
858# These are left unexpanded so users can "make install exec_prefix=/foo"
859# and all the variables that are supposed to be based on exec_prefix
860# by default will actually change.
861# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863bindir='${exec_prefix}/bin'
864sbindir='${exec_prefix}/sbin'
865libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866datarootdir='${prefix}/share'
867datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868sysconfdir='${prefix}/etc'
869sharedstatedir='${prefix}/com'
870localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871includedir='${prefix}/include'
872oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
874infodir='${datarootdir}/info'
875htmldir='${docdir}'
876dvidir='${docdir}'
877pdfdir='${docdir}'
878psdir='${docdir}'
879libdir='${exec_prefix}/lib'
880localedir='${datarootdir}/locale'
881mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 # If the previous option needs an argument, assign it.
888 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890 ac_prev=
891 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000892 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200895 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
896 *=) ac_optarg= ;;
897 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900 # Accept the important Cygnus configure options, so we can diagnose typos.
901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 case $ac_dashdash$ac_option in
903 --)
904 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -bindir | --bindir | --bindi | --bind | --bin | --bi)
907 ac_prev=bindir ;;
908 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910
911 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 -cache-file | --cache-file | --cache-fil | --cache-fi \
917 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
918 ac_prev=cache_file ;;
919 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
920 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 cache_file=$ac_optarg ;;
922
923 --config-cache | -C)
924 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
932 | --dataroo | --dataro | --datar)
933 ac_prev=datarootdir ;;
934 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
935 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
936 datarootdir=$ac_optarg ;;
937
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000939 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000941 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200942 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt_orig=$ac_useropt
944 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
945 case $ac_user_opts in
946 *"
947"enable_$ac_useropt"
948"*) ;;
949 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
950 ac_unrecognized_sep=', ';;
951 esac
952 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953
954 -docdir | --docdir | --docdi | --doc | --do)
955 ac_prev=docdir ;;
956 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
957 docdir=$ac_optarg ;;
958
959 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
960 ac_prev=dvidir ;;
961 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
962 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
964 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
981 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
982 | --exec | --exe | --ex)
983 ac_prev=exec_prefix ;;
984 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
985 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
986 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Obsolete; use --with-gas.
991 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 -help | --help | --hel | --he | -h)
994 ac_init_help=long ;;
995 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
996 ac_init_help=recursive ;;
997 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
998 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001005 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1006 ac_prev=htmldir ;;
1007 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1008 | --ht=*)
1009 htmldir=$ac_optarg ;;
1010
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 -includedir | --includedir | --includedi | --included | --include \
1012 | --includ | --inclu | --incl | --inc)
1013 ac_prev=includedir ;;
1014 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1015 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
1018 -infodir | --infodir | --infodi | --infod | --info | --inf)
1019 ac_prev=infodir ;;
1020 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
1023 -libdir | --libdir | --libdi | --libd)
1024 ac_prev=libdir ;;
1025 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
1028 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1029 | --libexe | --libex | --libe)
1030 ac_prev=libexecdir ;;
1031 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1032 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -localedir | --localedir | --localedi | --localed | --locale)
1036 ac_prev=localedir ;;
1037 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1038 localedir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 ac_prev=localstatedir ;;
1043 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001044 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1048 ac_prev=mandir ;;
1049 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001053 # Obsolete; use --without-fp.
1054 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 no_create=yes ;;
1059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1061 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1062 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1065 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1066 | --oldin | --oldi | --old | --ol | --o)
1067 ac_prev=oldincludedir ;;
1068 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1069 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1070 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1074 ac_prev=prefix ;;
1075 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1079 | --program-pre | --program-pr | --program-p)
1080 ac_prev=program_prefix ;;
1081 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1082 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1086 | --program-suf | --program-su | --program-s)
1087 ac_prev=program_suffix ;;
1088 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1089 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -program-transform-name | --program-transform-name \
1093 | --program-transform-nam | --program-transform-na \
1094 | --program-transform-n | --program-transform- \
1095 | --program-transform | --program-transfor \
1096 | --program-transfo | --program-transf \
1097 | --program-trans | --program-tran \
1098 | --progr-tra | --program-tr | --program-t)
1099 ac_prev=program_transform_name ;;
1100 -program-transform-name=* | --program-transform-name=* \
1101 | --program-transform-nam=* | --program-transform-na=* \
1102 | --program-transform-n=* | --program-transform-=* \
1103 | --program-transform=* | --program-transfor=* \
1104 | --program-transfo=* | --program-transf=* \
1105 | --program-trans=* | --program-tran=* \
1106 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001109 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1110 ac_prev=pdfdir ;;
1111 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1112 pdfdir=$ac_optarg ;;
1113
1114 -psdir | --psdir | --psdi | --psd | --ps)
1115 ac_prev=psdir ;;
1116 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1117 psdir=$ac_optarg ;;
1118
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1120 | -silent | --silent | --silen | --sile | --sil)
1121 silent=yes ;;
1122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1124 ac_prev=sbindir ;;
1125 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1126 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001128
1129 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1130 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1131 | --sharedst | --shareds | --shared | --share | --shar \
1132 | --sha | --sh)
1133 ac_prev=sharedstatedir ;;
1134 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1135 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1136 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1137 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 -site | --site | --sit)
1141 ac_prev=site ;;
1142 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1146 ac_prev=srcdir ;;
1147 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1151 | --syscon | --sysco | --sysc | --sys | --sy)
1152 ac_prev=sysconfdir ;;
1153 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1154 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1163 verbose=yes ;;
1164
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 -version | --version | --versio | --versi | --vers | -V)
1166 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001172 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 ac_useropt_orig=$ac_useropt
1174 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1175 case $ac_user_opts in
1176 *"
1177"with_$ac_useropt"
1178"*) ;;
1179 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1180 ac_unrecognized_sep=', ';;
1181 esac
1182 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
1184 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001188 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 ac_useropt_orig=$ac_useropt
1190 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1191 case $ac_user_opts in
1192 *"
1193"with_$ac_useropt"
1194"*) ;;
1195 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1196 ac_unrecognized_sep=', ';;
1197 esac
1198 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 --x)
1201 # Obsolete; use --with-x.
1202 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1205 | --x-incl | --x-inc | --x-in | --x-i)
1206 ac_prev=x_includes ;;
1207 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1208 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1212 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1213 ac_prev=x_libraries ;;
1214 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1215 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001218 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1219Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220 ;;
1221
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 *=*)
1223 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 case $ac_envvar in #(
1226 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001227 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001229 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 export $ac_envvar ;;
1231
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001232 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001237 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ;;
1239
1240 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241done
1242
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246fi
1247
Matthias Kloseb9621712010-04-24 17:59:49 +00001248if test -n "$ac_unrecognized_opts"; then
1249 case $enable_option_checking in
1250 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1253 esac
1254fi
1255
1256# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1258 datadir sysconfdir sharedstatedir localstatedir includedir \
1259 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1260 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001261do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 # Remove trailing slashes.
1264 case $ac_val in
1265 */ )
1266 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1267 eval $ac_var=\$ac_val;;
1268 esac
1269 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 [\\/$]* | ?:[\\/]* ) continue;;
1272 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001275done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276
Martin v. Löwis11437992002-04-12 09:54:03 +00001277# There might be people who depend on the old broken behavior: `$host'
1278# used to hold the argument of --host etc.
1279# FIXME: To remove some day.
1280build=$build_alias
1281host=$host_alias
1282target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Martin v. Löwis11437992002-04-12 09:54:03 +00001284# FIXME: To remove some day.
1285if test "x$host_alias" != x; then
1286 if test "x$build_alias" = x; then
1287 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 elif test "x$build_alias" != "x$host_alias"; then
1289 cross_compiling=yes
1290 fi
1291fi
1292
1293ac_tool_prefix=
1294test -n "$host_alias" && ac_tool_prefix=$host_alias-
1295
1296test "$silent" = yes && exec 6>/dev/null
1297
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299ac_pwd=`pwd` && test -n "$ac_pwd" &&
1300ac_ls_di=`ls -di .` &&
1301ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001304 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305
1306
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307# Find the source files, if location was not specified.
1308if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001311 ac_confdir=`$as_dirname -- "$as_myself" ||
1312$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1313 X"$as_myself" : 'X\(//\)[^/]' \| \
1314 X"$as_myself" : 'X\(//\)$' \| \
1315 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1316$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1318 s//\1/
1319 q
1320 }
1321 /^X\(\/\/\)[^/].*/{
1322 s//\1/
1323 q
1324 }
1325 /^X\(\/\/\)$/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\).*/{
1330 s//\1/
1331 q
1332 }
1333 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336 srcdir=..
1337 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338else
1339 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341if test ! -r "$srcdir/$ac_unique_file"; then
1342 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1346ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001347 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 pwd)`
1349# When building in place, set srcdir=.
1350if test "$ac_abs_confdir" = "$ac_pwd"; then
1351 srcdir=.
1352fi
1353# Remove unnecessary trailing slashes from srcdir.
1354# Double slashes in file names in object file debugging info
1355# mess up M-x gdb in Emacs.
1356case $srcdir in
1357*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1358esac
1359for ac_var in $ac_precious_vars; do
1360 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1361 eval ac_env_${ac_var}_value=\$${ac_var}
1362 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1363 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1364done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365
Martin v. Löwis11437992002-04-12 09:54:03 +00001366#
1367# Report the --help message.
1368#
1369if test "$ac_init_help" = "long"; then
1370 # Omit some internal or obsolete options to make the list less imposing.
1371 # This message is too long to be a string in the A/UX 3.1 sh.
1372 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001373\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001374
1375Usage: $0 [OPTION]... [VAR=VALUE]...
1376
1377To assign environment variables (e.g., CC, CFLAGS...), specify them as
1378VAR=VALUE. See below for descriptions of some of the useful variables.
1379
1380Defaults for the options are specified in brackets.
1381
1382Configuration:
1383 -h, --help display this help and exit
1384 --help=short display options specific to this package
1385 --help=recursive display the short help of all the included packages
1386 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001387 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 --cache-file=FILE cache test results in FILE [disabled]
1389 -C, --config-cache alias for \`--cache-file=config.cache'
1390 -n, --no-create do not create output files
1391 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393Installation directories:
1394 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001397 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
1399By default, \`make install' will install all the files in
1400\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1401an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1402for instance \`--prefix=\$HOME'.
1403
1404For better control, use the options below.
1405
1406Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001407 --bindir=DIR user executables [EPREFIX/bin]
1408 --sbindir=DIR system admin executables [EPREFIX/sbin]
1409 --libexecdir=DIR program executables [EPREFIX/libexec]
1410 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1411 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1412 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1413 --libdir=DIR object code libraries [EPREFIX/lib]
1414 --includedir=DIR C header files [PREFIX/include]
1415 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1416 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1417 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1418 --infodir=DIR info documentation [DATAROOTDIR/info]
1419 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1420 --mandir=DIR man documentation [DATAROOTDIR/man]
1421 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1422 --htmldir=DIR html documentation [DOCDIR]
1423 --dvidir=DIR dvi documentation [DOCDIR]
1424 --pdfdir=DIR pdf documentation [DOCDIR]
1425 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426_ACEOF
1427
1428 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001429
1430System types:
1431 --build=BUILD configure for building on BUILD [guessed]
1432 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433_ACEOF
1434fi
1435
1436if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001437 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001438 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001439 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 cat <<\_ACEOF
1441
1442Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1445 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001446 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001447 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --enable-framework[=INSTALLDIR]
1449 Build (MacOSX|Darwin) framework
1450 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001451 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001452 --enable-loadable-sqlite-extensions
1453 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --enable-ipv6 Enable ipv6 (with ipv4) support
1455 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001456 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458
1459Optional Packages:
1460 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1461 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001462 --with-universal-archs=ARCH
1463 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001464 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001465 --with-framework-name=FRAMEWORK
1466 specify an alternate name of the framework built
1467 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001468 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001469 --with-cxx-main=<compiler>
1470 compile main() and link python executable with C++
1471 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --with-suffix=.exe set executable suffix
1473 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001474 --with-hash-algorithm=[fnv|siphash24]
1475 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001476 --with-address-sanitizer
1477 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001479 --with-system-expat build pyexpat module using an installed expat
1480 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001481 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001482 --with-system-libmpdec build _decimal module using an installed libmpdec
1483 library
Ned Deilyd819b932013-09-06 01:07:05 -07001484 --with-tcltk-includes='-I...'
1485 override search for Tcl and Tk include files
1486 --with-tcltk-libs='-L...'
1487 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001488 --with-dbmliborder=db1:db2:...
1489 order to check db backends for dbm. Valid value is a
1490 colon separated string with the backend names
1491 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with(out)-threads[=DIRECTORY]
1494 disable/enable thread support
1495 --with(out)-thread[=DIRECTORY]
1496 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001498 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001500 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-fpectl enable SIGFPE catching
1502 --with-libm=STRING math library
1503 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001504 --with(out)-computed-gotos
1505 Use computed gotos in evaluation loop (enabled by
1506 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001507 --with(out)-ensurepip=[=upgrade]
1508 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
1510Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001511 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 CC C compiler command
1513 CFLAGS C compiler flags
1514 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1515 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 CPP C preprocessor
1520
1521Use these variables to override the choices made by `configure' or to help
1522it to find libraries and programs with nonstandard names/locations.
1523
Georg Brandle2e15612009-05-20 18:25:10 +00001524Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001527fi
1528
1529if test "$ac_init_help" = "recursive"; then
1530 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001531 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001532 test -d "$ac_dir" ||
1533 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1534 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 ac_builddir=.
1536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537case "$ac_dir" in
1538.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1539*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001540 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001542 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 case $ac_top_builddir_sub in
1544 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1545 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1546 esac ;;
1547esac
1548ac_abs_top_builddir=$ac_pwd
1549ac_abs_builddir=$ac_pwd$ac_dir_suffix
1550# for backward compatibility:
1551ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 ac_top_srcdir=$ac_top_builddir_sub
1557 ac_abs_top_srcdir=$ac_pwd ;;
1558 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 ac_top_srcdir=$srcdir
1561 ac_abs_top_srcdir=$srcdir ;;
1562 *) # Relative name.
1563 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1564 ac_top_srcdir=$ac_top_build_prefix$srcdir
1565 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001566esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 cd "$ac_dir" || { ac_status=$?; continue; }
1570 # Check for guested configure.
1571 if test -f "$ac_srcdir/configure.gnu"; then
1572 echo &&
1573 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1574 elif test -f "$ac_srcdir/configure"; then
1575 echo &&
1576 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 fi || ac_status=$?
1580 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 done
1582fi
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001585if $ac_init_version; then
1586 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001587python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001588generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001590Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591This configure script is free software; the Free Software Foundation
1592gives unlimited permission to copy, distribute and modify it.
1593_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001596
1597## ------------------------ ##
1598## Autoconf initialization. ##
1599## ------------------------ ##
1600
1601# ac_fn_c_try_compile LINENO
1602# --------------------------
1603# Try to compile conftest.$ac_ext, and return whether this succeeded.
1604ac_fn_c_try_compile ()
1605{
1606 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1607 rm -f conftest.$ac_objext
1608 if { { ac_try="$ac_compile"
1609case "(($ac_try" in
1610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1611 *) ac_try_echo=$ac_try;;
1612esac
1613eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1614$as_echo "$ac_try_echo"; } >&5
1615 (eval "$ac_compile") 2>conftest.err
1616 ac_status=$?
1617 if test -s conftest.err; then
1618 grep -v '^ *+' conftest.err >conftest.er1
1619 cat conftest.er1 >&5
1620 mv -f conftest.er1 conftest.err
1621 fi
1622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623 test $ac_status = 0; } && {
1624 test -z "$ac_c_werror_flag" ||
1625 test ! -s conftest.err
1626 } && test -s conftest.$ac_objext; then :
1627 ac_retval=0
1628else
1629 $as_echo "$as_me: failed program was:" >&5
1630sed 's/^/| /' conftest.$ac_ext >&5
1631
1632 ac_retval=1
1633fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001634 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001635 as_fn_set_status $ac_retval
1636
1637} # ac_fn_c_try_compile
1638
Matthias Kloseb9621712010-04-24 17:59:49 +00001639# ac_fn_c_try_link LINENO
1640# -----------------------
1641# Try to link conftest.$ac_ext, and return whether this succeeded.
1642ac_fn_c_try_link ()
1643{
1644 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1645 rm -f conftest.$ac_objext conftest$ac_exeext
1646 if { { ac_try="$ac_link"
1647case "(($ac_try" in
1648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649 *) ac_try_echo=$ac_try;;
1650esac
1651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652$as_echo "$ac_try_echo"; } >&5
1653 (eval "$ac_link") 2>conftest.err
1654 ac_status=$?
1655 if test -s conftest.err; then
1656 grep -v '^ *+' conftest.err >conftest.er1
1657 cat conftest.er1 >&5
1658 mv -f conftest.er1 conftest.err
1659 fi
1660 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1661 test $ac_status = 0; } && {
1662 test -z "$ac_c_werror_flag" ||
1663 test ! -s conftest.err
1664 } && test -s conftest$ac_exeext && {
1665 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001666 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 }; then :
1668 ac_retval=0
1669else
1670 $as_echo "$as_me: failed program was:" >&5
1671sed 's/^/| /' conftest.$ac_ext >&5
1672
1673 ac_retval=1
1674fi
1675 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1676 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1677 # interfere with the next link command; also delete a directory that is
1678 # left behind by Apple's compiler. We do this before executing the actions.
1679 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_link
1684
Matthias Kloseb9621712010-04-24 17:59:49 +00001685# ac_fn_c_try_cpp LINENO
1686# ----------------------
1687# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_cpp ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_cpp conftest.$ac_ext"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001706 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 }; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
1714
1715 ac_retval=1
1716fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_cpp
1721
1722# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1723# -------------------------------------------------------
1724# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1725# the include files in INCLUDES and setting the cache variable VAR
1726# accordingly.
1727ac_fn_c_check_header_mongrel ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001730 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001733if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001734 $as_echo_n "(cached) " >&6
1735fi
1736eval ac_res=\$$3
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1738$as_echo "$ac_res" >&6; }
1739else
1740 # Is the header compilable?
1741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1742$as_echo_n "checking $2 usability... " >&6; }
1743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1744/* end confdefs.h. */
1745$4
1746#include <$2>
1747_ACEOF
1748if ac_fn_c_try_compile "$LINENO"; then :
1749 ac_header_compiler=yes
1750else
1751 ac_header_compiler=no
1752fi
1753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1755$as_echo "$ac_header_compiler" >&6; }
1756
1757# Is the header present?
1758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1759$as_echo_n "checking $2 presence... " >&6; }
1760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1761/* end confdefs.h. */
1762#include <$2>
1763_ACEOF
1764if ac_fn_c_try_cpp "$LINENO"; then :
1765 ac_header_preproc=yes
1766else
1767 ac_header_preproc=no
1768fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001769rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1771$as_echo "$ac_header_preproc" >&6; }
1772
1773# So? What about this header?
1774case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1775 yes:no: )
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1777$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1780 ;;
1781 no:yes:* )
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1783$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1785$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1787$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1789$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1791$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001792( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001793## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001794## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001795 ) | sed "s/^/$as_me: WARNING: /" >&2
1796 ;;
1797esac
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1799$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001800if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001801 $as_echo_n "(cached) " >&6
1802else
1803 eval "$3=\$ac_header_compiler"
1804fi
1805eval ac_res=\$$3
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1807$as_echo "$ac_res" >&6; }
1808fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001810
1811} # ac_fn_c_check_header_mongrel
1812
1813# ac_fn_c_try_run LINENO
1814# ----------------------
1815# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1816# that executables *can* be run.
1817ac_fn_c_try_run ()
1818{
1819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1820 if { { ac_try="$ac_link"
1821case "(($ac_try" in
1822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1823 *) ac_try_echo=$ac_try;;
1824esac
1825eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1826$as_echo "$ac_try_echo"; } >&5
1827 (eval "$ac_link") 2>&5
1828 ac_status=$?
1829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1830 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1831 { { case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834esac
1835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836$as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_try") 2>&5
1838 ac_status=$?
1839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840 test $ac_status = 0; }; }; then :
1841 ac_retval=0
1842else
1843 $as_echo "$as_me: program exited with status $ac_status" >&5
1844 $as_echo "$as_me: failed program was:" >&5
1845sed 's/^/| /' conftest.$ac_ext >&5
1846
1847 ac_retval=$ac_status
1848fi
1849 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001850 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 as_fn_set_status $ac_retval
1852
1853} # ac_fn_c_try_run
1854
1855# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1856# -------------------------------------------------------
1857# Tests whether HEADER exists and can be compiled using the include files in
1858# INCLUDES, setting the cache variable VAR accordingly.
1859ac_fn_c_check_header_compile ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1863$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001864if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001865 $as_echo_n "(cached) " >&6
1866else
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870#include <$2>
1871_ACEOF
1872if ac_fn_c_try_compile "$LINENO"; then :
1873 eval "$3=yes"
1874else
1875 eval "$3=no"
1876fi
1877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001882 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001883
1884} # ac_fn_c_check_header_compile
1885
Matthias Kloseb9621712010-04-24 17:59:49 +00001886# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1887# -------------------------------------------
1888# Tests whether TYPE exists after having included INCLUDES, setting cache
1889# variable VAR accordingly.
1890ac_fn_c_check_type ()
1891{
1892 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001896 $as_echo_n "(cached) " >&6
1897else
1898 eval "$3=no"
1899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h. */
1901$4
1902int
1903main ()
1904{
1905if (sizeof ($2))
1906 return 0;
1907 ;
1908 return 0;
1909}
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915int
1916main ()
1917{
1918if (sizeof (($2)))
1919 return 0;
1920 ;
1921 return 0;
1922}
1923_ACEOF
1924if ac_fn_c_try_compile "$LINENO"; then :
1925
1926else
1927 eval "$3=yes"
1928fi
1929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1930fi
1931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1932fi
1933eval ac_res=\$$3
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001937
1938} # ac_fn_c_check_type
1939
1940# ac_fn_c_find_uintX_t LINENO BITS VAR
1941# ------------------------------------
1942# Finds an unsigned integer type with width BITS, setting cache variable VAR
1943# accordingly.
1944ac_fn_c_find_uintX_t ()
1945{
1946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1948$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001949if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001950 $as_echo_n "(cached) " >&6
1951else
1952 eval "$3=no"
1953 # Order is important - never check a type that is potentially smaller
1954 # than half of the expected target width.
1955 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1956 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$ac_includes_default
1960int
1961main ()
1962{
1963static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001964test_array [0] = 0;
1965return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001966
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972 case $ac_type in #(
1973 uint$2_t) :
1974 eval "$3=yes" ;; #(
1975 *) :
1976 eval "$3=\$ac_type" ;;
1977esac
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001980 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001990 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_uintX_t
1993
1994# ac_fn_c_find_intX_t LINENO BITS VAR
1995# -----------------------------------
1996# Finds a signed integer type with width BITS, setting cache variable VAR
1997# accordingly.
1998ac_fn_c_find_intX_t ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2002$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002003if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002004 $as_echo_n "(cached) " >&6
2005else
2006 eval "$3=no"
2007 # Order is important - never check a type that is potentially smaller
2008 # than half of the expected target width.
2009 for ac_type in int$2_t 'int' 'long int' \
2010 'long long int' 'short int' 'signed char'; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002014 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002015int
2016main ()
2017{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002018static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002019test_array [0] = 0;
2020return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002030 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002031int
2032main ()
2033{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002034static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002035 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002036test_array [0] = 0;
2037return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044
2045else
2046 case $ac_type in #(
2047 int$2_t) :
2048 eval "$3=yes" ;; #(
2049 *) :
2050 eval "$3=\$ac_type" ;;
2051esac
2052fi
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054fi
2055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002056 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058else
2059 break
2060fi
2061 done
2062fi
2063eval ac_res=\$$3
2064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2065$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002066 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068} # ac_fn_c_find_intX_t
2069
2070# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2071# --------------------------------------------
2072# Tries to find the compile-time value of EXPR in a program that includes
2073# INCLUDES, setting VAR accordingly. Returns whether the value could be
2074# computed
2075ac_fn_c_compute_int ()
2076{
2077 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2078 if test "$cross_compiling" = yes; then
2079 # Depending upon the size, compute the lo and hi bounds.
2080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
2083int
2084main ()
2085{
2086static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002087test_array [0] = 0;
2088return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002089
2090 ;
2091 return 0;
2092}
2093_ACEOF
2094if ac_fn_c_try_compile "$LINENO"; then :
2095 ac_lo=0 ac_mid=0
2096 while :; do
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002104test_array [0] = 0;
2105return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111if ac_fn_c_try_compile "$LINENO"; then :
2112 ac_hi=$ac_mid; break
2113else
2114 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2115 if test $ac_lo -le $ac_mid; then
2116 ac_lo= ac_hi=
2117 break
2118 fi
2119 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122 done
2123else
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127int
2128main ()
2129{
2130static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002131test_array [0] = 0;
2132return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002133
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_compile "$LINENO"; then :
2139 ac_hi=-1 ac_mid=-1
2140 while :; do
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h. */
2143$4
2144int
2145main ()
2146{
2147static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002148test_array [0] = 0;
2149return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_compile "$LINENO"; then :
2156 ac_lo=$ac_mid; break
2157else
2158 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2159 if test $ac_mid -le $ac_hi; then
2160 ac_lo= ac_hi=
2161 break
2162 fi
2163 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2164fi
2165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166 done
2167else
2168 ac_lo= ac_hi=
2169fi
2170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173# Binary search between lo and hi bounds.
2174while test "x$ac_lo" != "x$ac_hi"; do
2175 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179int
2180main ()
2181{
2182static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002183test_array [0] = 0;
2184return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002185
2186 ;
2187 return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"; then :
2191 ac_hi=$ac_mid
2192else
2193 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196done
2197case $ac_lo in #((
2198?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2199'') ac_retval=1 ;;
2200esac
2201 else
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$4
2205static long int longval () { return $2; }
2206static unsigned long int ulongval () { return $2; }
2207#include <stdio.h>
2208#include <stdlib.h>
2209int
2210main ()
2211{
2212
2213 FILE *f = fopen ("conftest.val", "w");
2214 if (! f)
2215 return 1;
2216 if (($2) < 0)
2217 {
2218 long int i = longval ();
2219 if (i != ($2))
2220 return 1;
2221 fprintf (f, "%ld", i);
2222 }
2223 else
2224 {
2225 unsigned long int i = ulongval ();
2226 if (i != ($2))
2227 return 1;
2228 fprintf (f, "%lu", i);
2229 }
2230 /* Do not output a trailing newline, as this causes \r\n confusion
2231 on some platforms. */
2232 return ferror (f) || fclose (f) != 0;
2233
2234 ;
2235 return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_run "$LINENO"; then :
2239 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2240else
2241 ac_retval=1
2242fi
2243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2244 conftest.$ac_objext conftest.beam conftest.$ac_ext
2245rm -f conftest.val
2246
2247 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002248 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 as_fn_set_status $ac_retval
2250
2251} # ac_fn_c_compute_int
2252
2253# ac_fn_c_check_func LINENO FUNC VAR
2254# ----------------------------------
2255# Tests whether FUNC exists, setting the cache variable VAR accordingly
2256ac_fn_c_check_func ()
2257{
2258 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2260$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002261if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002262 $as_echo_n "(cached) " >&6
2263else
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h. */
2266/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2267 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2268#define $2 innocuous_$2
2269
2270/* System header to define __stub macros and hopefully few prototypes,
2271 which can conflict with char $2 (); below.
2272 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2273 <limits.h> exists even on freestanding compilers. */
2274
2275#ifdef __STDC__
2276# include <limits.h>
2277#else
2278# include <assert.h>
2279#endif
2280
2281#undef $2
2282
2283/* Override any GCC internal prototype to avoid an error.
2284 Use char because int might match the return type of a GCC
2285 builtin and then its argument prototype would still apply. */
2286#ifdef __cplusplus
2287extern "C"
2288#endif
2289char $2 ();
2290/* The GNU C library defines this for functions which it implements
2291 to always fail with ENOSYS. Some functions are actually named
2292 something starting with __ and the normal name is an alias. */
2293#if defined __stub_$2 || defined __stub___$2
2294choke me
2295#endif
2296
2297int
2298main ()
2299{
2300return $2 ();
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305if ac_fn_c_try_link "$LINENO"; then :
2306 eval "$3=yes"
2307else
2308 eval "$3=no"
2309fi
2310rm -f core conftest.err conftest.$ac_objext \
2311 conftest$ac_exeext conftest.$ac_ext
2312fi
2313eval ac_res=\$$3
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002316 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002317
2318} # ac_fn_c_check_func
2319
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002320# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2321# ---------------------------------------------
2322# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2323# accordingly.
2324ac_fn_c_check_decl ()
2325{
2326 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2327 as_decl_name=`echo $2|sed 's/ *(.*//'`
2328 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2330$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2331if eval \${$3+:} false; then :
2332 $as_echo_n "(cached) " >&6
2333else
2334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335/* end confdefs.h. */
2336$4
2337int
2338main ()
2339{
2340#ifndef $as_decl_name
2341#ifdef __cplusplus
2342 (void) $as_decl_use;
2343#else
2344 (void) $as_decl_name;
2345#endif
2346#endif
2347
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352if ac_fn_c_try_compile "$LINENO"; then :
2353 eval "$3=yes"
2354else
2355 eval "$3=no"
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2358fi
2359eval ac_res=\$$3
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2361$as_echo "$ac_res" >&6; }
2362 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2363
2364} # ac_fn_c_check_decl
2365
Matthias Kloseb9621712010-04-24 17:59:49 +00002366# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2367# ----------------------------------------------------
2368# Tries to find if the field MEMBER exists in type AGGR, after including
2369# INCLUDES, setting cache variable VAR accordingly.
2370ac_fn_c_check_member ()
2371{
2372 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2374$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002375if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002376 $as_echo_n "(cached) " >&6
2377else
2378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h. */
2380$5
2381int
2382main ()
2383{
2384static $2 ac_aggr;
2385if (ac_aggr.$3)
2386return 0;
2387 ;
2388 return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"; then :
2392 eval "$4=yes"
2393else
2394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2395/* end confdefs.h. */
2396$5
2397int
2398main ()
2399{
2400static $2 ac_aggr;
2401if (sizeof ac_aggr.$3)
2402return 0;
2403 ;
2404 return 0;
2405}
2406_ACEOF
2407if ac_fn_c_try_compile "$LINENO"; then :
2408 eval "$4=yes"
2409else
2410 eval "$4=no"
2411fi
2412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2413fi
2414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2415fi
2416eval ac_res=\$$4
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002419 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002420
2421} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002423This file contains any messages produced by compilers while
2424running configure, to aid debugging if configure makes a mistake.
2425
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002426It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002427generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429 $ $0 $@
2430
2431_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002432exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002433{
2434cat <<_ASUNAME
2435## --------- ##
2436## Platform. ##
2437## --------- ##
2438
2439hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2440uname -m = `(uname -m) 2>/dev/null || echo unknown`
2441uname -r = `(uname -r) 2>/dev/null || echo unknown`
2442uname -s = `(uname -s) 2>/dev/null || echo unknown`
2443uname -v = `(uname -v) 2>/dev/null || echo unknown`
2444
2445/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2446/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2447
2448/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2449/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2450/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002452/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2453/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2454/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2455
2456_ASUNAME
2457
2458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2459for as_dir in $PATH
2460do
2461 IFS=$as_save_IFS
2462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 $as_echo "PATH: $as_dir"
2464 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
2467} >&5
2468
2469cat >&5 <<_ACEOF
2470
2471
2472## ----------- ##
2473## Core tests. ##
2474## ----------- ##
2475
2476_ACEOF
2477
2478
2479# Keep a trace of the command line.
2480# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002481# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002482# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002483# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002484ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002485ac_configure_args0=
2486ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002487ac_must_keep_next=false
2488for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002489do
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 for ac_arg
2491 do
2492 case $ac_arg in
2493 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2494 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2495 | -silent | --silent | --silen | --sile | --sil)
2496 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 esac
2500 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002505 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002507 case $ac_arg in
2508 *=* | --config-cache | -C | -disable-* | --disable-* \
2509 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2510 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2511 | -with-* | --with-* | -without-* | --without-* | --x)
2512 case "$ac_configure_args0 " in
2513 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2514 esac
2515 ;;
2516 -* ) ac_must_keep_next=true ;;
2517 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 ;;
2521 esac
2522 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002523done
Matthias Kloseb9621712010-04-24 17:59:49 +00002524{ ac_configure_args0=; unset ac_configure_args0;}
2525{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002526
2527# When interrupted or exit'd, cleanup temporary files, and complete
2528# config.log. We remove comments because anyway the quotes in there
2529# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530# WARNING: Use '\'' to represent an apostrophe within the trap.
2531# 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 +00002532trap 'exit_status=$?
2533 # Save into config.log some information that might help in debugging.
2534 {
2535 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002536
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002538## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002539## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 echo
2541 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542(
2543 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2544 eval ac_val=\$$ac_var
2545 case $ac_val in #(
2546 *${as_nl}*)
2547 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2549$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 esac
2551 case $ac_var in #(
2552 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002553 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2554 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 esac ;;
2556 esac
2557 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2560 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 "s/'\''/'\''\\\\'\'''\''/g;
2563 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2564 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002565 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002567 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac |
2569 sort
2570)
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002572
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002574## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002576 echo
2577 for ac_var in $ac_subst_vars
2578 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 eval ac_val=\$$ac_var
2580 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002584 done | sort
2585 echo
2586
2587 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002590## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002591 echo
2592 for ac_var in $ac_subst_files
2593 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 eval ac_val=\$$ac_var
2595 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002599 done | sort
2600 echo
2601 fi
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002604 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002605## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002606## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 echo
2610 fi
2611 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 $as_echo "$as_me: caught signal $ac_signal"
2613 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 rm -f core *.core core.conftest.* &&
2616 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002619for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002621done
2622ac_signal=0
2623
2624# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002626
Matthias Kloseb9621712010-04-24 17:59:49 +00002627$as_echo "/* confdefs.h */" > confdefs.h
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629# Predefined preprocessor variables.
2630
2631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_NAME "$PACKAGE_NAME"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2637_ACEOF
2638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_VERSION "$PACKAGE_VERSION"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_STRING "$PACKAGE_STRING"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2649_ACEOF
2650
Matthias Kloseb9621712010-04-24 17:59:49 +00002651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_URL "$PACKAGE_URL"
2653_ACEOF
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655
2656# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002657# Prefer an explicitly selected file to automatically selected ones.
2658ac_site_file1=NONE
2659ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002661 # We do not want a PATH search for config.site.
2662 case $CONFIG_SITE in #((
2663 -*) ac_site_file1=./$CONFIG_SITE;;
2664 */*) ac_site_file1=$CONFIG_SITE;;
2665 *) ac_site_file1=./$CONFIG_SITE;;
2666 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 ac_site_file1=$prefix/share/config.site
2669 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670else
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 ac_site_file1=$ac_default_prefix/share/config.site
2672 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002674for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002675do
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 test "x$ac_site_file" = xNONE && continue
2677 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2679$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002681 . "$ac_site_file" \
2682 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002685See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686 fi
2687done
2688
2689if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 # Some versions of bash will fail to source /dev/null (special files
2691 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2692 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2694$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2697 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 esac
2699 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700else
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2702$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 >$cache_file
2704fi
2705
2706# Check that the precious variables saved in the cache have kept the same
2707# value.
2708ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2711 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2713 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 case $ac_old_set,$ac_new_set in
2715 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2717$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 +00002718 ac_cache_corrupted=: ;;
2719 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002720 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2721$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 ac_cache_corrupted=: ;;
2723 ,);;
2724 *)
2725 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 # differences in whitespace do not lead to failure.
2727 ac_old_val_w=`echo x $ac_old_val`
2728 ac_new_val_w=`echo x $ac_new_val`
2729 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2731$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2732 ac_cache_corrupted=:
2733 else
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2735$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2736 eval $ac_var=\$ac_old_val
2737 fi
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2739$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2741$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 fi;;
2743 esac
2744 # Pass precious variables to config.status.
2745 if test "$ac_new_set" = set; then
2746 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002747 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 *) ac_arg=$ac_var=$ac_new_val ;;
2749 esac
2750 case " $ac_configure_args " in
2751 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002752 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 esac
2754 fi
2755done
2756if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2760$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002761 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002763## -------------------- ##
2764## Main body of script. ##
2765## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766
Guido van Rossum7f43da71994-08-01 12:15:30 +00002767ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002769ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2770ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2771ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002772
Guido van Rossum627b2d71993-12-24 10:39:16 +00002773
Michael W. Hudson54241132001-12-07 15:38:26 +00002774
Trent Nelson4d4ec652012-10-16 08:51:24 -04002775
Trent Nelson5595ab52012-10-17 04:47:31 -04002776if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002777 # If we're building out-of-tree, we need to make sure the following
2778 # resources get picked up before their $srcdir counterparts.
2779 # Objects/ -> typeslots.inc
2780 # Include/ -> Python-ast.h, graminit.h
2781 # Python/ -> importlib.h
2782 # (A side effect of this is that these resources will automatically be
2783 # regenerated when building out-of-tree, regardless of whether or not
2784 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2785 # off.)
2786 BASECPPFLAGS="-IObjects -IInclude -IPython"
2787else
2788 BASECPPFLAGS=""
2789fi
2790
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791
2792
2793
2794
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002795if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002796then
2797# Extract the first word of "hg", so it can be a program name with args.
2798set dummy hg; ac_word=$2
2799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2800$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002801if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802 $as_echo_n "(cached) " >&6
2803else
2804 if test -n "$HAS_HG"; then
2805 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2806else
2807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2808for as_dir in $PATH
2809do
2810 IFS=$as_save_IFS
2811 test -z "$as_dir" && as_dir=.
2812 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002814 ac_cv_prog_HAS_HG="found"
2815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2816 break 2
2817 fi
2818done
2819 done
2820IFS=$as_save_IFS
2821
2822 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2823fi
2824fi
2825HAS_HG=$ac_cv_prog_HAS_HG
2826if test -n "$HAS_HG"; then
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2828$as_echo "$HAS_HG" >&6; }
2829else
2830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2831$as_echo "no" >&6; }
2832fi
2833
2834
2835else
2836HAS_HG=no-repository
2837fi
2838if test $HAS_HG = found
2839then
2840 HGVERSION="hg id -i \$(srcdir)"
2841 HGTAG="hg id -t \$(srcdir)"
2842 HGBRANCH="hg id -b \$(srcdir)"
2843else
2844 HGVERSION=""
2845 HGTAG=""
2846 HGBRANCH=""
2847fi
2848
2849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002850ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002851
2852
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002853ac_aux_dir=
2854for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2855 if test -f "$ac_dir/install-sh"; then
2856 ac_aux_dir=$ac_dir
2857 ac_install_sh="$ac_aux_dir/install-sh -c"
2858 break
2859 elif test -f "$ac_dir/install.sh"; then
2860 ac_aux_dir=$ac_dir
2861 ac_install_sh="$ac_aux_dir/install.sh -c"
2862 break
2863 elif test -f "$ac_dir/shtool"; then
2864 ac_aux_dir=$ac_dir
2865 ac_install_sh="$ac_aux_dir/shtool install -c"
2866 break
2867 fi
2868done
2869if test -z "$ac_aux_dir"; then
2870 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2871fi
2872
2873# These three variables are undocumented and unsupported,
2874# and are intended to be withdrawn in a future Autoconf release.
2875# They can cause serious problems if a builder's source tree is in a directory
2876# whose full name contains unusual characters.
2877ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2878ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2879ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2880
2881
2882# Make sure we can run config.sub.
2883$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2884 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2885
2886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2887$as_echo_n "checking build system type... " >&6; }
2888if ${ac_cv_build+:} false; then :
2889 $as_echo_n "(cached) " >&6
2890else
2891 ac_build_alias=$build_alias
2892test "x$ac_build_alias" = x &&
2893 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2894test "x$ac_build_alias" = x &&
2895 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2896ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2897 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2898
2899fi
2900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2901$as_echo "$ac_cv_build" >&6; }
2902case $ac_cv_build in
2903*-*-*) ;;
2904*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2905esac
2906build=$ac_cv_build
2907ac_save_IFS=$IFS; IFS='-'
2908set x $ac_cv_build
2909shift
2910build_cpu=$1
2911build_vendor=$2
2912shift; shift
2913# Remember, the first character of IFS is used to create $*,
2914# except with old shells:
2915build_os=$*
2916IFS=$ac_save_IFS
2917case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2918
2919
2920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2921$as_echo_n "checking host system type... " >&6; }
2922if ${ac_cv_host+:} false; then :
2923 $as_echo_n "(cached) " >&6
2924else
2925 if test "x$host_alias" = x; then
2926 ac_cv_host=$ac_cv_build
2927else
2928 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2929 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2930fi
2931
2932fi
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2934$as_echo "$ac_cv_host" >&6; }
2935case $ac_cv_host in
2936*-*-*) ;;
2937*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2938esac
2939host=$ac_cv_host
2940ac_save_IFS=$IFS; IFS='-'
2941set x $ac_cv_host
2942shift
2943host_cpu=$1
2944host_vendor=$2
2945shift; shift
2946# Remember, the first character of IFS is used to create $*,
2947# except with old shells:
2948host_os=$*
2949IFS=$ac_save_IFS
2950case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2951
2952
2953
doko@python.orga10e4a92013-01-25 18:45:12 +01002954
2955
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002956if test "$cross_compiling" = yes; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2958$as_echo_n "checking for python interpreter for cross build... " >&6; }
2959 if test -z "$PYTHON_FOR_BUILD"; then
2960 for interp in python$PACKAGE_VERSION python3 python; do
2961 which $interp >/dev/null 2>&1 || continue
2962 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2963 break
2964 fi
2965 interp=
2966 done
2967 if test x$interp = x; then
2968 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2969 fi
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2971$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002972 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 +02002973 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002974elif test "$cross_compiling" = maybe; then
2975 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002976else
2977 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2978fi
2979
2980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
Benjamin Petersond23f8222009-04-05 19:13:16 +00002982if test "$prefix" != "/"; then
2983 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2984fi
2985
2986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
2988
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002989# We don't use PACKAGE_ variables, and they cause conflicts
2990# with other autoconf-based packages that include Python.h
2991grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2992rm confdefs.h
2993mv confdefs.h.new confdefs.h
2994
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002995
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002996VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002997
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002998# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002999
3000SOVERSION=1.0
3001
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002# The later defininition of _XOPEN_SOURCE disables certain features
3003# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
3007
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3010# them.
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003013
3014
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003015# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3016# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3017# them.
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003020
3021
Martin v. Löwisd6320502004-08-12 13:45:08 +00003022# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3023# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3024
Matthias Kloseb9621712010-04-24 17:59:49 +00003025$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003026
3027
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003028# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3029# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3030# them.
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003033
3034
3035
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003036define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003037
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003038# Arguments passed to configure.
3039
3040CONFIG_ARGS="$ac_configure_args"
3041
Matthias Kloseb9621712010-04-24 17:59:49 +00003042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3043$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003045if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 case $enableval in
3048 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003049 # Locate the best usable SDK, see Mac/README.txt for more
3050 # information
3051 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003052 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3055 if test ! -d "${enableval}"
3056 then
3057 enableval=/
3058 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060 ;;
3061 esac
3062 case $enableval in
3063 no)
3064 UNIVERSALSDK=
3065 enable_universalsdk=
3066 ;;
3067 *)
3068 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 if test ! -d "${UNIVERSALSDK}"
3070 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003071 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073 ;;
3074 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003075
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077else
3078
3079 UNIVERSALSDK=
3080 enable_universalsdk=
3081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003084if test -n "${UNIVERSALSDK}"
3085then
Matthias Kloseb9621712010-04-24 17:59:49 +00003086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3087$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088else
Matthias Kloseb9621712010-04-24 17:59:49 +00003089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3090$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003094
Ned Deily87adb6e2013-10-18 21:09:56 -07003095ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003096
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097# For backward compatibility reasons we prefer to select '32-bit' if available,
3098# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003100if test "`uname -s`" = "Darwin"
3101then
3102 if test -n "${UNIVERSALSDK}"
3103 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003104 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003105 then
3106 UNIVERSAL_ARCHS="intel"
3107 fi
3108 fi
3109fi
3110
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003111
Matthias Kloseb9621712010-04-24 17:59:49 +00003112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3113$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114
3115# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003116if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118 UNIVERSAL_ARCHS="$withval"
3119
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120fi
3121
Ned Deily87adb6e2013-10-18 21:09:56 -07003122if test -n "${UNIVERSALSDK}"
3123then
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3125$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3126else
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3128$as_echo "no" >&6; }
3129fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003131
3132# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003133if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003134 withval=$with_framework_name;
3135 PYTHONFRAMEWORK=${withval}
3136 PYTHONFRAMEWORKDIR=${withval}.framework
3137 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3138
3139else
3140
3141 PYTHONFRAMEWORK=Python
3142 PYTHONFRAMEWORKDIR=Python.framework
3143 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3144
3145fi
3146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003148if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003150 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003151 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003152 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003153 esac
3154 case $enableval in
3155 no)
3156 PYTHONFRAMEWORK=
3157 PYTHONFRAMEWORKDIR=no-framework
3158 PYTHONFRAMEWORKPREFIX=
3159 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003160 FRAMEWORKINSTALLFIRST=
3161 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 FRAMEWORKALTINSTALLFIRST=
3163 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003164 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003165 if test "x${prefix}" = "xNONE"; then
3166 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3167 else
3168 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3169 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003170 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003171 ;;
3172 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003173 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003176 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003177 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3178 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003179 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003181
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003182 if test "x${prefix}" = "xNONE" ; then
3183 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003185 else
3186 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3187 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188
3189 case "${enableval}" in
3190 /System*)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 if test "${prefix}" = "NONE" ; then
3193 # See below
3194 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3195 fi
3196 ;;
3197
3198 /Library*)
3199 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3200 ;;
3201
3202 */Library/Frameworks)
3203 MDIR="`dirname "${enableval}"`"
3204 MDIR="`dirname "${MDIR}"`"
3205 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3206
3207 if test "${prefix}" = "NONE"; then
3208 # User hasn't specified the
3209 # --prefix option, but wants to install
3210 # the framework in a non-default location,
3211 # ensure that the compatibility links get
3212 # installed relative to that prefix as well
3213 # instead of in /usr/local.
3214 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3215 fi
3216 ;;
3217
3218 *)
3219 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3220 ;;
3221 esac
3222
Jack Jansen127e56e2001-09-11 14:41:54 +00003223 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003227 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3232
3233 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3234
Jack Jansene578a632001-08-15 01:27:14 +00003235 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003236
Guido van Rossum563e7081996-09-10 18:20:48 +00003237else
Martin v. Löwis11437992002-04-12 09:54:03 +00003238
Jack Jansene578a632001-08-15 01:27:14 +00003239 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003240 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003241 PYTHONFRAMEWORKPREFIX=
3242 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243 FRAMEWORKINSTALLFIRST=
3244 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003245 FRAMEWORKALTINSTALLFIRST=
3246 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003247 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248 if test "x${prefix}" = "xNONE" ; then
3249 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3250 else
3251 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3252 fi
Jack Jansene578a632001-08-15 01:27:14 +00003253 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256fi
3257
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258
3259
Michael W. Hudson54241132001-12-07 15:38:26 +00003260
3261
3262
3263
Jack Jansene578a632001-08-15 01:27:14 +00003264
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003265
3266
3267
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003268
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003269
Ned Deilyb8f944f2013-11-21 22:42:25 -08003270
Jack Jansene578a632001-08-15 01:27:14 +00003271##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003272## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003273## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275# Set name for machine-dependent library files
3276
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3278$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279if test -z "$MACHDEP"
3280then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 # avoid using uname for cross builds
3282 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003283 # ac_sys_system and ac_sys_release are used for setting
3284 # a lot of different things including 'define_xopen_source'
3285 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case "$host" in
3287 *-*-linux*)
3288 ac_sys_system=Linux
3289 ;;
3290 *-*-cygwin*)
3291 ac_sys_system=Cygwin
3292 ;;
3293 *)
3294 # for now, limit cross builds to known configurations
3295 MACHDEP="unknown"
3296 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3297 esac
3298 ac_sys_release=
3299 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003300 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003301 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003302 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003303 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003304 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003305 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003306 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003307 fi
3308 ac_md_system=`echo $ac_sys_system |
3309 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3310 ac_md_release=`echo $ac_sys_release |
3311 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3312 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003313
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003314 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003315 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003316 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003317 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003318 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003319 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003320 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003321fi
Guido van Rossum91922671997-10-09 20:24:13 +00003322
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003323
3324if test "$cross_compiling" = yes; then
3325 case "$host" in
3326 *-*-linux*)
3327 case "$host_cpu" in
3328 arm*)
3329 _host_cpu=arm
3330 ;;
3331 *)
3332 _host_cpu=$host_cpu
3333 esac
3334 ;;
3335 *-*-cygwin*)
3336 _host_cpu=
3337 ;;
3338 *)
3339 # for now, limit cross builds to known configurations
3340 MACHDEP="unknown"
3341 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3342 esac
3343 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3344fi
3345
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003346# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3347# disable features if it is defined, without any means to access these
3348# features as extensions. For these systems, we skip the definition of
3349# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3350# some feature, make sure there is no alternative way to access this
3351# feature. Also, when using wildcards, make sure you have verified the
3352# need for not defining _XOPEN_SOURCE on all systems matching the
3353# wildcard, and that the wildcard does not include future systems
3354# (which may remove their limitations).
3355case $ac_sys_system/$ac_sys_release in
3356 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3357 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003358 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003359 # In addition, Stefan Krah confirms that issue #1244610 exists through
3360 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003361 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003362 define_xopen_source=no
3363 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3364 # also defined. This can be overridden by defining _BSD_SOURCE
3365 # As this has a different meaning on Linux, only define it on OpenBSD
3366
Matthias Kloseb9621712010-04-24 17:59:49 +00003367$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003368
3369 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003370 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003371 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3372 # also defined. This can be overridden by defining _BSD_SOURCE
3373 # As this has a different meaning on Linux, only define it on OpenBSD
3374
Matthias Kloseb9621712010-04-24 17:59:49 +00003375$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003376
3377 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003378 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3379 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3380 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003381 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 +00003382 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003383 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3384 # request to enable features supported by the standard as a request
3385 # to disable features not supported by the standard. The best way
3386 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3387 # entirely and define __EXTENSIONS__ instead.
3388 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003389 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003390 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3391 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003392 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003393 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 define_xopen_source=no;;
3395 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003396 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003397 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003398 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003399 # On FreeBSD 4, the math functions C89 does not cover are never defined
3400 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3401 FreeBSD/4.*)
3402 define_xopen_source=no;;
3403 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3404 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3405 # identifies itself as Darwin/7.*
3406 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3407 # disables platform specific features beyond repair.
3408 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3409 # has no effect, don't bother defining them
3410 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003411 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003412 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003413 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003414 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3415 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3416 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003417 AIX/4)
3418 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003419 AIX/5)
3420 if test `uname -r` -eq 1; then
3421 define_xopen_source=no
3422 fi
3423 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003424 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3425 # defining NI_NUMERICHOST.
3426 QNX/6.3.2)
3427 define_xopen_source=no
3428 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003429
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003430esac
3431
3432if test $define_xopen_source = yes
3433then
Victor Stinner14d098d2011-09-07 22:29:43 +02003434 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
Victor Stinner14d098d2011-09-07 22:29:43 +02003436$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003437
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003438
3439 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3440 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3441 # several APIs are not declared. Since this is also needed in some
3442 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003443
Matthias Kloseb9621712010-04-24 17:59:49 +00003444$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
3446
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003447
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003448$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003450fi
3451
Christian Heimes647cd872013-12-07 23:39:33 +01003452# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3453case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003454 hp*|HP*)
3455 define_stdc_a1=yes;;
3456 *)
3457 define_stdc_a1=no;;
3458esac
3459
3460if test $define_stdc_a1 = yes
3461then
Christian Heimes647cd872013-12-07 23:39:33 +01003462
3463$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3464
Christian Heimesb02bcae2013-12-08 15:21:08 +01003465fi
Christian Heimes647cd872013-12-07 23:39:33 +01003466
Guido van Rossum91922671997-10-09 20:24:13 +00003467#
3468# SGI compilers allow the specification of the both the ABI and the
3469# ISA on the command line. Depending on the values of these switches,
3470# different and often incompatable code will be generated.
3471#
3472# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3473# thus supply support for various ABI/ISA combinations. The MACHDEP
3474# variable is also adjusted.
3475#
3476
3477if test ! -z "$SGI_ABI"
3478then
3479 CC="cc $SGI_ABI"
3480 LDFLAGS="$SGI_ABI $LDFLAGS"
3481 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3484$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003485
Jack Jansen6b08a402004-06-03 12:41:45 +00003486# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3487# it may influence the way we can build extensions, so distutils
3488# needs to check it
3489
Thomas Wouters477c8d52006-05-27 19:21:47 +00003490
Jack Jansen6b08a402004-06-03 12:41:45 +00003491CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003492EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003493
Guido van Rossum627b2d71993-12-24 10:39:16 +00003494# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003495
3496# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3497# for debug/optimization stuff. BASECFLAGS is for flags that are required
3498# just to get things to compile and link. Users are free to override OPT
3499# when running configure or make. The build should not break if they do.
3500# BASECFLAGS should generally not be messed with, however.
3501
3502# XXX shouldn't some/most/all of this code be merged with the stuff later
3503# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3505$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003508if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003510 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003511 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003512 without_gcc=yes;;
3513 yes) CC=gcc
3514 without_gcc=no;;
3515 *) CC=$withval
3516 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003517 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003518else
Martin v. Löwis11437992002-04-12 09:54:03 +00003519
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003520 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003521 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003522 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003523 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003524 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525fi
3526
Matthias Kloseb9621712010-04-24 17:59:49 +00003527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3528$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003537# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3538# when the compiler supports them, but we don't always want -O2, and
3539# we set -g later.
3540if test -z "$CFLAGS"; then
3541 CFLAGS=
3542fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543
3544if test "$ac_sys_system" = "Darwin"
3545then
3546 # Compiler selection on MacOSX is more complicated than
3547 # AC_PROG_CC can handle, see Mac/README.txt for more
3548 # information
3549 if test -z "${CC}"
3550 then
3551 found_gcc=
3552 found_clang=
3553 as_save_IFS=$IFS; IFS=:
3554 for as_dir in $PATH
3555 do
3556 IFS=$as_save_IFS
3557 if test -x $as_dir/gcc; then
3558 if test -z "${found_gcc}"; then
3559 found_gcc=$as_dir/gcc
3560 fi
3561 fi
3562 if test -x $as_dir/clang; then
3563 if test -z "${found_clang}"; then
3564 found_clang=$as_dir/clang
3565 fi
3566 fi
3567 done
3568 IFS=$as_save_IFS
3569
3570 if test -n "$found_gcc" -a -n "$found_clang"
3571 then
3572 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3575$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3576 CC="$found_clang"
3577 CXX="$found_clang++"
3578 fi
3579
3580
3581 elif test -z "$found_gcc" -a -n "$found_clang"
3582 then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3584$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3585 CC="$found_clang"
3586 CXX="$found_clang++"
3587
3588 elif test -z "$found_gcc" -a -z "$found_clang"
3589 then
3590 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3591 if test -n "${found_clang}"
3592 then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3594$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3595 CC="${found_clang}"
3596 CXX="`/usr/bin/xcrun -find clang++`"
3597
3598 # else: use default behaviour
3599 fi
3600 fi
3601 fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3610set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003613if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003615else
3616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $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 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003636CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647if test -z "$ac_cv_prog_CC"; then
3648 ac_ct_CC=$CC
3649 # Extract the first word of "gcc", so it can be a program name with args.
3650set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003653if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 if test -n "$ac_ct_CC"; then
3657 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3658else
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $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 +00003668 break 2
3669 fi
3670done
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003673
3674fi
3675fi
3676ac_ct_CC=$ac_cv_prog_ac_ct_CC
3677if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3679$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test "x$ac_ct_CC" = x; then
3686 CC=""
3687 else
3688 case $cross_compiling:$ac_tool_warned in
3689yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692ac_tool_warned=yes ;;
3693esac
3694 CC=$ac_ct_CC
3695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003698fi
3699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test -n "$ac_tool_prefix"; then
3702 # 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 +00003703set dummy ${ac_tool_prefix}cc; 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_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003708else
3709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_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_CC="${ac_tool_prefix}cc"
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
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$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
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 # Extract the first word of "cc", so it can be a program name with args.
3743set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3745$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003746if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003748else
3749 if test -n "$CC"; then
3750 ac_cv_prog_CC="$CC" # Let the user override the test.
3751else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3761 ac_prog_rejected=yes
3762 continue
3763 fi
3764 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $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 +00003766 break 2
3767 fi
3768done
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772if test $ac_prog_rejected = yes; then
3773 # We found a bogon in the path, so make sure we never use it.
3774 set dummy $ac_cv_prog_CC
3775 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 # We chose a different compiler from the bogus one.
3778 # However, it has the same basename, so the bogon will be chosen
3779 # first if we set CC to just the basename; use the full file name.
3780 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003781 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782 fi
3783fi
3784fi
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797if test -z "$CC"; then
3798 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 do
3801 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003805if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003807else
3808 if test -n "$CC"; then
3809 ac_cv_prog_CC="$CC" # Let the user override the test.
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
3815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $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 +00003820 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826fi
3827fi
3828CC=$ac_cv_prog_CC
3829if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3831$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003835fi
3836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$CC" && break
3839 done
3840fi
3841if test -z "$CC"; then
3842 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003844do
3845 # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003849if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
3852 if test -n "$ac_ct_CC"; then
3853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3854else
3855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858 IFS=$as_save_IFS
3859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 $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 +00003864 break 2
3865 fi
3866done
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871fi
3872ac_ct_CC=$ac_cv_prog_ac_ct_CC
3873if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3875$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876else
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 test -n "$ac_ct_CC" && break
3883done
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 if test "x$ac_ct_CC" = x; then
3886 CC=""
3887 else
3888 case $cross_compiling:$ac_tool_warned in
3889yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892ac_tool_warned=yes ;;
3893esac
3894 CC=$ac_ct_CC
3895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003896fi
3897
3898fi
3899
3900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003903as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003904See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003907$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3908set X $ac_compile
3909ac_compiler=$2
3910for ac_option in --version -v -V -qversion; do
3911 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3917$as_echo "$ac_try_echo"; } >&5
3918 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test -s conftest.err; then
3921 sed '10a\
3922... rest of stderr output deleted ...
3923 10q' conftest.err >conftest.er1
3924 cat conftest.er1 >&5
3925 fi
3926 rm -f conftest.er1 conftest.err
3927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }
3929done
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934int
3935main ()
3936{
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003943ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944# Try to create an executable without -o first, disregard a.out.
3945# It will help us diagnose broken compilers, and finding out an intuition
3946# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3948$as_echo_n "checking whether the C compiler works... " >&6; }
3949ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3950
3951# The possible output files:
3952ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954ac_rmfiles=
3955for ac_file in $ac_files
3956do
3957 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3960 esac
3961done
3962rm -f $ac_rmfiles
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if { { ac_try="$ac_link_default"
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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3976# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3977# in a Makefile. We should not override ac_cv_exeext if it was cached,
3978# so that the user can short-circuit this test for compilers unknown to
3979# Autoconf.
3980for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003981do
3982 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 ;;
3986 [ab].out )
3987 # We found the default executable, but exeext='' is most
3988 # certainly right.
3989 break;;
3990 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 then :; else
3993 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3994 fi
3995 # We set ac_cv_exeext here because the later test for it is not
3996 # safe: cross compilers may not add the suffix if given an `-o'
3997 # argument, so we may need to know it at that point already.
3998 # Even if this section looks crufty: it has the advantage of
3999 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000 break;;
4001 * )
4002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 esac
4004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005test "$ac_cv_exeext" = no && ac_cv_exeext=
4006
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004007else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_file=''
4009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004010if test -z "$ac_file"; then :
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012$as_echo "no" >&6; }
4013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004014sed 's/^/| /' conftest.$ac_ext >&5
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004018as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004019See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004020else
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4022$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4025$as_echo_n "checking for C compiler default output file name... " >&6; }
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4027$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4033$as_echo_n "checking for suffix of executables... " >&6; }
4034if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4046# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4047# work properly (i.e., refer to `conftest.exe'), while it won't with
4048# `rm'.
4049for ac_file in conftest.exe conftest conftest.*; do
4050 test -f "$ac_file" || continue
4051 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054 break;;
4055 * ) break;;
4056 esac
4057done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004061as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004062See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004064rm -f conftest conftest$ac_cv_exeext
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4066$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067
4068rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004069EXEEXT=$ac_cv_exeext
4070ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#include <stdio.h>
4074int
4075main ()
4076{
4077FILE *f = fopen ("conftest.out", "w");
4078 return ferror (f) || fclose (f) != 0;
4079
4080 ;
4081 return 0;
4082}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004084ac_clean_files="$ac_clean_files conftest.out"
4085# Check that the compiler produces executables we can run. If not, either
4086# the compiler is broken, or we cross compile.
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4088$as_echo_n "checking whether we are cross compiling... " >&6; }
4089if test "$cross_compiling" != yes; then
4090 { { ac_try="$ac_link"
4091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_link") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }
4101 if { ac_try='./conftest$ac_cv_exeext'
4102 { { case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
4108 (eval "$ac_try") 2>&5
4109 ac_status=$?
4110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; }; then
4112 cross_compiling=no
4113 else
4114 if test "$cross_compiling" = maybe; then
4115 cross_compiling=yes
4116 else
4117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004119as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 fi
4123 fi
4124fi
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4126$as_echo "$cross_compiling" >&6; }
4127
4128rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4129ac_clean_files=$ac_clean_files_save
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4131$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004132if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo_n "(cached) " >&6
4134else
4135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136/* end confdefs.h. */
4137
4138int
4139main ()
4140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004147if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4153$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4157 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 for ac_file in conftest.o conftest.obj conftest.*; do
4159 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4163 break;;
4164 esac
4165done
4166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004168sed 's/^/| /' conftest.$ac_ext >&5
4169
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ { $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 compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004175rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4178$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179OBJEXT=$ac_cv_objext
4180ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4182$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004183if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192#ifndef __GNUC__
4193 choke me
4194#endif
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 ac_compiler_gnu=yes
4202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_cv_c_compiler_gnu=$ac_compiler_gnu
4207
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4210$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4211if test $ac_compiler_gnu = yes; then
4212 GCC=yes
4213else
4214 GCC=
4215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004216ac_test_CFLAGS=${CFLAGS+set}
4217ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4219$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004220if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_save_c_werror_flag=$ac_c_werror_flag
4224 ac_c_werror_flag=yes
4225 ac_cv_prog_cc_g=no
4226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240else
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 CFLAGS=""
4242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
4246main ()
4247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254
Matthias Kloseb9621712010-04-24 17:59:49 +00004255else
4256 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4277 ac_c_werror_flag=$ac_save_c_werror_flag
4278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283elif test $ac_cv_prog_cc_g = yes; then
4284 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285 CFLAGS="-g -O2"
4286 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288 fi
4289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 if test "$GCC" = yes; then
4291 CFLAGS="-O2"
4292 else
4293 CFLAGS=
4294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4297$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004298if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004302ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
4305#include <stdarg.h>
4306#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004307struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4309struct buf { int x; };
4310FILE * (*rcsopen) (struct buf *, struct stat *, int);
4311static char *e (p, i)
4312 char **p;
4313 int i;
4314{
4315 return p[i];
4316}
4317static char *f (char * (*g) (char **, int), char **p, ...)
4318{
4319 char *s;
4320 va_list v;
4321 va_start (v,p);
4322 s = g (p, va_arg (v,int));
4323 va_end (v);
4324 return s;
4325}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326
4327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4328 function prototypes and stuff, but not '\xHH' hex character constants.
4329 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4332 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4337 inside strings and character constants. */
4338#define FOO(x) 'x'
4339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4340
Skip Montanaro6dead952003-09-25 14:50:04 +00004341int test (int i, double x);
4342struct s1 {int (*f) (int a);};
4343struct s2 {int (*f) (double a);};
4344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4345int argc;
4346char **argv;
4347int
4348main ()
4349{
4350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4351 ;
4352 return 0;
4353}
4354_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4356 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004357do
4358 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f core conftest.err conftest.$ac_objext
4363 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004364done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366CC=$ac_save_CC
4367
4368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369# AC_CACHE_VAL
4370case "x$ac_cv_prog_cc_c89" in
4371 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4376$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4380$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004382if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004392
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004393
4394
Matthias Kloseb9621712010-04-24 17:59:49 +00004395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4396$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004399if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004401
4402 case $withval in
4403 no) with_cxx_main=no
4404 MAINCC='$(CC)';;
4405 yes) with_cxx_main=yes
4406 MAINCC='$(CXX)';;
4407 *) with_cxx_main=yes
4408 MAINCC=$withval
4409 if test -z "$CXX"
4410 then
4411 CXX=$withval
4412 fi;;
4413 esac
4414else
4415
4416 with_cxx_main=no
4417 MAINCC='$(CC)'
4418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419fi
4420
Matthias Kloseb9621712010-04-24 17:59:49 +00004421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4422$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004423
4424preset_cxx="$CXX"
4425if test -z "$CXX"
4426then
4427 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004428 gcc) if test -n "$ac_tool_prefix"; then
4429 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4430set dummy ${ac_tool_prefix}g++; ac_word=$2
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432$as_echo_n "checking for $ac_word... " >&6; }
4433if ${ac_cv_path_CXX+:} false; then :
4434 $as_echo_n "(cached) " >&6
4435else
4436 case $CXX in
4437 [\\/]* | ?:[\\/]*)
4438 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4439 ;;
4440 *)
4441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in notfound
4443do
4444 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=.
4446 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004447 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004448 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4450 break 2
4451 fi
4452done
4453 done
4454IFS=$as_save_IFS
4455
4456 ;;
4457esac
4458fi
4459CXX=$ac_cv_path_CXX
4460if test -n "$CXX"; then
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4462$as_echo "$CXX" >&6; }
4463else
4464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465$as_echo "no" >&6; }
4466fi
4467
4468
4469fi
4470if test -z "$ac_cv_path_CXX"; then
4471 ac_pt_CXX=$CXX
4472 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004473set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4475$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004476if ${ac_cv_path_ac_pt_CXX+:} false; then :
4477 $as_echo_n "(cached) " >&6
4478else
4479 case $ac_pt_CXX in
4480 [\\/]* | ?:[\\/]*)
4481 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4482 ;;
4483 *)
4484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4485for as_dir in notfound
4486do
4487 IFS=$as_save_IFS
4488 test -z "$as_dir" && as_dir=.
4489 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004490 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004491 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4492 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4493 break 2
4494 fi
4495done
4496 done
4497IFS=$as_save_IFS
4498
4499 ;;
4500esac
4501fi
4502ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4503if test -n "$ac_pt_CXX"; then
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4505$as_echo "$ac_pt_CXX" >&6; }
4506else
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4508$as_echo "no" >&6; }
4509fi
4510
4511 if test "x$ac_pt_CXX" = x; then
4512 CXX="g++"
4513 else
4514 case $cross_compiling:$ac_tool_warned in
4515yes:)
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4518ac_tool_warned=yes ;;
4519esac
4520 CXX=$ac_pt_CXX
4521 fi
4522else
4523 CXX="$ac_cv_path_CXX"
4524fi
4525 ;;
4526 cc) if test -n "$ac_tool_prefix"; then
4527 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4528set dummy ${ac_tool_prefix}c++; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004531if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004532 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004533else
4534 case $CXX in
4535 [\\/]* | ?:[\\/]*)
4536 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4537 ;;
4538 *)
4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in notfound
4541do
4542 IFS=$as_save_IFS
4543 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004546 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004548 break 2
4549 fi
4550done
Matthias Kloseb9621712010-04-24 17:59:49 +00004551 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004552IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004553
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004554 ;;
4555esac
4556fi
4557CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4560$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561else
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004565
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004566
4567fi
4568if test -z "$ac_cv_path_CXX"; then
4569 ac_pt_CXX=$CXX
4570 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004571set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4573$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004574if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004575 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004576else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004577 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004578 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004579 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 +00004580 ;;
4581 *)
4582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4583for as_dir in notfound
4584do
4585 IFS=$as_save_IFS
4586 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004587 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004589 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004591 break 2
4592 fi
4593done
Matthias Kloseb9621712010-04-24 17:59:49 +00004594 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004595IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004597 ;;
4598esac
4599fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004600ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4601if test -n "$ac_pt_CXX"; then
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4603$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004604else
Matthias Kloseb9621712010-04-24 17:59:49 +00004605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4606$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004608
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004609 if test "x$ac_pt_CXX" = x; then
4610 CXX="c++"
4611 else
4612 case $cross_compiling:$ac_tool_warned in
4613yes:)
4614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4616ac_tool_warned=yes ;;
4617esac
4618 CXX=$ac_pt_CXX
4619 fi
4620else
4621 CXX="$ac_cv_path_CXX"
4622fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004624 clang|*/clang) if test -n "$ac_tool_prefix"; then
4625 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4626set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628$as_echo_n "checking for $ac_word... " >&6; }
4629if ${ac_cv_path_CXX+:} false; then :
4630 $as_echo_n "(cached) " >&6
4631else
4632 case $CXX in
4633 [\\/]* | ?:[\\/]*)
4634 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4635 ;;
4636 *)
4637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638for as_dir in notfound
4639do
4640 IFS=$as_save_IFS
4641 test -z "$as_dir" && as_dir=.
4642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004644 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646 break 2
4647 fi
4648done
4649 done
4650IFS=$as_save_IFS
4651
Ned Deilycbfb9a52012-06-23 16:02:19 -07004652 ;;
4653esac
4654fi
4655CXX=$ac_cv_path_CXX
4656if test -n "$CXX"; then
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4658$as_echo "$CXX" >&6; }
4659else
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661$as_echo "no" >&6; }
4662fi
4663
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664
4665fi
4666if test -z "$ac_cv_path_CXX"; then
4667 ac_pt_CXX=$CXX
4668 # Extract the first word of "clang++", so it can be a program name with args.
4669set dummy clang++; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_ac_pt_CXX+:} false; then :
4673 $as_echo_n "(cached) " >&6
4674else
4675 case $ac_pt_CXX in
4676 [\\/]* | ?:[\\/]*)
4677 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4678 ;;
4679 *)
4680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in notfound
4682do
4683 IFS=$as_save_IFS
4684 test -z "$as_dir" && as_dir=.
4685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004687 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689 break 2
4690 fi
4691done
4692 done
4693IFS=$as_save_IFS
4694
4695 ;;
4696esac
4697fi
4698ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4699if test -n "$ac_pt_CXX"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4701$as_echo "$ac_pt_CXX" >&6; }
4702else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707 if test "x$ac_pt_CXX" = x; then
4708 CXX="clang++"
4709 else
4710 case $cross_compiling:$ac_tool_warned in
4711yes:)
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4714ac_tool_warned=yes ;;
4715esac
4716 CXX=$ac_pt_CXX
4717 fi
4718else
4719 CXX="$ac_cv_path_CXX"
4720fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004721 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722 esac
4723 if test "$CXX" = "notfound"
4724 then
4725 CXX=""
4726 fi
4727fi
4728if test -z "$CXX"
4729then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004730 if test -n "$ac_tool_prefix"; then
4731 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4732 do
4733 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4736$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004737if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739else
4740 if test -n "$CXX"; then
4741 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4742else
4743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4744for as_dir in $PATH
4745do
4746 IFS=$as_save_IFS
4747 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752 break 2
4753 fi
4754done
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004756IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004757
4758fi
4759fi
4760CXX=$ac_cv_prog_CXX
4761if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4763$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764else
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767fi
4768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004769
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004770 test -n "$CXX" && break
4771 done
4772fi
4773if test -z "$CXX"; then
4774 ac_ct_CXX=$CXX
4775 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4776do
4777 # Extract the first word of "$ac_prog", so it can be a program name with args.
4778set dummy $ac_prog; ac_word=$2
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
4781if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4782 $as_echo_n "(cached) " >&6
4783else
4784 if test -n "$ac_ct_CXX"; then
4785 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4786else
4787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in $PATH
4789do
4790 IFS=$as_save_IFS
4791 test -z "$as_dir" && as_dir=.
4792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794 ac_cv_prog_ac_ct_CXX="$ac_prog"
4795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796 break 2
4797 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799 done
4800IFS=$as_save_IFS
4801
4802fi
4803fi
4804ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4805if test -n "$ac_ct_CXX"; then
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4807$as_echo "$ac_ct_CXX" >&6; }
4808else
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4810$as_echo "no" >&6; }
4811fi
4812
4813
4814 test -n "$ac_ct_CXX" && break
4815done
4816
4817 if test "x$ac_ct_CXX" = x; then
4818 CXX="notfound"
4819 else
4820 case $cross_compiling:$ac_tool_warned in
4821yes:)
4822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4824ac_tool_warned=yes ;;
4825esac
4826 CXX=$ac_ct_CXX
4827 fi
4828fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829
4830 if test "$CXX" = "notfound"
4831 then
4832 CXX=""
4833 fi
4834fi
4835if test "$preset_cxx" != "$CXX"
4836then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004837 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838
4839 By default, distutils will build C++ extension modules with \"$CXX\".
4840 If this is not intended, then set CXX on the configure command line.
4841 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004842$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843
4844 By default, distutils will build C++ extension modules with \"$CXX\".
4845 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004846 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847fi
4848
4849
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4851$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4852save_LDFLAGS="$LDFLAGS"
4853LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004854
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4856/* end confdefs.h. */
4857
4858int
4859main ()
4860{
4861
4862 ;
4863 return 0;
4864}
4865_ACEOF
4866if ac_fn_c_try_link "$LINENO"; then :
4867 NO_AS_NEEDED="-Wl,--no-as-needed"
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4869$as_echo "yes" >&6; }
4870else
4871 NO_AS_NEEDED=""
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875rm -f core conftest.err conftest.$ac_objext \
4876 conftest$ac_exeext conftest.$ac_ext
4877LDFLAGS="$save_LDFLAGS"
4878
4879
4880
4881# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004882ac_ext=c
4883ac_cpp='$CPP $CPPFLAGS'
4884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4886ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4888$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004889# On Suns, sometimes $CPP names a directory.
4890if test -n "$CPP" && test -d "$CPP"; then
4891 CPP=
4892fi
4893if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004894 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004896else
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 # Double quotes because CPP needs to be expanded
4898 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4899 do
4900 ac_preproc_ok=false
4901for ac_c_preproc_warn_flag in '' yes
4902do
4903 # Use a header file that comes with gcc, so configuring glibc
4904 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004905 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4906 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004907 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004910/* end confdefs.h. */
4911#ifdef __STDC__
4912# include <limits.h>
4913#else
4914# include <assert.h>
4915#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004916 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004918if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004919
Matthias Kloseb9621712010-04-24 17:59:49 +00004920else
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 # Broken: fails on valid input.
4922continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004923fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004924rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004926 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004927 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004930#include <ac_nonexistent.h>
4931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004932if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # Broken: success on invalid input.
4934continue
4935else
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 # Passes both tests.
4937ac_preproc_ok=:
4938break
4939fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004940rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004941
4942done
4943# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004944rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004945if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 break
4947fi
4948
4949 done
4950 ac_cv_prog_CPP=$CPP
4951
4952fi
4953 CPP=$ac_cv_prog_CPP
4954else
4955 ac_cv_prog_CPP=$CPP
4956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4958$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004959ac_preproc_ok=false
4960for ac_c_preproc_warn_flag in '' yes
4961do
4962 # Use a header file that comes with gcc, so configuring glibc
4963 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004964 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4965 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004966 # On the NeXT, cc -E runs the code through the compiler's parser,
4967 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004969/* end confdefs.h. */
4970#ifdef __STDC__
4971# include <limits.h>
4972#else
4973# include <assert.h>
4974#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004975 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004977if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979else
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 # Broken: fails on valid input.
4981continue
4982fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004983rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004986 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004989#include <ac_nonexistent.h>
4990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004991if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 # Broken: success on invalid input.
4993continue
4994else
Martin v. Löwis11437992002-04-12 09:54:03 +00004995 # Passes both tests.
4996ac_preproc_ok=:
4997break
4998fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004999rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005000
5001done
5002# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005003rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005004if $ac_preproc_ok; then :
5005
Martin v. Löwis11437992002-04-12 09:54:03 +00005006else
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005009as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005010See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005011fi
5012
5013ac_ext=c
5014ac_cpp='$CPP $CPPFLAGS'
5015ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5016ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5017ac_compiler_gnu=$ac_cv_c_compiler_gnu
5018
5019
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5021$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005022if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005024else
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 # Loop through the user's path and test for each of PROGNAME-LIST
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_prog in grep ggrep; do
5034 for ac_exec_ext in '' $ac_executable_extensions; do
5035 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005036 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005037# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038 # Check for GNU $ac_path_GREP
5039case `"$ac_path_GREP" --version 2>&1` in
5040*GNU*)
5041 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5042*)
5043 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005045 while :
5046 do
5047 cat "conftest.in" "conftest.in" >"conftest.tmp"
5048 mv "conftest.tmp" "conftest.in"
5049 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5052 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5055 # Best one so far, save it but keep looking for a better one
5056 ac_cv_path_GREP="$ac_path_GREP"
5057 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005058 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 # 10*(2^10) chars as input seems more than enough
5060 test $ac_count -gt 10 && break
5061 done
5062 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5063esac
5064
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 $ac_path_GREP_found && break 3
5066 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005071 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073else
5074 ac_cv_path_GREP=$GREP
5075fi
5076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5079$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080 GREP="$ac_cv_path_GREP"
5081
5082
Matthias Kloseb9621712010-04-24 17:59:49 +00005083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5084$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005085if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087else
5088 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5089 then ac_cv_path_EGREP="$GREP -E"
5090 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 # Loop through the user's path and test for each of PROGNAME-LIST
5094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5096do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 for ac_prog in egrep; do
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005102 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005103# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104 # Check for GNU $ac_path_EGREP
5105case `"$ac_path_EGREP" --version 2>&1` in
5106*GNU*)
5107 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5108*)
5109 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005111 while :
5112 do
5113 cat "conftest.in" "conftest.in" >"conftest.tmp"
5114 mv "conftest.tmp" "conftest.in"
5115 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5118 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5121 # Best one so far, save it but keep looking for a better one
5122 ac_cv_path_EGREP="$ac_path_EGREP"
5123 ac_path_EGREP_max=$ac_count
5124 fi
5125 # 10*(2^10) chars as input seems more than enough
5126 test $ac_count -gt 10 && break
5127 done
5128 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5129esac
5130
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 $ac_path_EGREP_found && break 3
5132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005134 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005135IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005137 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 +00005138 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005139else
5140 ac_cv_path_EGREP=$EGREP
5141fi
5142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143 fi
5144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5146$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005148
5149
Matthias Kloseb9621712010-04-24 17:59:49 +00005150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5151$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005152if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005153 $as_echo_n "(cached) " >&6
5154else
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005156/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005157#include <stdlib.h>
5158#include <stdarg.h>
5159#include <string.h>
5160#include <float.h>
5161
5162int
5163main ()
5164{
5165
5166 ;
5167 return 0;
5168}
5169_ACEOF
5170if ac_fn_c_try_compile "$LINENO"; then :
5171 ac_cv_header_stdc=yes
5172else
5173 ac_cv_header_stdc=no
5174fi
5175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5176
5177if test $ac_cv_header_stdc = yes; then
5178 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5180/* end confdefs.h. */
5181#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005182
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005183_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005187else
Matthias Kloseb9621712010-04-24 17:59:49 +00005188 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005189fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005190rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191
Matthias Kloseb9621712010-04-24 17:59:49 +00005192fi
5193
5194if test $ac_cv_header_stdc = yes; then
5195 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197/* end confdefs.h. */
5198#include <stdlib.h>
5199
5200_ACEOF
5201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5202 $EGREP "free" >/dev/null 2>&1; then :
5203
5204else
5205 ac_cv_header_stdc=no
5206fi
5207rm -f conftest*
5208
5209fi
5210
5211if test $ac_cv_header_stdc = yes; then
5212 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5213 if test "$cross_compiling" = yes; then :
5214 :
5215else
5216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5217/* end confdefs.h. */
5218#include <ctype.h>
5219#include <stdlib.h>
5220#if ((' ' & 0x0FF) == 0x020)
5221# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5222# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5223#else
5224# define ISLOWER(c) \
5225 (('a' <= (c) && (c) <= 'i') \
5226 || ('j' <= (c) && (c) <= 'r') \
5227 || ('s' <= (c) && (c) <= 'z'))
5228# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5229#endif
5230
5231#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5232int
5233main ()
5234{
5235 int i;
5236 for (i = 0; i < 256; i++)
5237 if (XOR (islower (i), ISLOWER (i))
5238 || toupper (i) != TOUPPER (i))
5239 return 2;
5240 return 0;
5241}
5242_ACEOF
5243if ac_fn_c_try_run "$LINENO"; then :
5244
5245else
5246 ac_cv_header_stdc=no
5247fi
5248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5249 conftest.$ac_objext conftest.beam conftest.$ac_ext
5250fi
5251
5252fi
5253fi
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5255$as_echo "$ac_cv_header_stdc" >&6; }
5256if test $ac_cv_header_stdc = yes; then
5257
5258$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5259
5260fi
5261
5262# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5263for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5264 inttypes.h stdint.h unistd.h
5265do :
5266 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5267ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5268"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005269if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005270 cat >>confdefs.h <<_ACEOF
5271#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5272_ACEOF
5273
5274fi
5275
5276done
5277
5278
5279
5280 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 +02005281if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005282 MINIX=yes
5283else
5284 MINIX=
5285fi
5286
5287
5288 if test "$MINIX" = yes; then
5289
5290$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5291
5292
5293$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5294
5295
5296$as_echo "#define _MINIX 1" >>confdefs.h
5297
5298 fi
5299
5300
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5302$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005303if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005304 $as_echo_n "(cached) " >&6
5305else
5306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5307/* end confdefs.h. */
5308
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005309# define __EXTENSIONS__ 1
5310 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005311int
5312main ()
5313{
5314
5315 ;
5316 return 0;
5317}
5318_ACEOF
5319if ac_fn_c_try_compile "$LINENO"; then :
5320 ac_cv_safe_to_define___extensions__=yes
5321else
5322 ac_cv_safe_to_define___extensions__=no
5323fi
5324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5325fi
5326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5327$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5328 test $ac_cv_safe_to_define___extensions__ = yes &&
5329 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5330
5331 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5332
5333 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5334
5335 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5336
5337 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5338
5339
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341# Check for unsupported systems
5342case $ac_sys_system/$ac_sys_release in
5343atheos*|Linux*/1*)
5344 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5345 echo See README for details.
5346 exit 1;;
5347esac
5348
5349
Matthias Kloseb9621712010-04-24 17:59:49 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5351$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
5353# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005354if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355 withval=$with_suffix;
5356 case $withval in
5357 no) EXEEXT=;;
5358 yes) EXEEXT=.exe;;
5359 *) EXEEXT=$withval;;
5360 esac
5361fi
5362
Matthias Kloseb9621712010-04-24 17:59:49 +00005363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5364$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365
5366# Test whether we're running on a non-case-sensitive system, in which
5367# case we give a warning if no ext is given
5368
Matthias Kloseb9621712010-04-24 17:59:49 +00005369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5370$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371if test ! -d CaseSensitiveTestDir; then
5372mkdir CaseSensitiveTestDir
5373fi
5374
5375if test -d casesensitivetestdir
5376then
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5378$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379 BUILDEXEEXT=.exe
5380else
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 BUILDEXEEXT=$EXEEXT
5384fi
5385rmdir CaseSensitiveTestDir
5386
5387case $MACHDEP in
5388bsdos*)
5389 case $CC in
5390 gcc) CC="$CC -D_HAVE_BSDI";;
5391 esac;;
5392esac
5393
5394case $ac_sys_system in
5395hp*|HP*)
5396 case $CC in
5397 cc|*/cc) CC="$CC -Ae";;
5398 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399esac
5400
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005401MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5402
5403
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405
Matthias Kloseb9621712010-04-24 17:59:49 +00005406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5407$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408if test -z "$LIBRARY"
5409then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005410 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5413$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414
5415# LDLIBRARY is the name of the library to link against (as opposed to the
5416# name of the library into which to insert object files). BLDLIBRARY is also
5417# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5418# is blank as the main program is not linked directly against LDLIBRARY.
5419# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5420# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5421# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5422# DLLLIBRARY is the shared (i.e., DLL) library.
5423#
5424# RUNSHARED is used to run shared python without installed libraries
5425#
5426# INSTSONAME is the name of the shared library that will be use to install
5427# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005428#
5429# LDVERSION is the shared library version number, normally the Python version
5430# with the ABI build flags appended.
5431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432
5433
5434
5435
5436
5437
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439LDLIBRARY="$LIBRARY"
5440BLDLIBRARY='$(LDLIBRARY)'
5441INSTSONAME='$(LDLIBRARY)'
5442DLLLIBRARY=''
5443LDLIBRARYDIR=''
5444RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005445LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
5447# LINKCC is the command that links the python executable -- default is $(CC).
5448# If CXX is set, and if it is needed to link a main function that was
5449# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5450# python might then depend on the C++ runtime
5451# This is altered for AIX in order to build the export list before
5452# linking.
5453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5455$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456if test -z "$LINKCC"
5457then
5458 LINKCC='$(PURIFY) $(MAINCC)'
5459 case $ac_sys_system in
5460 AIX*)
5461 exp_extra="\"\""
5462 if test $ac_sys_release -ge 5 -o \
5463 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5464 exp_extra="."
5465 fi
5466 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467 QNX*)
5468 # qcc must be used because the other compilers do not
5469 # support -N.
5470 LINKCC=qcc;;
5471 esac
5472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5474$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
5476# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5477# make sure we default having it set to "no": this is used by
5478# distutils.unixccompiler to know if it should add --enable-new-dtags
5479# to linker command lines, and failing to detect GNU ld simply results
5480# in the same bahaviour as before.
5481
Matthias Kloseb9621712010-04-24 17:59:49 +00005482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5483$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484ac_prog=ld
5485if test "$GCC" = yes; then
5486 ac_prog=`$CC -print-prog-name=ld`
5487fi
5488case `"$ac_prog" -V 2>&1 < /dev/null` in
5489 *GNU*)
5490 GNULD=yes;;
5491 *)
5492 GNULD=no;;
5493esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5495$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5498$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005499if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005500 $as_echo_n "(cached) " >&6
5501else
5502 ac_cv_c_inline=no
5503for ac_kw in inline __inline__ __inline; do
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505/* end confdefs.h. */
5506#ifndef __cplusplus
5507typedef int foo_t;
5508static $ac_kw foo_t static_foo () {return 0; }
5509$ac_kw foo_t foo () {return 0; }
5510#endif
5511
5512_ACEOF
5513if ac_fn_c_try_compile "$LINENO"; then :
5514 ac_cv_c_inline=$ac_kw
5515fi
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5517 test "$ac_cv_c_inline" != no && break
5518done
5519
5520fi
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5522$as_echo "$ac_cv_c_inline" >&6; }
5523
5524case $ac_cv_c_inline in
5525 inline | yes) ;;
5526 *)
5527 case $ac_cv_c_inline in
5528 no) ac_val=;;
5529 *) ac_val=$ac_cv_c_inline;;
5530 esac
5531 cat >>confdefs.h <<_ACEOF
5532#ifndef __cplusplus
5533#define inline $ac_val
5534#endif
5535_ACEOF
5536 ;;
5537esac
5538
5539if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005540
5541$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005542
5543
5544fi
5545
5546
Matthias Kloseb9621712010-04-24 17:59:49 +00005547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5548$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005550if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551 enableval=$enable_shared;
5552fi
5553
5554
5555if test -z "$enable_shared"
5556then
5557 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005558 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 enable_shared="yes";;
5560 *)
5561 enable_shared="no";;
5562 esac
5563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5565$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566
Matthias Kloseb9621712010-04-24 17:59:49 +00005567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5568$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005570if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005571 enableval=$enable_profiling;
5572fi
5573
5574if test "x$enable_profiling" = xyes; then
5575 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005576 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578/* end confdefs.h. */
5579int main() { return 0; }
5580_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005581if ac_fn_c_try_link "$LINENO"; then :
5582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005584 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005586rm -f core conftest.err conftest.$ac_objext \
5587 conftest$ac_exeext conftest.$ac_ext
5588 CC="$ac_save_cc"
5589else
5590 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5593$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594
doko@ubuntu.comba015832012-06-30 16:52:05 +02005595if test "x$enable_profiling" = xyes; then
5596 BASECFLAGS="-pg $BASECFLAGS"
5597 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598fi
5599
Matthias Kloseb9621712010-04-24 17:59:49 +00005600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5601$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
5603# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5604# library that we build, but we do not want to link against it (we
5605# will find it with a -framework option). For this reason there is an
5606# extra variable BLDLIBRARY against which Python and the extension
5607# modules are linked, BLDLIBRARY. This is normally the same as
5608# LDLIBRARY, but empty for MacOSX framework builds.
5609if test "$enable_framework"
5610then
5611 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005612 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 BLDLIBRARY=''
5614else
5615 BLDLIBRARY='$(LDLIBRARY)'
5616fi
5617
5618# Other platforms follow
5619if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005620 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621
Matthias Kloseb9621712010-04-24 17:59:49 +00005622$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
5624 case $ac_sys_system in
5625 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005626 LDLIBRARY='libpython$(LDVERSION).dll.a'
5627 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628 ;;
5629 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).so'
5631 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005632 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005634 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005635 then
5636 PY3LIBRARY=libpython3.so
5637 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005639 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).so'
5641 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005642 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 case $ac_sys_system in
5644 FreeBSD*)
5645 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5646 ;;
5647 esac
5648 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005649 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005650 then
5651 PY3LIBRARY=libpython3.so
5652 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 ;;
5654 hp*|HP*)
5655 case `uname -m` in
5656 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005657 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ;;
5659 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005660 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 ;;
5662 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005663 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005664 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005667 LDLIBRARY='libpython$(LDVERSION).dylib'
5668 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005669 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005671 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005672 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005673 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005674 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676 esac
5677else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005678 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 case $ac_sys_system in
5680 CYGWIN*)
5681 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005682 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 ;;
5684 esac
5685fi
5686
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005687if test "$cross_compiling" = yes; then
5688 RUNSHARED=
5689fi
5690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5692$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694if test -n "$ac_tool_prefix"; then
5695 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5696set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005699if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701else
5702 if test -n "$RANLIB"; then
5703 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5704else
5705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5706for as_dir in $PATH
5707do
5708 IFS=$as_save_IFS
5709 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714 break 2
5715 fi
5716done
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718IFS=$as_save_IFS
5719
5720fi
5721fi
5722RANLIB=$ac_cv_prog_RANLIB
5723if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5725$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
5730
5731
5732fi
5733if test -z "$ac_cv_prog_RANLIB"; then
5734 ac_ct_RANLIB=$RANLIB
5735 # Extract the first word of "ranlib", so it can be a program name with args.
5736set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005739if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741else
5742 if test -n "$ac_ct_RANLIB"; then
5743 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5744else
5745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748 IFS=$as_save_IFS
5749 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 break 2
5755 fi
5756done
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758IFS=$as_save_IFS
5759
5760fi
5761fi
5762ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5763if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5765$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766else
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769fi
5770
5771 if test "x$ac_ct_RANLIB" = x; then
5772 RANLIB=":"
5773 else
5774 case $cross_compiling:$ac_tool_warned in
5775yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778ac_tool_warned=yes ;;
5779esac
5780 RANLIB=$ac_ct_RANLIB
5781 fi
5782else
5783 RANLIB="$ac_cv_prog_RANLIB"
5784fi
5785
5786
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005787if test -n "$ac_tool_prefix"; then
5788 for ac_prog in ar aal
5789 do
5790 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005794if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005795 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796else
5797 if test -n "$AR"; then
5798 ac_cv_prog_AR="$AR" # Let the user override the test.
5799else
5800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801for as_dir in $PATH
5802do
5803 IFS=$as_save_IFS
5804 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005807 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 break 2
5810 fi
5811done
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813IFS=$as_save_IFS
5814
5815fi
5816fi
5817AR=$ac_cv_prog_AR
5818if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5820$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821else
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824fi
5825
5826
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005827 test -n "$AR" && break
5828 done
5829fi
5830if test -z "$AR"; then
5831 ac_ct_AR=$AR
5832 for ac_prog in ar aal
5833do
5834 # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_prog_ac_ct_AR+:} false; then :
5839 $as_echo_n "(cached) " >&6
5840else
5841 if test -n "$ac_ct_AR"; then
5842 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5843else
5844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847 IFS=$as_save_IFS
5848 test -z "$as_dir" && as_dir=.
5849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005851 ac_cv_prog_ac_ct_AR="$ac_prog"
5852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853 break 2
5854 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005856 done
5857IFS=$as_save_IFS
5858
5859fi
5860fi
5861ac_ct_AR=$ac_cv_prog_ac_ct_AR
5862if test -n "$ac_ct_AR"; then
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5864$as_echo "$ac_ct_AR" >&6; }
5865else
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
5868fi
5869
5870
5871 test -n "$ac_ct_AR" && break
5872done
5873
5874 if test "x$ac_ct_AR" = x; then
5875 AR="ar"
5876 else
5877 case $cross_compiling:$ac_tool_warned in
5878yes:)
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5881ac_tool_warned=yes ;;
5882esac
5883 AR=$ac_ct_AR
5884 fi
5885fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887
5888# tweak ARFLAGS only if the user didn't set it on the command line
5889
5890if test -z "$ARFLAGS"
5891then
5892 ARFLAGS="rc"
5893fi
5894
doko@ubuntu.com58844492012-06-30 18:25:32 +02005895if test -n "$ac_tool_prefix"; then
5896 for ac_prog in readelf
5897 do
5898 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5899set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5901$as_echo_n "checking for $ac_word... " >&6; }
5902if ${ac_cv_prog_READELF+:} false; then :
5903 $as_echo_n "(cached) " >&6
5904else
5905 if test -n "$READELF"; then
5906 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5907else
5908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911 IFS=$as_save_IFS
5912 test -z "$as_dir" && as_dir=.
5913 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005915 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917 break 2
5918 fi
5919done
5920 done
5921IFS=$as_save_IFS
5922
5923fi
5924fi
5925READELF=$ac_cv_prog_READELF
5926if test -n "$READELF"; then
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5928$as_echo "$READELF" >&6; }
5929else
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935 test -n "$READELF" && break
5936 done
5937fi
5938if test -z "$READELF"; then
5939 ac_ct_READELF=$READELF
5940 for ac_prog in readelf
5941do
5942 # Extract the first word of "$ac_prog", so it can be a program name with args.
5943set dummy $ac_prog; ac_word=$2
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
5946if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5947 $as_echo_n "(cached) " >&6
5948else
5949 if test -n "$ac_ct_READELF"; then
5950 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5951else
5952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955 IFS=$as_save_IFS
5956 test -z "$as_dir" && as_dir=.
5957 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005959 ac_cv_prog_ac_ct_READELF="$ac_prog"
5960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5961 break 2
5962 fi
5963done
5964 done
5965IFS=$as_save_IFS
5966
5967fi
5968fi
5969ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5970if test -n "$ac_ct_READELF"; then
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5972$as_echo "$ac_ct_READELF" >&6; }
5973else
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975$as_echo "no" >&6; }
5976fi
5977
5978
5979 test -n "$ac_ct_READELF" && break
5980done
5981
5982 if test "x$ac_ct_READELF" = x; then
5983 READELF=":"
5984 else
5985 case $cross_compiling:$ac_tool_warned in
5986yes:)
5987{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5988$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5989ac_tool_warned=yes ;;
5990esac
5991 READELF=$ac_ct_READELF
5992 fi
5993fi
5994
5995if test "$cross_compiling" = yes; then
5996 case "$READELF" in
5997 readelf|:)
5998 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5999 ;;
6000 esac
6001fi
6002
6003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004
Matthias Klosec4c48422012-10-21 23:05:35 +02006005for ac_prog in python$PACKAGE_VERSION python3 python
6006do
6007 # Extract the first word of "$ac_prog", so it can be a program name with args.
6008set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6010$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006011if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006012 $as_echo_n "(cached) " >&6
6013else
Matthias Klosec4c48422012-10-21 23:05:35 +02006014 if test -n "$PYTHON"; then
6015 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006016else
6017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6018for as_dir in $PATH
6019do
6020 IFS=$as_save_IFS
6021 test -z "$as_dir" && as_dir=.
6022 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006024 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6026 break 2
6027 fi
6028done
6029 done
6030IFS=$as_save_IFS
6031
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006032fi
6033fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006034PYTHON=$ac_cv_prog_PYTHON
6035if test -n "$PYTHON"; then
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6037$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006038else
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
6041fi
6042
6043
Matthias Klosec4c48422012-10-21 23:05:35 +02006044 test -n "$PYTHON" && break
6045done
6046test -n "$PYTHON" || PYTHON="not-found"
6047
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006048if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006049 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6050else
6051 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006052fi
6053
6054
Kushal Das02d23a22014-04-15 23:50:06 +05306055for ac_prog in python$PACKAGE_VERSION python3 python
6056do
6057 # Extract the first word of "$ac_prog", so it can be a program name with args.
6058set dummy $ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_prog_PYTHON+:} false; then :
6062 $as_echo_n "(cached) " >&6
6063else
6064 if test -n "$PYTHON"; then
6065 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6066else
6067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070 IFS=$as_save_IFS
6071 test -z "$as_dir" && as_dir=.
6072 for ac_exec_ext in '' $ac_executable_extensions; do
6073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6074 ac_cv_prog_PYTHON="$ac_prog"
6075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6076 break 2
6077 fi
6078done
6079 done
6080IFS=$as_save_IFS
6081
6082fi
6083fi
6084PYTHON=$ac_cv_prog_PYTHON
6085if test -n "$PYTHON"; then
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6087$as_echo "$PYTHON" >&6; }
6088else
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094 test -n "$PYTHON" && break
6095done
6096test -n "$PYTHON" || PYTHON="not-found"
6097
6098if test "$PYTHON" = not-found; then
6099 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6100else
6101 OPCODEHGEN="$PYTHON"
6102fi
6103
6104
6105
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106case $MACHDEP in
6107bsdos*|hp*|HP*)
6108 # install -d does not work on BSDI or HP-UX
6109 if test -z "$INSTALL"
6110 then
6111 INSTALL="${srcdir}/install-sh -c"
6112 fi
6113esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114# Find a good install program. We prefer a C program (faster),
6115# so one script is as good as another. But avoid the broken or
6116# incompatible versions:
6117# SysV /etc/install, /usr/sbin/install
6118# SunOS /usr/etc/install
6119# IRIX /sbin/install
6120# AIX /bin/install
6121# AmigaOS /C/install, which installs bootblocks on floppy discs
6122# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6123# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6124# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6125# OS/2's system install, which has a completely different semantic
6126# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006127# Reject install programs that cannot install multiple files.
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6129$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006131if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006132 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133else
6134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135for as_dir in $PATH
6136do
6137 IFS=$as_save_IFS
6138 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006139 # Account for people who put trailing slashes in PATH elements.
6140case $as_dir/ in #((
6141 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144 /usr/ucb/* ) ;;
6145 *)
6146 # OSF1 and SCO ODT 3.0 have their own names for install.
6147 # Don't use installbsd from OSF since it installs stuff as root
6148 # by default.
6149 for ac_prog in ginstall scoinst install; do
6150 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006151 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152 if test $ac_prog = install &&
6153 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6154 # AIX install. It has an incompatible calling convention.
6155 :
6156 elif test $ac_prog = install &&
6157 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6158 # program-specific install script used by HP pwplus--don't use.
6159 :
6160 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006161 rm -rf conftest.one conftest.two conftest.dir
6162 echo one > conftest.one
6163 echo two > conftest.two
6164 mkdir conftest.dir
6165 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6166 test -s conftest.one && test -s conftest.two &&
6167 test -s conftest.dir/conftest.one &&
6168 test -s conftest.dir/conftest.two
6169 then
6170 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6171 break 3
6172 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173 fi
6174 fi
6175 done
6176 done
6177 ;;
6178esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006179
6180 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181IFS=$as_save_IFS
6182
Matthias Kloseb9621712010-04-24 17:59:49 +00006183rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184
6185fi
6186 if test "${ac_cv_path_install+set}" = set; then
6187 INSTALL=$ac_cv_path_install
6188 else
6189 # As a last resort, use the slow shell script. Don't cache a
6190 # value for INSTALL within a source directory, because that will
6191 # break other packages using the cache if that directory is
6192 # removed, or if the value is a relative name.
6193 INSTALL=$ac_install_sh
6194 fi
6195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6197$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198
6199# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6200# It thinks the first close brace ends the variable substitution.
6201test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6202
6203test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6204
6205test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6206
Matthias Klose93a0ef12012-03-15 18:08:34 +01006207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6208$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6209if test -z "$MKDIR_P"; then
6210 if ${ac_cv_path_mkdir+:} false; then :
6211 $as_echo_n "(cached) " >&6
6212else
6213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6215do
6216 IFS=$as_save_IFS
6217 test -z "$as_dir" && as_dir=.
6218 for ac_prog in mkdir gmkdir; do
6219 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006220 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006221 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6222 'mkdir (GNU coreutils) '* | \
6223 'mkdir (coreutils) '* | \
6224 'mkdir (fileutils) '4.1*)
6225 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6226 break 3;;
6227 esac
6228 done
6229 done
6230 done
6231IFS=$as_save_IFS
6232
6233fi
6234
6235 test -d ./--version && rmdir ./--version
6236 if test "${ac_cv_path_mkdir+set}" = set; then
6237 MKDIR_P="$ac_cv_path_mkdir -p"
6238 else
6239 # As a last resort, use the slow shell script. Don't cache a
6240 # value for MKDIR_P within a source directory, because that will
6241 # break other packages using the cache if that directory is
6242 # removed, or if the value is a relative name.
6243 MKDIR_P="$ac_install_sh -d"
6244 fi
6245fi
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6247$as_echo "$MKDIR_P" >&6; }
6248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249
6250# Not every filesystem supports hard links
6251
6252if test -z "$LN" ; then
6253 case $ac_sys_system in
6254 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006255 *) LN=ln;;
6256 esac
6257fi
6258
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006259# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006260
6261ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006262
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6265$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266
6267# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006268if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269 withval=$with_pydebug;
6270if test "$withval" != no
6271then
6272
Matthias Kloseb9621712010-04-24 17:59:49 +00006273$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6276$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006278 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006279else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281fi
6282else
Matthias Kloseb9621712010-04-24 17:59:49 +00006283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6284$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285fi
6286
6287
6288# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6289# merged with this chunk of code?
6290
6291# Optimizer/debugger flags
6292# ------------------------
6293# (The following bit of code is complicated enough - please keep things
6294# indented properly. Just pretend you're editing Python code. ;-)
6295
6296# There are two parallel sets of case statements below, one that checks to
6297# see if OPT was set and one that does BASECFLAGS setting based upon
6298# compiler and platform. BASECFLAGS tweaks need to be made even if the
6299# user set OPT.
6300
6301# tweak OPT based on compiler and platform, only if the user didn't set
6302# it on the command line
6303
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006304if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305then
6306 case $GCC in
6307 yes)
6308 if test "$CC" != 'g++' ; then
6309 STRICT_PROTO="-Wstrict-prototypes"
6310 fi
6311 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6312 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6313 WRAP="-fwrapv"
6314 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006315
6316 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006317 case $CC in
6318 *clang*) WRAP="-fwrapv"
6319 ;;
6320 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006321
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 case $ac_cv_prog_cc_g in
6323 yes)
6324 if test "$Py_DEBUG" = 'true' ; then
6325 # Optimization messes up debuggers, so turn it off for
6326 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006327 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 else
6329 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6330 fi
6331 ;;
6332 *)
6333 OPT="-O3 -Wall $STRICT_PROTO"
6334 ;;
6335 esac
6336 case $ac_sys_system in
6337 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6338 ;;
6339 esac
6340 ;;
6341
6342 *)
6343 OPT="-O"
6344 ;;
6345 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346fi
6347
6348
6349
6350# The -arch flags for universal builds on OSX
6351UNIVERSAL_ARCH_FLAGS=
6352
6353
6354# tweak BASECFLAGS based on compiler and platform
6355case $GCC in
6356yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006357 # Python doesn't violate C99 aliasing rules, but older versions of
6358 # GCC produce warnings for legal Python code. Enable
6359 # -fno-strict-aliasing on versions of GCC that support but produce
6360 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6362$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363 ac_save_cc="$CC"
6364 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006365 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006366 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006367 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006368else
Matthias Kloseb9621712010-04-24 17:59:49 +00006369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006371
Matthias Kloseb159a552010-04-25 21:00:44 +00006372
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006373int
6374main ()
6375{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006376
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006377 ;
6378 return 0;
6379}
Matthias Kloseb159a552010-04-25 21:00:44 +00006380
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006382if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006383
6384 CC="$ac_save_cc -fstrict-aliasing"
6385 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006387/* end confdefs.h. */
6388
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006389 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006390int
6391main ()
6392{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006393double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006394 ;
6395 return 0;
6396}
Matthias Kloseb159a552010-04-25 21:00:44 +00006397
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006399if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006400
6401 ac_cv_no_strict_aliasing=no
6402
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006403else
Matthias Kloseb159a552010-04-25 21:00:44 +00006404
6405 ac_cv_no_strict_aliasing=yes
6406
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006407fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006409
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006410else
Matthias Kloseb159a552010-04-25 21:00:44 +00006411
6412 ac_cv_no_strict_aliasing=no
6413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006414fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006416fi
6417
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006418 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6421$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006422 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423 then
6424 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6425 fi
6426
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6428$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6429 ac_save_cc="$CC"
6430 CC="$CC -Wunused-result -Werror"
6431 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006432 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006433 $as_echo_n "(cached) " >&6
6434else
6435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6436/* end confdefs.h. */
6437
6438
6439int
6440main ()
6441{
6442
6443 ;
6444 return 0;
6445}
6446
6447_ACEOF
6448if ac_fn_c_try_compile "$LINENO"; then :
6449
6450 ac_cv_disable_unused_result_warning=yes
6451
6452else
6453
6454 ac_cv_disable_unused_result_warning=no
6455
6456fi
6457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6458fi
6459
6460 CFLAGS="$save_CFLAGS"
6461 CC="$ac_save_cc"
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6463$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6464
6465 if test $ac_cv_disable_unused_result_warning = yes
6466 then
6467 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6468 fi
6469
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6471$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6472 ac_save_cc="$CC"
6473 CC="$CC -Werror=declaration-after-statement"
6474 save_CFLAGS="$CFLAGS"
6475 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6476 $as_echo_n "(cached) " >&6
6477else
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479/* end confdefs.h. */
6480
6481
6482int
6483main ()
6484{
6485
6486 ;
6487 return 0;
6488}
6489
6490_ACEOF
6491if ac_fn_c_try_compile "$LINENO"; then :
6492
6493 ac_cv_declaration_after_statement_warning=yes
6494
6495else
6496
6497 ac_cv_declaration_after_statement_warning=no
6498
6499fi
6500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501fi
6502
6503 CFLAGS="$save_CFLAGS"
6504 CC="$ac_save_cc"
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6506$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6507
6508 if test $ac_cv_declaration_after_statement_warning = yes
6509 then
6510 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6511 fi
6512
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6514$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6515 ac_save_cc="$CC"
6516 CC="$CC -Wsign-compare"
6517 save_CFLAGS="$CFLAGS"
6518 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6519 $as_echo_n "(cached) " >&6
6520else
6521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6522/* end confdefs.h. */
6523
6524
6525int
6526main ()
6527{
6528
6529 ;
6530 return 0;
6531}
6532
6533_ACEOF
6534if ac_fn_c_try_compile "$LINENO"; then :
6535
6536 ac_cv_enable_sign_compare_warning=yes
6537
6538else
6539
6540 ac_cv_enable_sign_compare_warning=no
6541
6542fi
6543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6544fi
6545
6546 CFLAGS="$save_CFLAGS"
6547 CC="$ac_save_cc"
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6549$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6550
6551 if test $ac_cv_enable_sign_compare_warning = yes
6552 then
6553 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6554 fi
6555
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6557$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6558 ac_save_cc="$CC"
6559 CC="$CC -Wunreachable-code"
6560 save_CFLAGS="$CFLAGS"
6561 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6562 $as_echo_n "(cached) " >&6
6563else
6564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6565/* end confdefs.h. */
6566
6567
6568int
6569main ()
6570{
6571
6572 ;
6573 return 0;
6574}
6575
6576_ACEOF
6577if ac_fn_c_try_compile "$LINENO"; then :
6578
6579 ac_cv_enable_unreachable_code_warning=yes
6580
6581else
6582
6583 ac_cv_enable_unreachable_code_warning=no
6584
6585fi
6586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6587fi
6588
6589 CFLAGS="$save_CFLAGS"
6590 CC="$ac_save_cc"
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6592$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6593
6594 # Don't enable unreachable code warning in debug mode, since it usually
6595 # results in non-standard code paths.
6596 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6597 then
6598 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6599 fi
6600
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6602 # support. Without this, treatment of subnormals doesn't follow
6603 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006604 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605 alpha*)
6606 BASECFLAGS="$BASECFLAGS -mieee"
6607 ;;
6608 esac
6609
6610 case $ac_sys_system in
6611 SCO_SV*)
6612 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6613 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006614
6615 # is there any other compiler on Darwin besides gcc?
6616 Darwin*)
6617 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6618 # used to be here, but non-Apple gcc doesn't accept them.
6619 if test "${CC}" = gcc
6620 then
6621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006622$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006623 case "${UNIVERSALSDK}" in
6624 */MacOSX10.4u.sdk)
6625 # Build using 10.4 SDK, force usage of gcc when the
6626 # compiler is gcc, otherwise the user will get very
6627 # confusing error messages when building on OSX 10.6
6628 CC=gcc-4.0
6629 CPP=cpp-4.0
6630 ;;
6631 esac
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006633$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006634 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006635
Ned Deily87adb6e2013-10-18 21:09:56 -07006636 if test "${enable_universalsdk}"
6637 then
6638 case "$UNIVERSAL_ARCHS" in
6639 32-bit)
6640 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6641 LIPO_32BIT_FLAGS=""
6642 ARCH_RUN_32BIT=""
6643 ;;
6644 64-bit)
6645 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6646 LIPO_32BIT_FLAGS=""
6647 ARCH_RUN_32BIT="true"
6648 ;;
6649 all)
6650 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6651 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6652 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6653 ;;
6654 intel)
6655 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6656 LIPO_32BIT_FLAGS="-extract i386"
6657 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6658 ;;
6659 intel-32)
6660 UNIVERSAL_ARCH_FLAGS="-arch i386"
6661 LIPO_32BIT_FLAGS=""
6662 ARCH_RUN_32BIT=""
6663 ;;
6664 3-way)
6665 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6666 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6667 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6668 ;;
6669 *)
6670 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6671 ;;
6672 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006673
Ned Deily87adb6e2013-10-18 21:09:56 -07006674 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6675 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6676 if test "${UNIVERSALSDK}" != "/"
6677 then
6678 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6679 fi
6680 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681
Ned Deily87adb6e2013-10-18 21:09:56 -07006682 # Calculate an appropriate deployment target for this build:
6683 # The deployment target value is used explicitly to enable certain
6684 # features are enabled (such as builtin libedit support for readline)
6685 # through the use of Apple's Availabiliy Macros and is used as a
6686 # component of the string returned by distutils.get_platform().
6687 #
6688 # Use the value from:
6689 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6690 # 2. the operating system version of the build machine if >= 10.6
6691 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6692 # below to pick either 10.3, 10.4, or 10.5 as the target.
6693 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694
Ned Deily87adb6e2013-10-18 21:09:56 -07006695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6696$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006697 cur_target_major=`sw_vers -productVersion | \
6698 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6699 cur_target_minor=`sw_vers -productVersion | \
6700 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6701 cur_target="${cur_target_major}.${cur_target_minor}"
6702 if test ${cur_target_major} -eq 10 && \
6703 test ${cur_target_minor} -ge 3 && \
6704 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006705 then
Ned Deily36820b62014-06-25 13:44:22 -07006706 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006707 cur_target=10.3
6708 if test ${enable_universalsdk}
6709 then
6710 case "$UNIVERSAL_ARCHS" in
6711 all|3-way|intel|64-bit)
6712 # These configurations were first supported in 10.5
6713 cur_target='10.5'
6714 ;;
6715 esac
6716 else
6717 if test `/usr/bin/arch` = "i386"
6718 then
6719 # 10.4 was the first release to support Intel archs
6720 cur_target="10.4"
6721 fi
6722 fi
6723 fi
6724 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006725
Ned Deily87adb6e2013-10-18 21:09:56 -07006726 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6727 # environment with a value that is the same as what we'll use
6728 # in the Makefile to ensure that we'll get the same compiler
6729 # environment during configure and build time.
6730 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6731 export MACOSX_DEPLOYMENT_TARGET
6732 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6734$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006735
Ned Deily87adb6e2013-10-18 21:09:56 -07006736 # end of Darwin* tests
6737 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 esac
6739 ;;
6740
6741*)
6742 case $ac_sys_system in
6743 OpenUNIX*|UnixWare*)
6744 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6745 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746 SCO_SV*)
6747 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6748 ;;
6749 esac
6750 ;;
6751esac
6752
6753if test "$Py_DEBUG" = 'true'; then
6754 :
6755else
6756 OPT="-DNDEBUG $OPT"
6757fi
6758
6759if test "$ac_arch_flags"
6760then
6761 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6762fi
6763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764# On some compilers, pthreads are available without further options
6765# (e.g. MacOS X). On some of these systems, the compiler will not
6766# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6767# So we have to see first whether pthreads are available without
6768# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6770$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006771if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006772 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773else
Matthias Kloseb9621712010-04-24 17:59:49 +00006774 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006775 ac_cv_pthread_is_default=no
6776else
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778/* end confdefs.h. */
6779
Stefan Krah7dba5942012-11-22 22:49:11 +01006780#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781#include <pthread.h>
6782
6783void* routine(void* p){return NULL;}
6784
6785int main(){
6786 pthread_t p;
6787 if(pthread_create(&p,NULL,routine,NULL)!=0)
6788 return 1;
6789 (void)pthread_detach(p);
6790 return 0;
6791}
6792
6793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006794if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795
6796 ac_cv_pthread_is_default=yes
6797 ac_cv_kthread=no
6798 ac_cv_pthread=no
6799
6800else
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006805fi
6806
6807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006808fi
6809
Matthias Kloseb9621712010-04-24 17:59:49 +00006810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6811$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812
6813
6814if test $ac_cv_pthread_is_default = yes
6815then
6816 ac_cv_kpthread=no
6817else
6818# -Kpthread, if available, provides the right #defines
6819# and linker options to make pthread_create available
6820# Some compilers won't report that they do not support -Kpthread,
6821# so we need to run a program to see whether it really made the
6822# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6824$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006825if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827else
6828 ac_save_cc="$CC"
6829CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006830if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831 ac_cv_kpthread=no
6832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834/* end confdefs.h. */
6835
Stefan Krah7dba5942012-11-22 22:49:11 +01006836#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837#include <pthread.h>
6838
6839void* routine(void* p){return NULL;}
6840
6841int main(){
6842 pthread_t p;
6843 if(pthread_create(&p,NULL,routine,NULL)!=0)
6844 return 1;
6845 (void)pthread_detach(p);
6846 return 0;
6847}
6848
6849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006850if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851 ac_cv_kpthread=yes
6852else
Matthias Kloseb9621712010-04-24 17:59:49 +00006853 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857fi
6858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859CC="$ac_save_cc"
6860fi
6861
Matthias Kloseb9621712010-04-24 17:59:49 +00006862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6863$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864fi
6865
6866if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6867then
6868# -Kthread, if available, provides the right #defines
6869# and linker options to make pthread_create available
6870# Some compilers won't report that they do not support -Kthread,
6871# so we need to run a program to see whether it really made the
6872# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6874$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006875if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006876 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877else
6878 ac_save_cc="$CC"
6879CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006880if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881 ac_cv_kthread=no
6882else
Matthias Kloseb9621712010-04-24 17:59:49 +00006883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006884/* end confdefs.h. */
6885
Stefan Krah7dba5942012-11-22 22:49:11 +01006886#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887#include <pthread.h>
6888
6889void* routine(void* p){return NULL;}
6890
6891int main(){
6892 pthread_t p;
6893 if(pthread_create(&p,NULL,routine,NULL)!=0)
6894 return 1;
6895 (void)pthread_detach(p);
6896 return 0;
6897}
6898
6899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006900if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006901 ac_cv_kthread=yes
6902else
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907fi
6908
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909CC="$ac_save_cc"
6910fi
6911
Matthias Kloseb9621712010-04-24 17:59:49 +00006912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6913$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914fi
6915
6916if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6917then
6918# -pthread, if available, provides the right #defines
6919# and linker options to make pthread_create available
6920# Some compilers won't report that they do not support -pthread,
6921# so we need to run a program to see whether it really made the
6922# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6924$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006925if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006927else
6928 ac_save_cc="$CC"
6929CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006930if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006931 ac_cv_pthread=no
6932else
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934/* end confdefs.h. */
6935
Stefan Krah7dba5942012-11-22 22:49:11 +01006936#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006937#include <pthread.h>
6938
6939void* routine(void* p){return NULL;}
6940
6941int main(){
6942 pthread_t p;
6943 if(pthread_create(&p,NULL,routine,NULL)!=0)
6944 return 1;
6945 (void)pthread_detach(p);
6946 return 0;
6947}
6948
6949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006950if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951 ac_cv_pthread=yes
6952else
Matthias Kloseb9621712010-04-24 17:59:49 +00006953 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6956 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006957fi
6958
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959CC="$ac_save_cc"
6960fi
6961
Matthias Kloseb9621712010-04-24 17:59:49 +00006962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6963$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964fi
6965
6966# If we have set a CC compiler flag for thread support then
6967# check if it works for CXX, too.
6968ac_cv_cxx_thread=no
6969if test ! -z "$CXX"
6970then
Matthias Kloseb9621712010-04-24 17:59:49 +00006971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6972$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973ac_save_cxx="$CXX"
6974
6975if test "$ac_cv_kpthread" = "yes"
6976then
6977 CXX="$CXX -Kpthread"
6978 ac_cv_cxx_thread=yes
6979elif test "$ac_cv_kthread" = "yes"
6980then
6981 CXX="$CXX -Kthread"
6982 ac_cv_cxx_thread=yes
6983elif test "$ac_cv_pthread" = "yes"
6984then
6985 CXX="$CXX -pthread"
6986 ac_cv_cxx_thread=yes
6987fi
6988
6989if test $ac_cv_cxx_thread = yes
6990then
6991 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6992 $CXX -c conftest.$ac_ext 2>&5
6993 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6994 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6995 then
6996 ac_cv_cxx_thread=yes
6997 else
6998 ac_cv_cxx_thread=no
6999 fi
7000 rm -fr conftest*
7001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7003$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004fi
7005CXX="$ac_save_cxx"
7006
7007
7008# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7010$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007011if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007012 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007013else
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007015/* end confdefs.h. */
7016#include <stdlib.h>
7017#include <stdarg.h>
7018#include <string.h>
7019#include <float.h>
7020
7021int
7022main ()
7023{
7024
7025 ;
7026 return 0;
7027}
7028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007029if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007030 ac_cv_header_stdc=yes
7031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007033fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7035
7036if test $ac_cv_header_stdc = yes; then
7037 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007039/* end confdefs.h. */
7040#include <string.h>
7041
7042_ACEOF
7043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 $EGREP "memchr" >/dev/null 2>&1; then :
7045
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007046else
7047 ac_cv_header_stdc=no
7048fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007049rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007050
7051fi
7052
7053if test $ac_cv_header_stdc = yes; then
7054 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007056/* end confdefs.h. */
7057#include <stdlib.h>
7058
7059_ACEOF
7060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 $EGREP "free" >/dev/null 2>&1; then :
7062
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007063else
7064 ac_cv_header_stdc=no
7065fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007066rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007067
7068fi
7069
7070if test $ac_cv_header_stdc = yes; then
7071 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007072 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007073 :
7074else
Matthias Kloseb9621712010-04-24 17:59:49 +00007075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007076/* end confdefs.h. */
7077#include <ctype.h>
7078#include <stdlib.h>
7079#if ((' ' & 0x0FF) == 0x020)
7080# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7081# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7082#else
7083# define ISLOWER(c) \
7084 (('a' <= (c) && (c) <= 'i') \
7085 || ('j' <= (c) && (c) <= 'r') \
7086 || ('s' <= (c) && (c) <= 'z'))
7087# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7088#endif
7089
7090#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7091int
7092main ()
7093{
7094 int i;
7095 for (i = 0; i < 256; i++)
7096 if (XOR (islower (i), ISLOWER (i))
7097 || toupper (i) != TOUPPER (i))
7098 return 2;
7099 return 0;
7100}
7101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007102if ac_fn_c_try_run "$LINENO"; then :
7103
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7108 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007109fi
7110
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007111fi
7112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7114$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007115if test $ac_cv_header_stdc = yes; then
7116
Matthias Kloseb9621712010-04-24 17:59:49 +00007117$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007118
7119fi
7120
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007121for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007122fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007123ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007124sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007125unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007126poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007127sys/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 +01007128sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007129sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007130sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007131sys/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 -07007132libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007133bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7134sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007135do :
7136 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7137ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007138if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007139 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007140#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007141_ACEOF
7142
7143fi
7144
Guido van Rossum627b2d71993-12-24 10:39:16 +00007145done
7146
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007147ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007148for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007149 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7151$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007152if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007153 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007154else
Matthias Kloseb9621712010-04-24 17:59:49 +00007155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007156/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007157#include <sys/types.h>
7158#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007159
Martin v. Löwis11437992002-04-12 09:54:03 +00007160int
7161main ()
7162{
7163if ((DIR *) 0)
7164return 0;
7165 ;
7166 return 0;
7167}
7168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007170 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007171else
Matthias Kloseb9621712010-04-24 17:59:49 +00007172 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007176eval ac_res=\$$as_ac_Header
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7178$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007179if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007180 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007181#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007182_ACEOF
7183
7184ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007187done
7188# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7189if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7191$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007192if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007193 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007194else
Martin v. Löwis11437992002-04-12 09:54:03 +00007195 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007199/* Override any GCC internal prototype to avoid an error.
7200 Use char because int might match the return type of a GCC
7201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007202#ifdef __cplusplus
7203extern "C"
7204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007205char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007206int
7207main ()
7208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007209return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007210 ;
7211 return 0;
7212}
7213_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007214for ac_lib in '' dir; do
7215 if test -z "$ac_lib"; then
7216 ac_res="none required"
7217 else
7218 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007219 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007220 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007221 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007222 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007224rm -f core conftest.err conftest.$ac_objext \
7225 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007226 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007227 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007229done
Victor Stinnere0be4232011-10-25 13:06:09 +02007230if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232else
7233 ac_cv_search_opendir=no
7234fi
7235rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007236LIBS=$ac_func_search_save_LIBS
7237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7239$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007241if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007242 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007243
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007244fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007245
Michael W. Hudson54241132001-12-07 15:38:26 +00007246else
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7248$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007249if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007251else
7252 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007256/* Override any GCC internal prototype to avoid an error.
7257 Use char because int might match the return type of a GCC
7258 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007259#ifdef __cplusplus
7260extern "C"
7261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007262char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007263int
7264main ()
7265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007266return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007267 ;
7268 return 0;
7269}
7270_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007271for ac_lib in '' x; do
7272 if test -z "$ac_lib"; then
7273 ac_res="none required"
7274 else
7275 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007276 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007277 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007278 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007279 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007281rm -f core conftest.err conftest.$ac_objext \
7282 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007283 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007284 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007286done
Victor Stinnere0be4232011-10-25 13:06:09 +02007287if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007289else
7290 ac_cv_search_opendir=no
7291fi
7292rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007293LIBS=$ac_func_search_save_LIBS
7294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7296$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007297ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007298if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007299 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007300
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007301fi
7302
7303fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007304
Matthias Kloseb9621712010-04-24 17:59:49 +00007305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7306$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007307if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007308 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007309else
Matthias Kloseb9621712010-04-24 17:59:49 +00007310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007311/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007312#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007313int
7314main ()
7315{
7316return makedev(0, 0);
7317 ;
7318 return 0;
7319}
7320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007321if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007322 ac_cv_header_sys_types_h_makedev=yes
7323else
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007326rm -f core conftest.err conftest.$ac_objext \
7327 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007328
7329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7331$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007332
7333if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007334ac_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 +02007335if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007336
Matthias Kloseb9621712010-04-24 17:59:49 +00007337$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007338
7339fi
7340
7341
7342
7343 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007344 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 +02007345if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007346
Matthias Kloseb9621712010-04-24 17:59:49 +00007347$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007348
7349fi
7350
7351
7352 fi
7353fi
7354
Michael W. Hudson54241132001-12-07 15:38:26 +00007355
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007356# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7357for ac_header in net/if.h
7358do :
7359 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7360#ifdef STDC_HEADERS
7361# include <stdlib.h>
7362# include <stddef.h>
7363#else
7364# ifdef HAVE_STDLIB_H
7365# include <stdlib.h>
7366# endif
7367#endif
7368#ifdef HAVE_SYS_SOCKET_H
7369# include <sys/socket.h>
7370#endif
7371
7372"
Victor Stinnere0be4232011-10-25 13:06:09 +02007373if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007374 cat >>confdefs.h <<_ACEOF
7375#define HAVE_NET_IF_H 1
7376_ACEOF
7377
7378fi
7379
7380done
7381
7382
Martin v. Löwis11017b12006-01-14 18:12:57 +00007383# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007384for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007385do :
7386 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 +00007387#ifdef HAVE_ASM_TYPES_H
7388#include <asm/types.h>
7389#endif
7390#ifdef HAVE_SYS_SOCKET_H
7391#include <sys/socket.h>
7392#endif
7393
Matthias Kloseb9621712010-04-24 17:59:49 +00007394"
Victor Stinnere0be4232011-10-25 13:06:09 +02007395if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007396 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007397#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007398_ACEOF
7399
7400fi
7401
7402done
7403
7404
Charles-François Natali47413c12011-10-06 19:47:44 +02007405# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007406for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007407do :
7408 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7409ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7410#ifdef HAVE_SYS_SOCKET_H
7411#include <sys/socket.h>
7412#endif
7413
7414"
7415if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7416 cat >>confdefs.h <<_ACEOF
7417#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7418_ACEOF
7419
7420fi
7421
7422done
7423
7424
Guido van Rossum627b2d71993-12-24 10:39:16 +00007425# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007426was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7428$as_echo_n "checking for clock_t in time.h... " >&6; }
7429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007430/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007431#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007432
7433_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007435 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007436 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007437else
Martin v. Löwis11437992002-04-12 09:54:03 +00007438
7439
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007441
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007442
Guido van Rossum627b2d71993-12-24 10:39:16 +00007443fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007444rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007445
Matthias Kloseb9621712010-04-24 17:59:49 +00007446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7447$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007448
Matthias Kloseb9621712010-04-24 17:59:49 +00007449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7450$as_echo_n "checking for makedev... " >&6; }
7451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007452/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007453
Jesus Cea740f53a2010-04-28 11:35:30 +00007454#if defined(MAJOR_IN_MKDEV)
7455#include <sys/mkdev.h>
7456#elif defined(MAJOR_IN_SYSMACROS)
7457#include <sys/sysmacros.h>
7458#else
7459#include <sys/types.h>
7460#endif
7461
Neal Norwitz11690112002-07-30 01:08:28 +00007462int
7463main ()
7464{
Jesus Cea740f53a2010-04-28 11:35:30 +00007465
7466 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007467 ;
7468 return 0;
7469}
Matthias Kloseb159a552010-04-25 21:00:44 +00007470
Neal Norwitz11690112002-07-30 01:08:28 +00007471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007472if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007473 ac_cv_has_makedev=yes
7474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007477rm -f core conftest.err conftest.$ac_objext \
7478 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7480$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007481if test "$ac_cv_has_makedev" = "yes"; then
7482
Matthias Kloseb9621712010-04-24 17:59:49 +00007483$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007484
7485fi
7486
Christian Heimes985ecdc2013-11-20 11:46:18 +01007487# byte swapping
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7489$as_echo_n "checking for le64toh... " >&6; }
7490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7491/* end confdefs.h. */
7492
7493#ifdef HAVE_ENDIAN_H
7494#include <endian.h>
7495#elif defined(HAVE_SYS_ENDIAN_H)
7496#include <sys/endian.h>
7497#endif
7498
7499int
7500main ()
7501{
7502
7503 le64toh(1)
7504 ;
7505 return 0;
7506}
7507
7508_ACEOF
7509if ac_fn_c_try_link "$LINENO"; then :
7510 ac_cv_has_le64toh=yes
7511else
7512 ac_cv_has_le64toh=no
7513fi
7514rm -f core conftest.err conftest.$ac_objext \
7515 conftest$ac_exeext conftest.$ac_ext
7516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7517$as_echo "$ac_cv_has_le64toh" >&6; }
7518if test "$ac_cv_has_le64toh" = "yes"; then
7519
7520$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7521
7522fi
7523
Martin v. Löwis399a6892002-10-04 10:22:02 +00007524# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7525# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7526# defined, but the compiler does not support pragma redefine_extname,
7527# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7528# structures (such as rlimit64) without declaring them. As a
7529# work-around, disable LFS on such configurations
7530
7531use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7533$as_echo_n "checking Solaris LFS bug... " >&6; }
7534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007535/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007536
7537#define _LARGEFILE_SOURCE 1
7538#define _FILE_OFFSET_BITS 64
7539#include <sys/resource.h>
7540
Martin v. Löwis399a6892002-10-04 10:22:02 +00007541int
7542main ()
7543{
7544struct rlimit foo;
7545 ;
7546 return 0;
7547}
7548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007550 sol_lfs_bug=no
7551else
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7556$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007557if test "$sol_lfs_bug" = "yes"; then
7558 use_lfs=no
7559fi
7560
7561if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007562# Two defines needed to enable largefile support on various platforms
7563# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007564case $ac_sys_system/$ac_sys_release in
7565AIX*)
7566
7567$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7568
7569 ;;
7570esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007571
Matthias Kloseb9621712010-04-24 17:59:49 +00007572$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007573
7574
Matthias Kloseb9621712010-04-24 17:59:49 +00007575$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007576
Martin v. Löwis399a6892002-10-04 10:22:02 +00007577fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007578
Guido van Rossum84e7b241996-08-19 21:59:00 +00007579# Add some code to confdefs.h so that the test for off_t works on SCO
7580cat >> confdefs.h <<\EOF
7581#if defined(SCO_DS)
7582#undef _OFF_T
7583#endif
7584EOF
7585
Guido van Rossumef2255b2000-03-10 22:30:29 +00007586# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007587ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007588if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007589
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007590else
Martin v. Löwis11437992002-04-12 09:54:03 +00007591
7592cat >>confdefs.h <<_ACEOF
7593#define mode_t int
7594_ACEOF
7595
7596fi
7597
Matthias Kloseb9621712010-04-24 17:59:49 +00007598ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007599if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007600
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007601else
Martin v. Löwis11437992002-04-12 09:54:03 +00007602
7603cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007605_ACEOF
7606
7607fi
7608
Matthias Kloseb9621712010-04-24 17:59:49 +00007609ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007610if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007611
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007612else
Martin v. Löwis11437992002-04-12 09:54:03 +00007613
7614cat >>confdefs.h <<_ACEOF
7615#define pid_t int
7616_ACEOF
7617
7618fi
7619
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007620
Martin v. Löwis11437992002-04-12 09:54:03 +00007621cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007622#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007623_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007624
Matthias Kloseb9621712010-04-24 17:59:49 +00007625ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007626if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007627
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007628else
Martin v. Löwis11437992002-04-12 09:54:03 +00007629
7630cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007631#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007632_ACEOF
7633
7634fi
7635
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7637$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007638if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007640else
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007642/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007643#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007644
7645_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007648 ac_cv_type_uid_t=yes
7649else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007650 ac_cv_type_uid_t=no
7651fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007652rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007653
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7656$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007657if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007658
Matthias Kloseb9621712010-04-24 17:59:49 +00007659$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007660
7661
Matthias Kloseb9621712010-04-24 17:59:49 +00007662$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007663
7664fi
7665
Mark Dickinson983bc162012-12-02 12:11:38 +00007666
7667# There are two separate checks for each of the exact-width integer types we
7668# need. First we check whether the type is available using the usual
7669# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7670# and <stdint.h> where available). We then also use the special type checks of
7671# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7672# directly, #define's uint32_t to be a suitable type.
7673
7674ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7675if test "x$ac_cv_type_uint32_t" = xyes; then :
7676
7677$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7678
7679fi
7680
Matthias Kloseb9621712010-04-24 17:59:49 +00007681ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7682case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007683 no|yes) ;; #(
7684 *)
7685
Matthias Kloseb9621712010-04-24 17:59:49 +00007686$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007687
7688
7689cat >>confdefs.h <<_ACEOF
7690#define uint32_t $ac_cv_c_uint32_t
7691_ACEOF
7692;;
7693 esac
7694
Mark Dickinson983bc162012-12-02 12:11:38 +00007695
7696ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7697if test "x$ac_cv_type_uint64_t" = xyes; then :
7698
7699$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7700
7701fi
7702
Matthias Kloseb9621712010-04-24 17:59:49 +00007703ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7704case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007705 no|yes) ;; #(
7706 *)
7707
Matthias Kloseb9621712010-04-24 17:59:49 +00007708$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007709
7710
7711cat >>confdefs.h <<_ACEOF
7712#define uint64_t $ac_cv_c_uint64_t
7713_ACEOF
7714;;
7715 esac
7716
Mark Dickinson983bc162012-12-02 12:11:38 +00007717
7718ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7719if test "x$ac_cv_type_int32_t" = xyes; then :
7720
7721$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7722
7723fi
7724
Matthias Kloseb9621712010-04-24 17:59:49 +00007725ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7726case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007727 no|yes) ;; #(
7728 *)
7729
7730cat >>confdefs.h <<_ACEOF
7731#define int32_t $ac_cv_c_int32_t
7732_ACEOF
7733;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007734esac
7735
Mark Dickinson983bc162012-12-02 12:11:38 +00007736
7737ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7738if test "x$ac_cv_type_int64_t" = xyes; then :
7739
7740$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7741
7742fi
7743
Matthias Kloseb9621712010-04-24 17:59:49 +00007744ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7745case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007746 no|yes) ;; #(
7747 *)
7748
7749cat >>confdefs.h <<_ACEOF
7750#define int64_t $ac_cv_c_int64_t
7751_ACEOF
7752;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007753esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007754
Mark Dickinson983bc162012-12-02 12:11:38 +00007755
Matthias Kloseb9621712010-04-24 17:59:49 +00007756ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007757if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758
Matthias Kloseb9621712010-04-24 17:59:49 +00007759$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007760
7761fi
7762
Stefan Krah1919b7e2012-03-21 18:25:23 +01007763ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7764if test "x$ac_cv_type___uint128_t" = xyes; then :
7765
7766$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7767
7768fi
7769
Jack Jansendd19cf82001-12-06 22:36:17 +00007770
Michael W. Hudson54241132001-12-07 15:38:26 +00007771# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007772# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773# The cast to long int works around a bug in the HP C Compiler
7774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7778$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007779if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007781else
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 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 +00007783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 if test "$ac_cv_type_int" = yes; then
7786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007788as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007789See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 else
7791 ac_cv_sizeof_int=0
7792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7797$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798
7799
7800
Martin v. Löwis11437992002-04-12 09:54:03 +00007801cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007802#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007803_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007804
7805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806# The cast to long int works around a bug in the HP C Compiler
7807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7809# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7811$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007812if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007814else
Matthias Kloseb9621712010-04-24 17:59:49 +00007815 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 +00007816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817else
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 if test "$ac_cv_type_long" = yes; then
7819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007821as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007822See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 else
7824 ac_cv_sizeof_long=0
7825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827
Martin v. Löwis11437992002-04-12 09:54:03 +00007828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7830$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831
7832
7833
Martin v. Löwis11437992002-04-12 09:54:03 +00007834cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007835#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007836_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007837
7838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839# The cast to long int works around a bug in the HP C Compiler
7840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7842# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7844$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007845if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007847else
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 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 +00007849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850else
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 if test "$ac_cv_type_void_p" = yes; then
7852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007854as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007855See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 else
7857 ac_cv_sizeof_void_p=0
7858 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860
Martin v. Löwis11437992002-04-12 09:54:03 +00007861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7863$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864
7865
7866
Martin v. Löwis11437992002-04-12 09:54:03 +00007867cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007868#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007869_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007870
7871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872# The cast to long int works around a bug in the HP C Compiler
7873# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7874# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7875# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7877$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007878if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007880else
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 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 +00007882
Martin v. Löwis11437992002-04-12 09:54:03 +00007883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 if test "$ac_cv_type_short" = yes; then
7885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007887as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007888See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889 else
7890 ac_cv_sizeof_short=0
7891 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893
Martin v. Löwis11437992002-04-12 09:54:03 +00007894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7896$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897
7898
7899
Martin v. Löwis11437992002-04-12 09:54:03 +00007900cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007901#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007902_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007903
7904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905# The cast to long int works around a bug in the HP C Compiler
7906# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7907# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7908# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7910$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007911if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007913else
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 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 +00007915
Martin v. Löwis11437992002-04-12 09:54:03 +00007916else
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 if test "$ac_cv_type_float" = yes; then
7918 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007920as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007921See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922 else
7923 ac_cv_sizeof_float=0
7924 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007926
Martin v. Löwis11437992002-04-12 09:54:03 +00007927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7929$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930
7931
7932
Martin v. Löwis11437992002-04-12 09:54:03 +00007933cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007934#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007935_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007936
7937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938# The cast to long int works around a bug in the HP C Compiler
7939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7941# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7943$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007944if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007945 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007946else
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 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 +00007948
Martin v. Löwis11437992002-04-12 09:54:03 +00007949else
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 if test "$ac_cv_type_double" = yes; then
7951 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007953as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007954See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955 else
7956 ac_cv_sizeof_double=0
7957 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959
Martin v. Löwis11437992002-04-12 09:54:03 +00007960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7962$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963
7964
7965
Martin v. Löwis11437992002-04-12 09:54:03 +00007966cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007967#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007968_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007969
7970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971# The cast to long int works around a bug in the HP C Compiler
7972# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7973# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7974# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7976$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007977if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007979else
Matthias Kloseb9621712010-04-24 17:59:49 +00007980 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 +00007981
Martin v. Löwis11437992002-04-12 09:54:03 +00007982else
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 if test "$ac_cv_type_fpos_t" = yes; then
7984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007986as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007987See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988 else
7989 ac_cv_sizeof_fpos_t=0
7990 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007992
Martin v. Löwis11437992002-04-12 09:54:03 +00007993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7995$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996
7997
7998
Martin v. Löwis11437992002-04-12 09:54:03 +00007999cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008000#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008001_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008002
Michael W. Hudson54241132001-12-07 15:38:26 +00008003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004# The cast to long int works around a bug in the HP C Compiler
8005# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8006# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8007# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8009$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008010if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 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 +00008014
Martin v. Löwis18e16552006-02-15 17:27:45 +00008015else
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 if test "$ac_cv_type_size_t" = yes; then
8017 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008019as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008020See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021 else
8022 ac_cv_sizeof_size_t=0
8023 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025
Martin v. Löwis18e16552006-02-15 17:27:45 +00008026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8028$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029
8030
8031
Martin v. Löwis18e16552006-02-15 17:27:45 +00008032cat >>confdefs.h <<_ACEOF
8033#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8034_ACEOF
8035
8036
Christian Heimes400adb02008-02-01 08:12:03 +00008037# The cast to long int works around a bug in the HP C Compiler
8038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8040# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8042$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008043if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008045else
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 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 +00008047
Christian Heimes400adb02008-02-01 08:12:03 +00008048else
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 if test "$ac_cv_type_pid_t" = yes; then
8050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008052as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008053See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008054 else
8055 ac_cv_sizeof_pid_t=0
8056 fi
8057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008058
Christian Heimes400adb02008-02-01 08:12:03 +00008059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8061$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008062
8063
8064
8065cat >>confdefs.h <<_ACEOF
8066#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8067_ACEOF
8068
8069
Michael W. Hudson54241132001-12-07 15:38:26 +00008070
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8072$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008073have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008075/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008076
Martin v. Löwis11437992002-04-12 09:54:03 +00008077int
8078main ()
8079{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008080long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008081 ;
8082 return 0;
8083}
8084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008085if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008086
8087
Matthias Kloseb9621712010-04-24 17:59:49 +00008088$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008089
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008090 have_long_long=yes
8091
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8095$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008096if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097# The cast to long int works around a bug in the HP C Compiler
8098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8100# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8102$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008103if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008105else
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 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 +00008107
Martin v. Löwis11437992002-04-12 09:54:03 +00008108else
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 if test "$ac_cv_type_long_long" = yes; then
8110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008112as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008113See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114 else
8115 ac_cv_sizeof_long_long=0
8116 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008118
Martin v. Löwis11437992002-04-12 09:54:03 +00008119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8121$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122
8123
8124
Martin v. Löwis11437992002-04-12 09:54:03 +00008125cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008126#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008127_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008128
Michael W. Hudson54241132001-12-07 15:38:26 +00008129
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008130fi
8131
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8133$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008134have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008136/* end confdefs.h. */
8137
8138int
8139main ()
8140{
8141long double x; x = (long double)0;
8142 ;
8143 return 0;
8144}
8145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008146if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008147
8148
Matthias Kloseb9621712010-04-24 17:59:49 +00008149$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008150
8151 have_long_double=yes
8152
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008153fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8156$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008157if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008158# The cast to long int works around a bug in the HP C Compiler
8159# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8160# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8161# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8163$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008164if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008165 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008166else
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 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 +00008168
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008169else
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 if test "$ac_cv_type_long_double" = yes; then
8171 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008173as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008174See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008175 else
8176 ac_cv_sizeof_long_double=0
8177 fi
8178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008179
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8182$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008183
8184
8185
8186cat >>confdefs.h <<_ACEOF
8187#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8188_ACEOF
8189
8190
8191fi
8192
8193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8195$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008196have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008198/* end confdefs.h. */
8199
8200int
8201main ()
8202{
8203_Bool x; x = (_Bool)0;
8204 ;
8205 return 0;
8206}
8207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008208if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008209
8210
Matthias Kloseb9621712010-04-24 17:59:49 +00008211$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008212
8213 have_c99_bool=yes
8214
Thomas Woutersb2137042007-02-01 18:02:27 +00008215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8218$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008219if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220# The cast to long int works around a bug in the HP C Compiler
8221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8223# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8225$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008226if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008228else
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 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 +00008230
Thomas Woutersb2137042007-02-01 18:02:27 +00008231else
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 if test "$ac_cv_type__Bool" = yes; then
8233 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008235as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008236See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 else
8238 ac_cv_sizeof__Bool=0
8239 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008241
Thomas Woutersb2137042007-02-01 18:02:27 +00008242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8244$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245
8246
8247
Thomas Woutersb2137042007-02-01 18:02:27 +00008248cat >>confdefs.h <<_ACEOF
8249#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8250_ACEOF
8251
8252
8253fi
8254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008256 #include <stdint.h>
8257 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008258 #ifdef HAVE_INTTYPES_H
8259 #include <inttypes.h>
8260 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008261"
Victor Stinnere0be4232011-10-25 13:06:09 +02008262if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008263
8264cat >>confdefs.h <<_ACEOF
8265#define HAVE_UINTPTR_T 1
8266_ACEOF
8267
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268# The cast to long int works around a bug in the HP C Compiler
8269# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8270# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8271# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8273$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008274if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 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 +00008278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279else
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 if test "$ac_cv_type_uintptr_t" = yes; then
8281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008283as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008284See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285 else
8286 ac_cv_sizeof_uintptr_t=0
8287 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8292$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293
8294
8295
Martin v. Löwis11437992002-04-12 09:54:03 +00008296cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008297#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008298_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008299
Michael W. Hudson54241132001-12-07 15:38:26 +00008300
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008301fi
8302
Thomas Wouters89f507f2006-12-13 04:49:30 +00008303
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008304# The cast to long int works around a bug in the HP C Compiler
8305# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8306# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8307# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8309$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008310if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008312else
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008314#ifdef HAVE_SYS_TYPES_H
8315#include <sys/types.h>
8316#endif
8317
Matthias Kloseb9621712010-04-24 17:59:49 +00008318"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008319
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008320else
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 if test "$ac_cv_type_off_t" = yes; then
8322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008324as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008325See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008326 else
8327 ac_cv_sizeof_off_t=0
8328 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008330
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8333$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008334
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008335
8336
Martin v. Löwis11437992002-04-12 09:54:03 +00008337cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008338#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008339_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008340
Michael W. Hudson54241132001-12-07 15:38:26 +00008341
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8344$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008345if test "$have_long_long" = yes
8346then
8347if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008348 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8353$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008354else
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8356$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008357fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008358else
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8360$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008361fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008362
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008363# The cast to long int works around a bug in the HP C Compiler
8364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8366# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8368$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008369if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008371else
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008373#ifdef HAVE_SYS_TYPES_H
8374#include <sys/types.h>
8375#endif
8376#ifdef HAVE_TIME_H
8377#include <time.h>
8378#endif
8379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008381
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008382else
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 if test "$ac_cv_type_time_t" = yes; then
8384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008386as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008387See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008388 else
8389 ac_cv_sizeof_time_t=0
8390 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008392
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8395$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008396
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008397
8398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008400#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008401_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008402
Michael W. Hudson54241132001-12-07 15:38:26 +00008403
8404
Trent Mick635f6fb2000-08-23 21:33:05 +00008405# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008406ac_save_cc="$CC"
8407if test "$ac_cv_kpthread" = "yes"
8408then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008409elif test "$ac_cv_kthread" = "yes"
8410then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008411elif test "$ac_cv_pthread" = "yes"
8412then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008413fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008414
Matthias Kloseb9621712010-04-24 17:59:49 +00008415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8416$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008417have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008419/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008420
8421 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008422int
8423main ()
8424{
Guido van Rossum12580492000-09-24 16:47:19 +00008425pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 ;
8427 return 0;
8428}
Matthias Kloseb159a552010-04-25 21:00:44 +00008429
Martin v. Löwis11437992002-04-12 09:54:03 +00008430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008431if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008432 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8436$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008437if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008439# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8440# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8441# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8443$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008444if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008448#ifdef HAVE_PTHREAD_H
8449#include <pthread.h>
8450#endif
8451
Matthias Kloseb9621712010-04-24 17:59:49 +00008452"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008453
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 if test "$ac_cv_type_pthread_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 (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008459See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008460 else
8461 ac_cv_sizeof_pthread_t=0
8462 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008464
Trent Mick635f6fb2000-08-23 21:33:05 +00008465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8467$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008468
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008469
8470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008472#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008473_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008474
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008475
Trent Mick635f6fb2000-08-23 21:33:05 +00008476fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008477CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008478
Michael W. Hudson54241132001-12-07 15:38:26 +00008479
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008480case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008481 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008482 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8483 ;;
8484 Darwin/*)
8485 OTHER_LIBTOOL_OPT=""
8486 ;;
8487esac
8488
8489
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008490
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008491case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008492 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008493 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8494 if test "${enable_universalsdk}"; then
8495 :
8496 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008497 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008498 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008499 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008500 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008501 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008502 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008503 if test ${gcc_version} '<' 4.0
8504 then
8505 LIBTOOL_CRUFT="-lcc_dynamic"
8506 else
8507 LIBTOOL_CRUFT=""
8508 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008510 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008511else
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008513/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008514
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008515 #include <unistd.h>
8516 int main(int argc, char*argv[])
8517 {
8518 if (sizeof(long) == 4) {
8519 return 0;
8520 } else {
8521 return 1;
8522 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008523 }
8524
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008526if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008527 ac_osx_32bit=yes
8528else
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8532 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008533fi
8534
8535
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008536 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008537 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008538 i386)
8539 MACOSX_DEFAULT_ARCH="i386"
8540 ;;
8541 ppc)
8542 MACOSX_DEFAULT_ARCH="ppc"
8543 ;;
8544 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008545 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008546 ;;
8547 esac
8548 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008549 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008550 i386)
8551 MACOSX_DEFAULT_ARCH="x86_64"
8552 ;;
8553 ppc)
8554 MACOSX_DEFAULT_ARCH="ppc64"
8555 ;;
8556 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008557 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008558 ;;
8559 esac
8560
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008561 fi
8562
8563 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008564 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008565 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008566esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8568$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008569if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008570then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008571 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008573 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008574
Matthias Kloseb9621712010-04-24 17:59:49 +00008575$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8578$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008579 if test $enable_shared = "yes"
8580 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008581 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 +00008582 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008583else
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8585$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008586fi
8587
Matthias Kloseb9621712010-04-24 17:59:49 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8589$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008590case $ac_sys_system/$ac_sys_release in
8591 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008594
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8596$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008597 ;;
8598 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8600$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008601 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008602esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008603
Guido van Rossum0a516c91994-09-12 10:58:40 +00008604# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008605
Michael W. Hudson54241132001-12-07 15:38:26 +00008606
8607
8608
8609
Benjamin Peterson99f03762010-04-11 22:15:28 +00008610
Thomas Wouters477c8d52006-05-27 19:21:47 +00008611
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008612# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8613# -- usually .so, .sl on HP-UX, .dll on Cygwin
8614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8615$as_echo_n "checking the extension of shared libraries... " >&6; }
8616if test -z "$SHLIB_SUFFIX"; then
8617 case $ac_sys_system in
8618 hp*|HP*)
8619 case `uname -m` in
8620 ia64) SHLIB_SUFFIX=.so;;
8621 *) SHLIB_SUFFIX=.sl;;
8622 esac
8623 ;;
8624 CYGWIN*) SHLIB_SUFFIX=.dll;;
8625 *) SHLIB_SUFFIX=.so;;
8626 esac
8627fi
8628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8629$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008630
Guido van Rossum0a516c91994-09-12 10:58:40 +00008631# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008632# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008633# (Shared libraries in this instance are shared modules to be loaded into
8634# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8636$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008637if test -z "$LDSHARED"
8638then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008639 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008640 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008641 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008642 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008643 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008644 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008645 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008647 if test "$GCC" = "yes" ; then
8648 LDSHARED='$(CC) -shared'
8649 LDCXXSHARED='$(CXX) -shared'
8650 else
8651 LDSHARED='$(CC) -G'
8652 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008653 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008654 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008655 if test "$GCC" = "yes" ; then
8656 LDSHARED='$(CC) -shared'
8657 LDCXXSHARED='$(CXX) -shared'
8658 else
8659 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008660 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008661 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008662 LDSHARED='$(CC) -bundle'
8663 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008664 if test "$enable_framework" ; then
8665 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008666 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8667 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008668 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008669 else
8670 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008671 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008672 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008673 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008674 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008675 LDSHARED='$(CC) -bundle'
8676 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008677 if test "$enable_framework" ; then
8678 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008679 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8680 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008681 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008682 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008683 # No framework, use the Python app as bundle-loader
8684 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008685 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008686 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008687 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008688 Darwin/*)
8689 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8690 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008691
Ned Deily36820b62014-06-25 13:44:22 -07008692 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8693 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8694 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8695 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8696 if test ${dep_target_major} -eq 10 && \
8697 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008698 then
Ned Deily36820b62014-06-25 13:44:22 -07008699 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008700 LDSHARED='$(CC) -bundle'
8701 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008702 if test "$enable_framework" ; then
8703 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008704 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8705 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008706 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008707 else
8708 # No framework, use the Python app as bundle-loader
8709 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8710 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008711 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008712 fi
Ned Deily36820b62014-06-25 13:44:22 -07008713 else
8714 # building for OS X 10.3 and later
8715 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8716 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8717 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008718 fi
8719 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008720 Linux*|GNU*|QNX*)
8721 LDSHARED='$(CC) -shared'
8722 LDCXXSHARED='$(CXX) -shared';;
8723 BSD/OS*/4*)
8724 LDSHARED="gcc -shared"
8725 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008726 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008727 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008728 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008729 LDSHARED='$(CC) -shared'
8730 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008731 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008732 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008733 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008734 OpenBSD*)
8735 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8736 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008737 LDSHARED='$(CC) -shared $(CCSHARED)'
8738 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008739 else
8740 case `uname -r` in
8741 [01].* | 2.[0-7] | 2.[0-7].*)
8742 LDSHARED="ld -Bshareable ${LDFLAGS}"
8743 ;;
8744 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008745 LDSHARED='$(CC) -shared $(CCSHARED)'
8746 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008747 ;;
8748 esac
8749 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008750 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008751 LDSHARED='$(CC) -shared'
8752 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008753 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008754 if test "$GCC" = "yes" ; then
8755 LDSHARED='$(CC) -shared'
8756 LDCXXSHARED='$(CXX) -shared'
8757 else
8758 LDSHARED='$(CC) -G'
8759 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008760 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008761 SCO_SV*)
8762 LDSHARED='$(CC) -Wl,-G,-Bexport'
8763 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8764 CYGWIN*)
8765 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8766 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008767 *) LDSHARED="ld";;
8768 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8771$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008772LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008773BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008774# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008775# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8777$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008778if test -z "$CCSHARED"
8779then
Guido van Rossum07397971997-04-29 21:49:50 +00008780 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008781 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008782 then CCSHARED="-fPIC";
8783 elif test `uname -p` = sparc;
8784 then CCSHARED="-xcode=pic32";
8785 else CCSHARED="-Kpic";
8786 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008787 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008788 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008789 else CCSHARED="+z";
8790 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008791 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008792 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008793 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008794 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008795 if test "$GCC" = "yes"
8796 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008797 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008798 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008799 SCO_SV*)
8800 if test "$GCC" = "yes"
8801 then CCSHARED="-fPIC"
8802 else CCSHARED="-Kpic -belf"
8803 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008804 IRIX*/6*) case $CC in
8805 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008806 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008807 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008808 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8811$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008812# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008813# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8815$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008816if test -z "$LINKFORSHARED"
8817then
Guido van Rossum07397971997-04-29 21:49:50 +00008818 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008819 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008820 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008821 LINKFORSHARED="-Wl,-E -Wl,+s";;
8822# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008823 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008824 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008825 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008827 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008828
8829 # Issue #18075: the default maximum stack size (8MBytes) is too
8830 # small for the default recursion limit. Increase the stack size
8831 # to ensure that tests don't crash
8832 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8833
Jack Jansene578a632001-08-15 01:27:14 +00008834 if test "$enable_framework"
8835 then
Jack Jansenda49e192005-01-07 13:08:22 +00008836 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008837 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008838 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008839 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008840 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008841 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008842 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008843 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8844 then
8845 LINKFORSHARED="-Wl,--export-dynamic"
8846 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008847 SunOS/5*) case $CC in
8848 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008849 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008850 then
8851 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008852 fi;;
8853 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008854 CYGWIN*)
8855 if test $enable_shared = "no"
8856 then
8857 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8858 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008859 QNX*)
8860 # -Wl,-E causes the symbols to be added to the dynamic
8861 # symbol table so that they can be found when a module
8862 # is loaded. -N 2048K causes the stack size to be set
8863 # to 2048 kilobytes so that the stack doesn't overflow
8864 # when running test_compile.py.
8865 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008866 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8869$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008870
Michael W. Hudson54241132001-12-07 15:38:26 +00008871
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008872
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8874$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008875if test ! "$LIBRARY" = "$LDLIBRARY"
8876then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008877 case $ac_sys_system in
8878 CYGWIN*)
8879 # Cygwin needs CCSHARED when building extension DLLs
8880 # but not when building the interpreter DLL.
8881 CFLAGSFORSHARED='';;
8882 *)
8883 CFLAGSFORSHARED='$(CCSHARED)'
8884 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8887$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008888
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008889# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8890# library (with --enable-shared).
8891# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008892# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8893# if it is not required, since it creates a dependency of the shared library
8894# to LIBS. This, in turn, means that applications linking the shared libpython
8895# don't need to link LIBS explicitly. The default should be only changed
8896# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8899$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008900case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008901 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008902 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008903esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8905$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008906
8907
Guido van Rossum627b2d71993-12-24 10:39:16 +00008908# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8910$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008911if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008912 $as_echo_n "(cached) " >&6
8913else
8914 ac_check_lib_save_LIBS=$LIBS
8915LIBS="-lsendfile $LIBS"
8916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8917/* end confdefs.h. */
8918
8919/* Override any GCC internal prototype to avoid an error.
8920 Use char because int might match the return type of a GCC
8921 builtin and then its argument prototype would still apply. */
8922#ifdef __cplusplus
8923extern "C"
8924#endif
8925char sendfile ();
8926int
8927main ()
8928{
8929return sendfile ();
8930 ;
8931 return 0;
8932}
8933_ACEOF
8934if ac_fn_c_try_link "$LINENO"; then :
8935 ac_cv_lib_sendfile_sendfile=yes
8936else
8937 ac_cv_lib_sendfile_sendfile=no
8938fi
8939rm -f core conftest.err conftest.$ac_objext \
8940 conftest$ac_exeext conftest.$ac_ext
8941LIBS=$ac_check_lib_save_LIBS
8942fi
8943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8944$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008945if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008946 cat >>confdefs.h <<_ACEOF
8947#define HAVE_LIBSENDFILE 1
8948_ACEOF
8949
8950 LIBS="-lsendfile $LIBS"
8951
8952fi
8953
Matthias Kloseb9621712010-04-24 17:59:49 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8955$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008956if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008957 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008958else
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008960LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964/* Override any GCC internal prototype to avoid an error.
8965 Use char because int might match the return type of a GCC
8966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008967#ifdef __cplusplus
8968extern "C"
8969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008970char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008971int
8972main ()
8973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 ;
8976 return 0;
8977}
8978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008981else
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008984rm -f core conftest.err conftest.$ac_objext \
8985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008986LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8989$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008990if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008991 cat >>confdefs.h <<_ACEOF
8992#define HAVE_LIBDL 1
8993_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008994
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008995 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008996
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008997fi
8998 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9000$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009001if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009003else
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009005LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009/* Override any GCC internal prototype to avoid an error.
9010 Use char because int might match the return type of a GCC
9011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009012#ifdef __cplusplus
9013extern "C"
9014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009015char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009016int
9017main ()
9018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ;
9021 return 0;
9022}
9023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009024if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009026else
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009029rm -f core conftest.err conftest.$ac_objext \
9030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009031LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9034$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009035if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 cat >>confdefs.h <<_ACEOF
9037#define HAVE_LIBDLD 1
9038_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009039
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009040 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009042fi
9043 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009044
Georg Brandlb1441c72009-01-03 22:33:39 +00009045# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009046if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9048$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009049if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009051else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009052 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009056/* Override any GCC internal prototype to avoid an error.
9057 Use char because int might match the return type of a GCC
9058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009059#ifdef __cplusplus
9060extern "C"
9061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009062char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009063int
9064main ()
9065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 ;
9068 return 0;
9069}
9070_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071for ac_lib in '' pthread rt posix4; do
9072 if test -z "$ac_lib"; then
9073 ac_res="none required"
9074 else
9075 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009076 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009077 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009079 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009081rm -f core conftest.err conftest.$ac_objext \
9082 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009083 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009086done
Victor Stinnere0be4232011-10-25 13:06:09 +02009087if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089else
9090 ac_cv_search_sem_init=no
9091fi
9092rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009093LIBS=$ac_func_search_save_LIBS
9094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9096$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009097ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009098if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009099 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009100
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009101fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009102 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009103 # posix4 on Solaris 2.6
9104 # pthread (first!) on Linux
9105fi
9106
Martin v. Löwis19d17342003-06-14 21:03:05 +00009107# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9109$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009110if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009112else
9113 ac_check_lib_save_LIBS=$LIBS
9114LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009116/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009117
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009118/* Override any GCC internal prototype to avoid an error.
9119 Use char because int might match the return type of a GCC
9120 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009121#ifdef __cplusplus
9122extern "C"
9123#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009124char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009125int
9126main ()
9127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009129 ;
9130 return 0;
9131}
9132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009134 ac_cv_lib_intl_textdomain=yes
9135else
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009138rm -f core conftest.err conftest.$ac_objext \
9139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009140LIBS=$ac_check_lib_save_LIBS
9141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9143$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009144if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009147
Brett Cannonc6d936e2009-06-07 20:09:53 +00009148 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009149fi
9150
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009151
9152# checks for system dependent C++ extensions support
9153case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009154 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9155$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009157/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009158
Georg Brandl59e87bd2011-02-15 19:48:59 +00009159 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009160int
9161main ()
9162{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009163loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 ;
9165 return 0;
9166}
Matthias Kloseb159a552010-04-25 21:00:44 +00009167
Martin v. Löwis11437992002-04-12 09:54:03 +00009168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009169if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009170
Matthias Kloseb159a552010-04-25 21:00:44 +00009171
Matthias Kloseb9621712010-04-24 17:59:49 +00009172$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009173
Matthias Kloseb159a552010-04-25 21:00:44 +00009174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009175$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009176
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009177else
Matthias Kloseb159a552010-04-25 21:00:44 +00009178
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009180$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009181
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009183rm -f core conftest.err conftest.$ac_objext \
9184 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009185 *) ;;
9186esac
9187
Christian Heimes985ecdc2013-11-20 11:46:18 +01009188# check for systems that require aligned memory access
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9190$as_echo_n "checking aligned memory access is required... " >&6; }
9191if test "$cross_compiling" = yes; then :
9192 aligned_required=yes
9193else
9194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9195/* end confdefs.h. */
9196
9197int main()
9198{
9199 char s[16];
9200 int i, *p1, *p2;
9201 for (i=0; i < 16; i++)
9202 s[i] = i;
9203 p1 = (int*)(s+1);
9204 p2 = (int*)(s+2);
9205 if (*p1 == *p2)
9206 return 1;
9207 return 0;
9208}
9209
9210_ACEOF
9211if ac_fn_c_try_run "$LINENO"; then :
9212 aligned_required=no
9213else
9214 aligned_required=yes
9215fi
9216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9217 conftest.$ac_objext conftest.beam conftest.$ac_ext
9218fi
9219
9220
9221if test "$aligned_required" = yes ; then
9222
9223$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9224
9225fi
9226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9227$as_echo "$aligned_required" >&6; }
9228
9229
9230# str, bytes and memoryview hash algorithm
9231
9232
9233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9234$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9235
9236# Check whether --with-hash_algorithm was given.
9237if test "${with_hash_algorithm+set}" = set; then :
9238 withval=$with_hash_algorithm;
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9240$as_echo "$withval" >&6; }
9241case "$withval" in
9242 siphash24)
9243 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9244
9245 ;;
9246 fnv)
9247 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9248
9249 ;;
9250 *)
9251 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9252 ;;
9253esac
9254
9255else
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9257$as_echo "default" >&6; }
9258fi
9259
9260
Charles-François Natalid30b0222014-05-08 23:08:51 +01009261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9262$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9263
9264# Check whether --with-address_sanitizer was given.
9265if test "${with_address_sanitizer+set}" = set; then :
9266 withval=$with_address_sanitizer;
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9268$as_echo "$withval" >&6; }
9269BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9270LDFLAGS="-fsanitize=address $LDFLAGS"
9271
9272else
9273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9274$as_echo "no" >&6; }
9275fi
9276
9277
Guido van Rossum70c7f481998-03-26 18:44:10 +00009278# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9280$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009281if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009283else
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009285LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009289/* Override any GCC internal prototype to avoid an error.
9290 Use char because int might match the return type of a GCC
9291 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009292#ifdef __cplusplus
9293extern "C"
9294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009295char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009296int
9297main ()
9298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009299return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 ;
9301 return 0;
9302}
9303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009304if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009305 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009306else
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009309rm -f core conftest.err conftest.$ac_objext \
9310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009311LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9314$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009315if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009316 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009317fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009318 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9320$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009321if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009323else
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009325LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329/* Override any GCC internal prototype to avoid an error.
9330 Use char because int might match the return type of a GCC
9331 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009332#ifdef __cplusplus
9333extern "C"
9334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009335char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009336int
9337main ()
9338{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009339return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 ;
9341 return 0;
9342}
9343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009344if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009346else
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009349rm -f core conftest.err conftest.$ac_objext \
9350 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009351LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9354$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009355if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009356 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009357fi
9358 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009359
Matthias Kloseb9621712010-04-24 17:59:49 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9361$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009363# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009364if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9367$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009368LIBS="$withval $LIBS"
9369
9370else
Matthias Kloseb9621712010-04-24 17:59:49 +00009371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9372$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373fi
9374
Guido van Rossum7f43da71994-08-01 12:15:30 +00009375
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009376if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009377 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9378set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9380$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009381if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009383else
9384 case $PKG_CONFIG in
9385 [\\/]* | ?:[\\/]*)
9386 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9387 ;;
9388 *)
9389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9390for as_dir in $PATH
9391do
9392 IFS=$as_save_IFS
9393 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009394 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009395 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009396 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009397 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009398 break 2
9399 fi
9400done
Matthias Kloseb9621712010-04-24 17:59:49 +00009401 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009402IFS=$as_save_IFS
9403
9404 ;;
9405esac
9406fi
9407PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9408if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9410$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009411else
Matthias Kloseb9621712010-04-24 17:59:49 +00009412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9413$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009414fi
9415
9416
9417fi
9418if test -z "$ac_cv_path_PKG_CONFIG"; then
9419 ac_pt_PKG_CONFIG=$PKG_CONFIG
9420 # Extract the first word of "pkg-config", so it can be a program name with args.
9421set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9423$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009424if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009425 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009426else
9427 case $ac_pt_PKG_CONFIG in
9428 [\\/]* | ?:[\\/]*)
9429 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9430 ;;
9431 *)
9432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9433for as_dir in $PATH
9434do
9435 IFS=$as_save_IFS
9436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009437 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009438 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009439 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009441 break 2
9442 fi
9443done
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009445IFS=$as_save_IFS
9446
9447 ;;
9448esac
9449fi
9450ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9451if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9453$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009454else
Matthias Kloseb9621712010-04-24 17:59:49 +00009455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9456$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009457fi
9458
9459 if test "x$ac_pt_PKG_CONFIG" = x; then
9460 PKG_CONFIG=""
9461 else
9462 case $cross_compiling:$ac_tool_warned in
9463yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9465$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009466ac_tool_warned=yes ;;
9467esac
9468 PKG_CONFIG=$ac_pt_PKG_CONFIG
9469 fi
9470else
9471 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9472fi
9473
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009474
9475# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9477$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009478
9479# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009480if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009481 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009482else
9483 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009484fi
9485
9486
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9488$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009489
9490# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9492$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009493
9494# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009495if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009496 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009497else
9498 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009499fi
9500
9501
9502if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009503 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9504else
9505 LIBFFI_INCLUDEDIR=""
9506fi
9507
9508
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9510$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009511
Stefan Krah60187b52012-03-23 19:06:27 +01009512# Check for use of the system libmpdec library
9513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9514$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9515
9516# Check whether --with-system_libmpdec was given.
9517if test "${with_system_libmpdec+set}" = set; then :
9518 withval=$with_system_libmpdec;
9519else
9520 with_system_libmpdec="no"
9521fi
9522
9523
9524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9525$as_echo "$with_system_libmpdec" >&6; }
9526
Benjamin Peterson076ed002010-10-31 17:11:02 +00009527# Check for support for loadable sqlite extensions
9528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9529$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9530# Check whether --enable-loadable-sqlite-extensions was given.
9531if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9532 enableval=$enable_loadable_sqlite_extensions;
9533else
9534 enable_loadable_sqlite_extensions="no"
9535fi
9536
9537
9538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9539$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9540
Ned Deilyd819b932013-09-06 01:07:05 -07009541# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9542
9543
9544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9545$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9546
9547# Check whether --with-tcltk-includes was given.
9548if test "${with_tcltk_includes+set}" = set; then :
9549 withval=$with_tcltk_includes;
9550else
9551 with_tcltk_includes="default"
9552fi
9553
9554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9555$as_echo "$with_tcltk_includes" >&6; }
9556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9557$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9558
9559# Check whether --with-tcltk-libs was given.
9560if test "${with_tcltk_libs+set}" = set; then :
9561 withval=$with_tcltk_libs;
9562else
9563 with_tcltk_libs="default"
9564fi
9565
9566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9567$as_echo "$with_tcltk_libs" >&6; }
9568if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9569then
9570 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9571 then
9572 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9573 fi
9574 TCLTK_INCLUDES=""
9575 TCLTK_LIBS=""
9576else
9577 TCLTK_INCLUDES="$with_tcltk_includes"
9578 TCLTK_LIBS="$with_tcltk_libs"
9579fi
9580
Matthias Klose55708cc2009-04-30 08:06:49 +00009581# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9583$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009584
9585# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009586if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009587 withval=$with_dbmliborder;
9588if test x$with_dbmliborder = xyes
9589then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009590as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009591else
9592 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9593 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9594 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009595 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009596 fi
9597 done
9598fi
9599fi
9600
Matthias Kloseb9621712010-04-24 17:59:49 +00009601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9602$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009603
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009604# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009605
9606
Matthias Kloseb9621712010-04-24 17:59:49 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9608$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009611if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612 withval=$with_signal_module;
9613fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009614
9615
9616if test -z "$with_signal_module"
9617then with_signal_module="yes"
9618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9620$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009621
9622if test "${with_signal_module}" = "yes"; then
9623 USE_SIGNAL_MODULE=""
9624 SIGNAL_OBJS=""
9625else
9626 USE_SIGNAL_MODULE="#"
9627 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9628fi
9629
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009630# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009631
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009632USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634
Martin v. Löwis11437992002-04-12 09:54:03 +00009635
9636# Templates for things AC_DEFINEd more than once.
9637# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009638
9639
Martin v. Löwis11437992002-04-12 09:54:03 +00009640
Matthias Kloseb9621712010-04-24 17:59:49 +00009641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9642$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009645if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646 withval=$with_threads;
9647fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009648
9649
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009650# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654 withval=$with_thread; with_threads=$with_thread
9655fi
9656
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009657
9658if test -z "$with_threads"
9659then with_threads="yes"
9660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9662$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009663
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009664
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009665if test "$with_threads" = "no"
9666then
9667 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009668elif test "$ac_cv_pthread_is_default" = yes
9669then
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009671
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009672 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009674
9675 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009677elif test "$ac_cv_kpthread" = "yes"
9678then
9679 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009680 if test "$ac_cv_cxx_thread" = "yes"; then
9681 CXX="$CXX -Kpthread"
9682 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009684
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009685 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009686 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009687elif test "$ac_cv_kthread" = "yes"
9688then
9689 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009690 if test "$ac_cv_cxx_thread" = "yes"; then
9691 CXX="$CXX -Kthread"
9692 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009694
9695 posix_threads=yes
9696 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009697elif test "$ac_cv_pthread" = "yes"
9698then
9699 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009700 if test "$ac_cv_cxx_thread" = "yes"; then
9701 CXX="$CXX -pthread"
9702 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009704
9705 posix_threads=yes
9706 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009707else
9708 if test ! -z "$with_threads" -a -d "$with_threads"
9709 then LDFLAGS="$LDFLAGS -L$with_threads"
9710 fi
9711 if test ! -z "$withval" -a -d "$withval"
9712 then LDFLAGS="$LDFLAGS -L$withval"
9713 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009714
9715 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009716 # define _POSIX_THREADS in unistd.h. Some apparently don't
9717 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9719$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009721/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009722
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009723#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009724#ifdef _POSIX_THREADS
9725yes
9726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009727
9728_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009731 unistd_defines_pthreads=yes
9732else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009733 unistd_defines_pthreads=no
9734fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009735rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009736
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9738$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009739
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009741
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009742 # Just looking for pthread_create in libpthread is not enough:
9743 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9744 # So we really have to include pthread.h, and then link.
9745 _libs=$LIBS
9746 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9748$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009750/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009751
9752#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009753#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009754
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009755void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009756int
9757main ()
9758{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009759
9760pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ;
9762 return 0;
9763}
9764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009766
Matthias Kloseb9621712010-04-24 17:59:49 +00009767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9768$as_echo "yes" >&6; }
9769 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009770
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009771 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009772 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009773else
Martin v. Löwis11437992002-04-12 09:54:03 +00009774
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009775 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009777if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009778 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009779
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009780 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009781 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009782else
Guido van Rossumad678af1998-10-02 14:42:15 +00009783
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9785$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009786if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009790LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794/* Override any GCC internal prototype to avoid an error.
9795 Use char because int might match the return type of a GCC
9796 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797#ifdef __cplusplus
9798extern "C"
9799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009800char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009801int
9802main ()
9803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 ;
9806 return 0;
9807}
9808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009809if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009811else
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009814rm -f core conftest.err conftest.$ac_objext \
9815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009816LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9819$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009820if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009822
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009823 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009824 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009825 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009826else
Greg Steinadf63d62000-07-05 10:38:09 +00009827
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9829$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009830if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009832else
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009834LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009844char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009860LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9863$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009864if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009865 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009866
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009867 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009868 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009869 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009870else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009871
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9873$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009874if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009876else
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009878LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882/* Override any GCC internal prototype to avoid an error.
9883 Use char because int might match the return type of a GCC
9884 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009885#ifdef __cplusplus
9886extern "C"
9887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009888char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009889int
9890main ()
9891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 ;
9894 return 0;
9895}
9896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009897if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009899else
Matthias Kloseb9621712010-04-24 17:59:49 +00009900 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009902rm -f core conftest.err conftest.$ac_objext \
9903 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009904LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9907$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009908if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009910
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009911 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009912 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009913 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009914else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009915
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9917$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009918if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009919 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009920else
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009922LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926/* Override any GCC internal prototype to avoid an error.
9927 Use char because int might match the return type of a GCC
9928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009929#ifdef __cplusplus
9930extern "C"
9931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009932char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009933int
9934main ()
9935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009937 ;
9938 return 0;
9939}
9940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009943else
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009946rm -f core conftest.err conftest.$ac_objext \
9947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009948LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9951$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009952if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009953 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009954
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009955 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009956 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009957 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009958else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009959
Martin v. Löwis130fb172001-07-19 11:00:41 +00009960 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009961fi
9962
Guido van Rossum627b2d71993-12-24 10:39:16 +00009963
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009964fi
9965
Guido van Rossum0be3e491997-05-22 20:33:33 +00009966fi
9967
Guido van Rossum49545951997-12-02 19:28:29 +00009968fi
9969
Guido van Rossumb93a8621998-05-07 13:27:32 +00009970fi
9971
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009973rm -f core conftest.err conftest.$ac_objext \
9974 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009975
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9977$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009978if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009980else
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009982LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986/* Override any GCC internal prototype to avoid an error.
9987 Use char because int might match the return type of a GCC
9988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009989#ifdef __cplusplus
9990extern "C"
9991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009992char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009993int
9994main ()
9995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009997 ;
9998 return 0;
9999}
10000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010003else
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010006rm -f core conftest.err conftest.$ac_objext \
10007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010008LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10011$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010012if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010014
Martin v. Löwis130fb172001-07-19 11:00:41 +000010015 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010016 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010017 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010018fi
10019
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010020
Neal Norwitza978ab02002-11-02 16:58:05 +000010021 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10023$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010024if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010026else
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010028LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032/* Override any GCC internal prototype to avoid an error.
10033 Use char because int might match the return type of a GCC
10034 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010035#ifdef __cplusplus
10036extern "C"
10037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010038char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010039int
10040main ()
10041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ;
10044 return 0;
10045}
10046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010049else
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010052rm -f core conftest.err conftest.$ac_objext \
10053 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010054LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10057$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010058if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010060
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010061 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010062 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010063 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010064fi
10065
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010066 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010067fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010068
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010069if test "$posix_threads" = "yes"; then
10070 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010071
Matthias Kloseb9621712010-04-24 17:59:49 +000010072$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010073
10074 fi
10075
10076 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10077 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010078 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010079$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010080
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010081 ;;
10082 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010083$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010084
10085 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010086 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010087$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010088
10089 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010090 esac
10091
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10093$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010094 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010096else
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010098 ac_cv_pthread_system_supported=no
10099else
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010101/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010102
10103 #include <stdio.h>
10104 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010105 void *foo(void *parm) {
10106 return NULL;
10107 }
10108 main() {
10109 pthread_attr_t attr;
10110 pthread_t id;
10111 if (pthread_attr_init(&attr)) exit(-1);
10112 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10113 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10114 exit(0);
10115 }
10116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010118 ac_cv_pthread_system_supported=yes
10119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10123 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010124fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126
Guido van Rossum627b2d71993-12-24 10:39:16 +000010127fi
10128
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10130$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010131 if test "$ac_cv_pthread_system_supported" = "yes"; then
10132
Matthias Kloseb9621712010-04-24 17:59:49 +000010133$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010134
10135 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010136 for ac_func in pthread_sigmask
10137do :
10138 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010139if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010140 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010141#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010142_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010143 case $ac_sys_system in
10144 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010145
Matthias Kloseb9621712010-04-24 17:59:49 +000010146$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010147
10148 ;;
10149 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010150fi
10151done
10152
Christian Heimesf77b4b22013-08-21 13:26:05 +020010153 for ac_func in pthread_atfork
10154do :
10155 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10156if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10157 cat >>confdefs.h <<_ACEOF
10158#define HAVE_PTHREAD_ATFORK 1
10159_ACEOF
10160
10161fi
10162done
10163
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010164fi
10165
10166
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010167# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010168
Matthias Kloseb9621712010-04-24 17:59:49 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10170$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010172if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010173 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010174 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10176$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010177 ipv6=no
10178 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10180$as_echo "yes" >&6; }
10181 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010182
10183 ipv6=yes
10184 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010186else
Martin v. Löwis11437992002-04-12 09:54:03 +000010187
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010189/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010190 /* AF_INET6 available check */
10191#include <sys/types.h>
10192#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010193int
10194main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010196int domain = AF_INET6;
10197 ;
10198 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010199}
Martin v. Löwis11437992002-04-12 09:54:03 +000010200_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010201if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010202
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10204$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010205 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010206
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010207else
Matthias Kloseb159a552010-04-25 21:00:44 +000010208
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010211 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010212
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010213fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010216if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10218$as_echo_n "checking if RFC2553 API is available... " >&6; }
10219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010221
10222 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010223#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010224int
10225main ()
10226{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010227struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010228 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 ;
10230 return 0;
10231}
Matthias Kloseb159a552010-04-25 21:00:44 +000010232
Martin v. Löwis11437992002-04-12 09:54:03 +000010233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010234if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010235
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010237$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010238 ipv6=yes
10239
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010240else
Matthias Kloseb159a552010-04-25 21:00:44 +000010241
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010243$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010244 ipv6=no
10245
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010248fi
10249
10250if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010252
10253fi
10254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255fi
10256
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010257
10258ipv6type=unknown
10259ipv6lib=none
10260ipv6trylibc=no
10261
10262if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10264$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010265 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10266 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010267 case $i in
10268 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010271
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010272#include <netinet/in.h>
10273#ifdef IPV6_INRIA_VERSION
10274yes
10275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010276_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010279 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010280fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010281rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010282
10283 ;;
10284 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010286/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010287
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010288#include <netinet/in.h>
10289#ifdef __KAME__
10290yes
10291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010292_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010293if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010295 ipv6type=$i;
10296 ipv6lib=inet6
10297 ipv6libdir=/usr/local/v6/lib
10298 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010299fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010300rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010301
10302 ;;
10303 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010306
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010307#include <features.h>
10308#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10309yes
10310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010311_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010312if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010314 ipv6type=$i;
10315 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010316fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010317rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010318
10319 ;;
10320 linux-inet6)
10321 if test -d /usr/inet6; then
10322 ipv6type=$i
10323 ipv6lib=inet6
10324 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010325 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010326 fi
10327 ;;
10328 solaris)
10329 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010330 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010331 ipv6type=$i
10332 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010333 fi
10334 fi
10335 ;;
10336 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010338/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010339
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010340#include <sys/param.h>
10341#ifdef _TOSHIBA_INET6
10342yes
10343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010344_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010347 ipv6type=$i;
10348 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010349 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010350fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010351rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010352
10353 ;;
10354 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010356/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010357
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010358#include </usr/local/v6/include/sys/v6config.h>
10359#ifdef __V6D__
10360yes
10361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010362_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010365 ipv6type=$i;
10366 ipv6lib=v6;
10367 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010368 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010369fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010370rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010371
10372 ;;
10373 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010375/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010376
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010377#include <sys/param.h>
10378#ifdef _ZETA_MINAMI_INET6
10379yes
10380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010381_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010383 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010384 ipv6type=$i;
10385 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010386 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010387fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010388rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010389
10390 ;;
10391 esac
10392 if test "$ipv6type" != "unknown"; then
10393 break
10394 fi
10395 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10397$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010398fi
10399
10400if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10401 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10402 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10403 echo "using lib$ipv6lib"
10404 else
10405 if test $ipv6trylibc = "yes"; then
10406 echo "using libc"
10407 else
10408 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10409 echo "You need to fetch lib$ipv6lib.a from appropriate"
10410 echo 'ipv6 kit and compile beforehand.'
10411 exit 1
10412 fi
10413 fi
10414fi
10415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10417$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010419/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010420
10421 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010422int
10423main ()
10424{
10425FSIORefNum fRef = 0
10426 ;
10427 return 0;
10428}
Matthias Kloseb159a552010-04-25 21:00:44 +000010429
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010431if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010432
Matthias Kloseb159a552010-04-25 21:00:44 +000010433
Matthias Kloseb9621712010-04-24 17:59:49 +000010434$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010435
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10437$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010438
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010439else
Matthias Kloseb159a552010-04-25 21:00:44 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010443
10444fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10446
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010447# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10449$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010452if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453 withval=$with_doc_strings;
10454fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010455
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010456
10457if test -z "$with_doc_strings"
10458then with_doc_strings="yes"
10459fi
10460if test "$with_doc_strings" != "no"
10461then
10462
Matthias Kloseb9621712010-04-24 17:59:49 +000010463$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010464
10465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10467$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010468
Antoine Pitrou042b1282010-08-13 21:15:58 +000010469# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10471$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010474if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010476if test "$withval" != no
10477then
10478
Matthias Kloseb9621712010-04-24 17:59:49 +000010479$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010480
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10482$as_echo "yes" >&6; }
10483else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10484$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010485fi
10486else
Matthias Kloseb9621712010-04-24 17:59:49 +000010487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10488$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010489fi
10490
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010491
10492# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10494$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010497if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498 withval=$with_pymalloc;
10499fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010500
Neil Schemenauera35c6882001-02-27 04:45:05 +000010501
Neil Schemenauer16c22972002-03-22 15:34:49 +000010502if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010503then
10504 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010505fi
10506if test "$with_pymalloc" != "no"
10507then
Martin v. Löwis11437992002-04-12 09:54:03 +000010508
Matthias Kloseb9621712010-04-24 17:59:49 +000010509$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010510
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010511 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10514$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010515
Benjamin Peterson05159c42009-12-03 03:01:27 +000010516# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10518$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010519
10520# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010521if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010522 withval=$with_valgrind;
10523else
10524 with_valgrind=no
10525fi
10526
Matthias Kloseb9621712010-04-24 17:59:49 +000010527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10528$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010529if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 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 +020010531if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010532
Matthias Kloseb9621712010-04-24 17:59:49 +000010533$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010534
10535else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010536 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010537
10538fi
10539
10540
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010541 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010542fi
10543
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010544# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010545
Guido van Rossum98935bf2001-09-05 19:13:16 +000010546DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010547
Guido van Rossume97ee181999-12-20 21:27:22 +000010548# the dlopen() function means we might want to use dynload_shlib.o. some
10549# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010550for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010551do :
10552 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010553if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010555#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010556_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010557
Guido van Rossume97ee181999-12-20 21:27:22 +000010558fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010559done
Guido van Rossume97ee181999-12-20 21:27:22 +000010560
Michael W. Hudson54241132001-12-07 15:38:26 +000010561
Guido van Rossume97ee181999-12-20 21:27:22 +000010562# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10563# loading of modules.
10564
Matthias Kloseb9621712010-04-24 17:59:49 +000010565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10566$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010567if test -z "$DYNLOADFILE"
10568then
10569 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010570 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10571 if test "$ac_cv_func_dlopen" = yes
10572 then DYNLOADFILE="dynload_shlib.o"
10573 else DYNLOADFILE="dynload_aix.o"
10574 fi
10575 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010576 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010577 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10578 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010579 *)
10580 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10581 # out any dynamic loading
10582 if test "$ac_cv_func_dlopen" = yes
10583 then DYNLOADFILE="dynload_shlib.o"
10584 else DYNLOADFILE="dynload_stub.o"
10585 fi
10586 ;;
10587 esac
10588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10590$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010591if test "$DYNLOADFILE" != "dynload_stub.o"
10592then
Martin v. Löwis11437992002-04-12 09:54:03 +000010593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010595
10596fi
10597
Neil Schemenauer4e425612001-06-19 15:44:15 +000010598# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10599
Michael W. Hudson54241132001-12-07 15:38:26 +000010600
Matthias Kloseb9621712010-04-24 17:59:49 +000010601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10602$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010603if test -z "$MACHDEP_OBJS"
10604then
Jack Jansene578a632001-08-15 01:27:14 +000010605 MACHDEP_OBJS=$extra_machdep_objs
10606else
10607 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010608fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010609if test -z "$MACHDEP_OBJS"; then
10610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10611$as_echo "none" >&6; }
10612else
10613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10614$as_echo "$MACHDEP_OBJS" >&6; }
10615fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010616
Guido van Rossum627b2d71993-12-24 10:39:16 +000010617# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010618for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010619 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010620 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010621 futimens futimes gai_strerror \
10622 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010623 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010624 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010625 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10626 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010627 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010628 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010629 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010630 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010631 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010632 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010633 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10634 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010635 sigaction sigaltstack siginterrupt sigpending sigrelse \
10636 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010637 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010638 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010639 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010640do :
10641 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10642ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010643if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010645#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010646_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010647
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010648fi
10649done
10650
Michael W. Hudson54241132001-12-07 15:38:26 +000010651
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010652ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10653 #include <dirent.h>
10654"
10655if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10656
10657$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10658
10659fi
10660
10661
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010662# For some functions, having a definition is not sufficient, since
10663# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10665$as_echo_n "checking for chroot... " >&6; }
10666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010668#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010669int
10670main ()
10671{
10672void *x=chroot
10673 ;
10674 return 0;
10675}
10676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010680
Matthias Kloseb159a552010-04-25 21:00:44 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010682$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10685$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010686
10687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10690$as_echo_n "checking for link... " >&6; }
10691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010693#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010694int
10695main ()
10696{
10697void *x=link
10698 ;
10699 return 0;
10700}
10701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010703
Matthias Kloseb9621712010-04-24 17:59:49 +000010704$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010705
Matthias Kloseb159a552010-04-25 21:00:44 +000010706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010707$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010708else
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010711
10712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10715$as_echo_n "checking for symlink... " >&6; }
10716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010717/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010718#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010719int
10720main ()
10721{
10722void *x=symlink
10723 ;
10724 return 0;
10725}
10726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010727if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010728
Matthias Kloseb9621712010-04-24 17:59:49 +000010729$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010730
Matthias Kloseb159a552010-04-25 21:00:44 +000010731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010732$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010733else
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10735$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010736
10737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10740$as_echo_n "checking for fchdir... " >&6; }
10741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010743#include <unistd.h>
10744int
10745main ()
10746{
10747void *x=fchdir
10748 ;
10749 return 0;
10750}
10751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010752if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010755
Matthias Kloseb159a552010-04-25 21:00:44 +000010756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010757$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010758else
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10760$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010761
10762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10765$as_echo_n "checking for fsync... " >&6; }
10766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010768#include <unistd.h>
10769int
10770main ()
10771{
10772void *x=fsync
10773 ;
10774 return 0;
10775}
10776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010778
Matthias Kloseb9621712010-04-24 17:59:49 +000010779$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010780
Matthias Kloseb159a552010-04-25 21:00:44 +000010781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010782$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010783else
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010786
10787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10790$as_echo_n "checking for fdatasync... " >&6; }
10791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010792/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010793#include <unistd.h>
10794int
10795main ()
10796{
10797void *x=fdatasync
10798 ;
10799 return 0;
10800}
10801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010802if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010805
Matthias Kloseb159a552010-04-25 21:00:44 +000010806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010808else
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10810$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010811
10812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10815$as_echo_n "checking for epoll... " >&6; }
10816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010817/* end confdefs.h. */
10818#include <sys/epoll.h>
10819int
10820main ()
10821{
10822void *x=epoll_create
10823 ;
10824 return 0;
10825}
10826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010827if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010830
Matthias Kloseb159a552010-04-25 21:00:44 +000010831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010832$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010833else
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010836
10837fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10840$as_echo_n "checking for epoll_create1... " >&6; }
10841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10842/* end confdefs.h. */
10843#include <sys/epoll.h>
10844int
10845main ()
10846{
10847void *x=epoll_create1
10848 ;
10849 return 0;
10850}
10851_ACEOF
10852if ac_fn_c_try_compile "$LINENO"; then :
10853
10854$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10855
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10857$as_echo "yes" >&6; }
10858else
10859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10860$as_echo "no" >&6; }
10861
10862fi
10863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10865$as_echo_n "checking for kqueue... " >&6; }
10866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010867/* end confdefs.h. */
10868
10869#include <sys/types.h>
10870#include <sys/event.h>
10871
10872int
10873main ()
10874{
10875int x=kqueue()
10876 ;
10877 return 0;
10878}
10879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010880if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010883
Matthias Kloseb159a552010-04-25 21:00:44 +000010884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010885$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010886else
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010889
10890fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10893$as_echo_n "checking for prlimit... " >&6; }
10894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10895/* end confdefs.h. */
10896
10897#include <sys/time.h>
10898#include <sys/resource.h>
10899
10900int
10901main ()
10902{
10903void *x=prlimit
10904 ;
10905 return 0;
10906}
10907_ACEOF
10908if ac_fn_c_try_compile "$LINENO"; then :
10909
10910$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10911
10912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10913$as_echo "yes" >&6; }
10914else
10915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10916$as_echo "no" >&6; }
10917
10918fi
10919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10920
Martin v. Löwisd5843682002-11-21 20:41:28 +000010921# On some systems (eg. FreeBSD 5), we would find a definition of the
10922# functions ctermid_r, setgroups in the library, but no prototype
10923# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10924# address to avoid compiler warnings and potential miscompilations
10925# because of the missing prototypes.
10926
Matthias Kloseb9621712010-04-24 17:59:49 +000010927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10928$as_echo_n "checking for ctermid_r... " >&6; }
10929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010930/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010931
Martin v. Löwisd5843682002-11-21 20:41:28 +000010932#include <stdio.h>
10933
Martin v. Löwisd5843682002-11-21 20:41:28 +000010934int
10935main ()
10936{
10937void* p = ctermid_r
10938 ;
10939 return 0;
10940}
10941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010942if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010945
Matthias Kloseb159a552010-04-25 21:00:44 +000010946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010947$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010948else
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010951
10952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10954
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10956$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010957if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010958 $as_echo_n "(cached) " >&6
10959else
10960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010961/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010962#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010963int
10964main ()
10965{
10966void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010967
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010968 ;
10969 return 0;
10970}
10971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010972if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010973 ac_cv_flock_decl=yes
10974else
10975 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010976
10977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010979
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010980fi
10981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10982$as_echo "$ac_cv_flock_decl" >&6; }
10983if test "x${ac_cv_flock_decl}" = xyes; then
10984 for ac_func in flock
10985do :
10986 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010987if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010988 cat >>confdefs.h <<_ACEOF
10989#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010990_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010991
Antoine Pitroua3000072010-09-07 14:52:42 +000010992else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010994$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010995if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010996 $as_echo_n "(cached) " >&6
10997else
10998 ac_check_lib_save_LIBS=$LIBS
10999LIBS="-lbsd $LIBS"
11000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11001/* end confdefs.h. */
11002
11003/* Override any GCC internal prototype to avoid an error.
11004 Use char because int might match the return type of a GCC
11005 builtin and then its argument prototype would still apply. */
11006#ifdef __cplusplus
11007extern "C"
11008#endif
11009char flock ();
11010int
11011main ()
11012{
11013return flock ();
11014 ;
11015 return 0;
11016}
11017_ACEOF
11018if ac_fn_c_try_link "$LINENO"; then :
11019 ac_cv_lib_bsd_flock=yes
11020else
11021 ac_cv_lib_bsd_flock=no
11022fi
11023rm -f core conftest.err conftest.$ac_objext \
11024 conftest$ac_exeext conftest.$ac_ext
11025LIBS=$ac_check_lib_save_LIBS
11026fi
11027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11028$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011029if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011030 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011031
11032
11033$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11034
11035
11036fi
11037
11038
11039fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011040done
11041
Antoine Pitroua3000072010-09-07 14:52:42 +000011042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043
Matthias Kloseb9621712010-04-24 17:59:49 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11045$as_echo_n "checking for getpagesize... " >&6; }
11046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011047/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011048
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011049#include <unistd.h>
11050
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011051int
11052main ()
11053{
11054void* p = getpagesize
11055 ;
11056 return 0;
11057}
11058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011059if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011062
Matthias Kloseb159a552010-04-25 21:00:44 +000011063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011064$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011065else
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11067$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011068
11069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011071
Victor Stinner984890f2011-11-24 13:53:38 +010011072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11073$as_echo_n "checking for broken unsetenv... " >&6; }
11074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11075/* end confdefs.h. */
11076
11077#include <stdlib.h>
11078
11079int
11080main ()
11081{
11082int res = unsetenv("DUMMY")
11083 ;
11084 return 0;
11085}
11086_ACEOF
11087if ac_fn_c_try_compile "$LINENO"; then :
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11089$as_echo "no" >&6; }
11090else
11091
11092$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11093
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11095$as_echo "yes" >&6; }
11096
11097fi
11098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11099
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011100for ac_prog in true
11101do
11102 # Extract the first word of "$ac_prog", so it can be a program name with args.
11103set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11105$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011106if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011107 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011108else
11109 if test -n "$TRUE"; then
11110 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11111else
11112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11113for as_dir in $PATH
11114do
11115 IFS=$as_save_IFS
11116 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011119 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011120 $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 +000011121 break 2
11122 fi
11123done
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011125IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011126
11127fi
11128fi
11129TRUE=$ac_cv_prog_TRUE
11130if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11132$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011133else
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11135$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011136fi
11137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011139 test -n "$TRUE" && break
11140done
11141test -n "$TRUE" || TRUE="/bin/true"
11142
11143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11145$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011146if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011148else
11149 ac_check_lib_save_LIBS=$LIBS
11150LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011152/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154/* Override any GCC internal prototype to avoid an error.
11155 Use char because int might match the return type of a GCC
11156 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011157#ifdef __cplusplus
11158extern "C"
11159#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011160char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011161int
11162main ()
11163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011165 ;
11166 return 0;
11167}
11168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011170 ac_cv_lib_c_inet_aton=yes
11171else
Matthias Kloseb9621712010-04-24 17:59:49 +000011172 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011174rm -f core conftest.err conftest.$ac_objext \
11175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011176LIBS=$ac_check_lib_save_LIBS
11177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11179$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011180if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011181 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011182else
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11184$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011185if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011187else
11188 ac_check_lib_save_LIBS=$LIBS
11189LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011191/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193/* Override any GCC internal prototype to avoid an error.
11194 Use char because int might match the return type of a GCC
11195 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011196#ifdef __cplusplus
11197extern "C"
11198#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011199char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011200int
11201main ()
11202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011204 ;
11205 return 0;
11206}
11207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011208if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011209 ac_cv_lib_resolv_inet_aton=yes
11210else
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011213rm -f core conftest.err conftest.$ac_objext \
11214 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011215LIBS=$ac_check_lib_save_LIBS
11216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11218$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011219if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011220 cat >>confdefs.h <<_ACEOF
11221#define HAVE_LIBRESOLV 1
11222_ACEOF
11223
11224 LIBS="-lresolv $LIBS"
11225
11226fi
11227
11228
11229fi
11230
11231
Christian Heimesd0764e22007-12-04 15:00:33 +000011232# On Tru64, chflags seems to be present, but calling it will
11233# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11235$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011236if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011238else
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011240 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011241else
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011243/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011244
Christian Heimesd0764e22007-12-04 15:00:33 +000011245#include <sys/stat.h>
11246#include <unistd.h>
11247int main(int argc, char*argv[])
11248{
11249 if(chflags(argv[0], 0) != 0)
11250 return 1;
11251 return 0;
11252}
Ned Deily3eb67d52011-06-28 00:00:28 -070011253
Christian Heimesd0764e22007-12-04 15:00:33 +000011254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011255if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011256 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011257else
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11261 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011262fi
11263
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11267$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011268if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011269 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011270if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011271 ac_cv_have_chflags="yes"
11272else
11273 ac_cv_have_chflags="no"
11274fi
11275
11276fi
11277if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011280
11281fi
11282
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11284$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011285if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011287else
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011289 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011290else
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011292/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011293
Christian Heimesd0764e22007-12-04 15:00:33 +000011294#include <sys/stat.h>
11295#include <unistd.h>
11296int main(int argc, char*argv[])
11297{
11298 if(lchflags(argv[0], 0) != 0)
11299 return 1;
11300 return 0;
11301}
Ned Deily3eb67d52011-06-28 00:00:28 -070011302
Christian Heimesd0764e22007-12-04 15:00:33 +000011303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011304if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011305 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011306else
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011311fi
11312
11313
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11316$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011317if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011319if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011320 ac_cv_have_lchflags="yes"
11321else
11322 ac_cv_have_lchflags="no"
11323fi
11324
11325fi
11326if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011327
Matthias Kloseb9621712010-04-24 17:59:49 +000011328$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011329
11330fi
11331
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011332case $ac_sys_system/$ac_sys_release in
11333Darwin/*)
11334 _CUR_CFLAGS="${CFLAGS}"
11335 _CUR_LDFLAGS="${LDFLAGS}"
11336 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11337 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11338 ;;
11339esac
11340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11342$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011343if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011344 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011345else
11346 ac_check_lib_save_LIBS=$LIBS
11347LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011349/* end confdefs.h. */
11350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351/* Override any GCC internal prototype to avoid an error.
11352 Use char because int might match the return type of a GCC
11353 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011354#ifdef __cplusplus
11355extern "C"
11356#endif
11357char inflateCopy ();
11358int
11359main ()
11360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011361return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011367 ac_cv_lib_z_inflateCopy=yes
11368else
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011371rm -f core conftest.err conftest.$ac_objext \
11372 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011373LIBS=$ac_check_lib_save_LIBS
11374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11376$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011377if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011380
11381fi
11382
11383
11384case $ac_sys_system/$ac_sys_release in
11385Darwin/*)
11386 CFLAGS="${_CUR_CFLAGS}"
11387 LDFLAGS="${_CUR_LDFLAGS}"
11388 ;;
11389esac
11390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11392$as_echo_n "checking for hstrerror... " >&6; }
11393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011394/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011395
Martin v. Löwise9416172003-05-03 10:12:45 +000011396#include <netdb.h>
11397
Martin v. Löwise9416172003-05-03 10:12:45 +000011398int
11399main ()
11400{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011401void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011402 ;
11403 return 0;
11404}
11405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011409
Matthias Kloseb159a552010-04-25 21:00:44 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011412else
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011415
11416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011417rm -f core conftest.err conftest.$ac_objext \
11418 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11421$as_echo_n "checking for inet_aton... " >&6; }
11422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011423/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011424
Martin v. Löwis86d66262006-02-17 08:40:11 +000011425#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011426#include <sys/socket.h>
11427#include <netinet/in.h>
11428#include <arpa/inet.h>
11429
Martin v. Löwise9416172003-05-03 10:12:45 +000011430int
11431main ()
11432{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011433void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011434 ;
11435 return 0;
11436}
11437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011438if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011441
Matthias Kloseb159a552010-04-25 21:00:44 +000011442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011443$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011444else
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011447
11448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011449rm -f core conftest.err conftest.$ac_objext \
11450 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451
Matthias Kloseb9621712010-04-24 17:59:49 +000011452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11453$as_echo_n "checking for inet_pton... " >&6; }
11454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011455/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011456
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011457#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011458#include <sys/socket.h>
11459#include <netinet/in.h>
11460#include <arpa/inet.h>
11461
Martin v. Löwise9416172003-05-03 10:12:45 +000011462int
11463main ()
11464{
11465void* p = inet_pton
11466 ;
11467 return 0;
11468}
11469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011473
Matthias Kloseb159a552010-04-25 21:00:44 +000011474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011475$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011476else
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11478$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011479
11480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011482
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011483# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11485$as_echo_n "checking for setgroups... " >&6; }
11486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011487/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011488
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011489#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011490#ifdef HAVE_GRP_H
11491#include <grp.h>
11492#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011493
Martin v. Löwisd5843682002-11-21 20:41:28 +000011494int
11495main ()
11496{
11497void* p = setgroups
11498 ;
11499 return 0;
11500}
11501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011505
Matthias Kloseb159a552010-04-25 21:00:44 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011507$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011508else
Matthias Kloseb9621712010-04-24 17:59:49 +000011509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11510$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011511
11512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011514
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011515# check for openpty and forkpty
11516
11517for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011518do :
11519 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011520if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011522#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011523_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011524
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011525else
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11527$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011528if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011529 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011530else
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011532LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536/* 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011539#ifdef __cplusplus
11540extern "C"
11541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011542char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011543int
11544main ()
11545{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 ;
11548 return 0;
11549}
11550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011551if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011553else
Matthias Kloseb9621712010-04-24 17:59:49 +000011554 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011556rm -f core conftest.err conftest.$ac_objext \
11557 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011558LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11561$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011562if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011564 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011565else
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11567$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011568if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011570else
11571 ac_check_lib_save_LIBS=$LIBS
11572LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011574/* end confdefs.h. */
11575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576/* Override any GCC internal prototype to avoid an error.
11577 Use char because int might match the return type of a GCC
11578 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011579#ifdef __cplusplus
11580extern "C"
11581#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011582char openpty ();
11583int
11584main ()
11585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011591if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011592 ac_cv_lib_bsd_openpty=yes
11593else
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011596rm -f core conftest.err conftest.$ac_objext \
11597 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011598LIBS=$ac_check_lib_save_LIBS
11599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11601$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011602if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011604 LIBS="$LIBS -lbsd"
11605fi
11606
11607
11608fi
11609
Fred Drake8cef4cf2000-06-28 16:40:38 +000011610
11611fi
11612done
11613
11614for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011615do :
11616 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011617if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011618 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011619#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011620_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011621
Fred Drake8cef4cf2000-06-28 16:40:38 +000011622else
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11624$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011625if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011626 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011627else
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011629LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011633/* Override any GCC internal prototype to avoid an error.
11634 Use char because int might match the return type of a GCC
11635 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011636#ifdef __cplusplus
11637extern "C"
11638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011639char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011640int
11641main ()
11642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011644 ;
11645 return 0;
11646}
11647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011648if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011650else
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011653rm -f core conftest.err conftest.$ac_objext \
11654 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011655LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11658$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011659if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011660 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011661 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011662else
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11664$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011665if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011667else
11668 ac_check_lib_save_LIBS=$LIBS
11669LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011671/* end confdefs.h. */
11672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011673/* Override any GCC internal prototype to avoid an error.
11674 Use char because int might match the return type of a GCC
11675 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011676#ifdef __cplusplus
11677extern "C"
11678#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011679char forkpty ();
11680int
11681main ()
11682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011683return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011684 ;
11685 return 0;
11686}
11687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011689 ac_cv_lib_bsd_forkpty=yes
11690else
Matthias Kloseb9621712010-04-24 17:59:49 +000011691 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011693rm -f core conftest.err conftest.$ac_objext \
11694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011695LIBS=$ac_check_lib_save_LIBS
11696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11698$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011699if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011701 LIBS="$LIBS -lbsd"
11702fi
11703
11704
11705fi
11706
Fred Drake8cef4cf2000-06-28 16:40:38 +000011707
11708fi
11709done
11710
Jack Jansendd19cf82001-12-06 22:36:17 +000011711
Christian Heimesb186d002008-03-18 15:15:01 +000011712# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011713for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011714do :
11715 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011716if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011717 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011718#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011719_ACEOF
11720
11721fi
11722done
11723
11724
Michael W. Hudson54241132001-12-07 15:38:26 +000011725# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011726for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011727do :
11728 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11729ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011730if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011732#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011733_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011735fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011736done
11737
Michael W. Hudson54241132001-12-07 15:38:26 +000011738
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011739ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011740if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011741 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011742
Martin v. Löwis1142de32002-03-29 16:28:31 +000011743else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011745 *" dup2.$ac_objext "* ) ;;
11746 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011748esac
11749
Martin v. Löwis1142de32002-03-29 16:28:31 +000011750fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011751
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011752ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011753if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011754 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11755
11756else
11757 case " $LIBOBJS " in
11758 *" strdup.$ac_objext "* ) ;;
11759 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11760 ;;
11761esac
11762
11763fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011764
11765
11766for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011767do :
11768 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011769if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011770 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011771#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011774/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011775#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011776int
11777main ()
11778{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 ;
11781 return 0;
11782}
11783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011784if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011787
Guido van Rossum627b2d71993-12-24 10:39:16 +000011788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011790
Guido van Rossum627b2d71993-12-24 10:39:16 +000011791fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011792done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011793
Jack Jansen150753c2003-03-29 22:07:47 +000011794for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011795do :
11796 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011797if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011798 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011799#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011803#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011804int
11805main ()
11806{
11807setpgrp(0,0);
11808 ;
11809 return 0;
11810}
11811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011812if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011815
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011818
11819fi
11820done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011821
Thomas Wouters3a584202000-08-05 23:28:51 +000011822for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011823do :
11824 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011825if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011826 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011830/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011831#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011832int
11833main ()
11834{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011835gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_compile "$LINENO"; then :
11841
Guido van Rossum627b2d71993-12-24 10:39:16 +000011842else
Skip Montanaro6dead952003-09-25 14:50:04 +000011843
Matthias Kloseb9621712010-04-24 17:59:49 +000011844$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011845
Martin v. Löwis11437992002-04-12 09:54:03 +000011846
Guido van Rossum627b2d71993-12-24 10:39:16 +000011847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011849
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011850fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011851done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011852
Michael W. Hudson54241132001-12-07 15:38:26 +000011853
Victor Stinnere0be4232011-10-25 13:06:09 +020011854for ac_func in clock_gettime
11855do :
11856 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11857if test "x$ac_cv_func_clock_gettime" = xyes; then :
11858 cat >>confdefs.h <<_ACEOF
11859#define HAVE_CLOCK_GETTIME 1
11860_ACEOF
11861
11862else
11863
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11865$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11866if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11867 $as_echo_n "(cached) " >&6
11868else
11869 ac_check_lib_save_LIBS=$LIBS
11870LIBS="-lrt $LIBS"
11871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11872/* end confdefs.h. */
11873
11874/* Override any GCC internal prototype to avoid an error.
11875 Use char because int might match the return type of a GCC
11876 builtin and then its argument prototype would still apply. */
11877#ifdef __cplusplus
11878extern "C"
11879#endif
11880char clock_gettime ();
11881int
11882main ()
11883{
11884return clock_gettime ();
11885 ;
11886 return 0;
11887}
11888_ACEOF
11889if ac_fn_c_try_link "$LINENO"; then :
11890 ac_cv_lib_rt_clock_gettime=yes
11891else
11892 ac_cv_lib_rt_clock_gettime=no
11893fi
11894rm -f core conftest.err conftest.$ac_objext \
11895 conftest$ac_exeext conftest.$ac_ext
11896LIBS=$ac_check_lib_save_LIBS
11897fi
11898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11899$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11900if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11901
11902 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11903
11904
11905$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11906
11907
11908fi
11909
11910
11911fi
11912done
11913
11914
11915for ac_func in clock_getres
11916do :
11917 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11918if test "x$ac_cv_func_clock_getres" = xyes; then :
11919 cat >>confdefs.h <<_ACEOF
11920#define HAVE_CLOCK_GETRES 1
11921_ACEOF
11922
11923else
11924
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11926$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11927if ${ac_cv_lib_rt_clock_getres+:} false; then :
11928 $as_echo_n "(cached) " >&6
11929else
11930 ac_check_lib_save_LIBS=$LIBS
11931LIBS="-lrt $LIBS"
11932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11933/* end confdefs.h. */
11934
11935/* Override any GCC internal prototype to avoid an error.
11936 Use char because int might match the return type of a GCC
11937 builtin and then its argument prototype would still apply. */
11938#ifdef __cplusplus
11939extern "C"
11940#endif
11941char clock_getres ();
11942int
11943main ()
11944{
11945return clock_getres ();
11946 ;
11947 return 0;
11948}
11949_ACEOF
11950if ac_fn_c_try_link "$LINENO"; then :
11951 ac_cv_lib_rt_clock_getres=yes
11952else
11953 ac_cv_lib_rt_clock_getres=no
11954fi
11955rm -f core conftest.err conftest.$ac_objext \
11956 conftest$ac_exeext conftest.$ac_ext
11957LIBS=$ac_check_lib_save_LIBS
11958fi
11959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11960$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11961if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11962
11963 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11964
11965
11966fi
11967
11968
11969fi
11970done
11971
11972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11974$as_echo_n "checking for major... " >&6; }
11975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011977
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011978#if defined(MAJOR_IN_MKDEV)
11979#include <sys/mkdev.h>
11980#elif defined(MAJOR_IN_SYSMACROS)
11981#include <sys/sysmacros.h>
11982#else
11983#include <sys/types.h>
11984#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011985
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011986int
11987main ()
11988{
11989
11990 makedev(major(0),minor(0));
11991
11992 ;
11993 return 0;
11994}
11995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011997
11998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12002$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012003
12004else
Skip Montanaro6dead952003-09-25 14:50:04 +000012005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12007$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012008
12009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012010rm -f core conftest.err conftest.$ac_objext \
12011 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012012
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012013# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012014# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12016$as_echo_n "checking for getaddrinfo... " >&6; }
12017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012018/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012019
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012020#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012021#include <sys/socket.h>
12022#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012023#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012024
Martin v. Löwis11437992002-04-12 09:54:03 +000012025int
12026main ()
12027{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012028getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012034 have_getaddrinfo=yes
12035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012038rm -f core conftest.err conftest.$ac_objext \
12039 conftest$ac_exeext conftest.$ac_ext
12040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12041$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012042if test $have_getaddrinfo = yes
12043then
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12045$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012046 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012048else
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012050
12051if test "${enable_ipv6+set}" = set; then
12052 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12053else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012054 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012055fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012058/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012059
Stefan Krah19c21392012-11-22 23:47:32 +010012060#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012061#include <sys/types.h>
12062#include <netdb.h>
12063#include <string.h>
12064#include <sys/socket.h>
12065#include <netinet/in.h>
12066
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012067int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012068{
12069 int passive, gaierr, inet4 = 0, inet6 = 0;
12070 struct addrinfo hints, *ai, *aitop;
12071 char straddr[INET6_ADDRSTRLEN], strport[16];
12072
12073 for (passive = 0; passive <= 1; passive++) {
12074 memset(&hints, 0, sizeof(hints));
12075 hints.ai_family = AF_UNSPEC;
12076 hints.ai_flags = passive ? AI_PASSIVE : 0;
12077 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012078 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012079 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12080 (void)gai_strerror(gaierr);
12081 goto bad;
12082 }
12083 for (ai = aitop; ai; ai = ai->ai_next) {
12084 if (ai->ai_addr == NULL ||
12085 ai->ai_addrlen == 0 ||
12086 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12087 straddr, sizeof(straddr), strport, sizeof(strport),
12088 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12089 goto bad;
12090 }
12091 switch (ai->ai_family) {
12092 case AF_INET:
12093 if (strcmp(strport, "54321") != 0) {
12094 goto bad;
12095 }
12096 if (passive) {
12097 if (strcmp(straddr, "0.0.0.0") != 0) {
12098 goto bad;
12099 }
12100 } else {
12101 if (strcmp(straddr, "127.0.0.1") != 0) {
12102 goto bad;
12103 }
12104 }
12105 inet4++;
12106 break;
12107 case AF_INET6:
12108 if (strcmp(strport, "54321") != 0) {
12109 goto bad;
12110 }
12111 if (passive) {
12112 if (strcmp(straddr, "::") != 0) {
12113 goto bad;
12114 }
12115 } else {
12116 if (strcmp(straddr, "::1") != 0) {
12117 goto bad;
12118 }
12119 }
12120 inet6++;
12121 break;
12122 case AF_UNSPEC:
12123 goto bad;
12124 break;
12125 default:
12126 /* another family support? */
12127 break;
12128 }
12129 }
12130 }
12131
12132 if (!(inet4 == 0 || inet4 == 2))
12133 goto bad;
12134 if (!(inet6 == 0 || inet6 == 2))
12135 goto bad;
12136
12137 if (aitop)
12138 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012139 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012140
12141 bad:
12142 if (aitop)
12143 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012144 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012145}
12146
Martin v. Löwis11437992002-04-12 09:54:03 +000012147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012148if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012149 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012150else
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12154 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012157fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012158
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12162$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12163
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012164if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012165then
12166 if test $ipv6 = yes
12167 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012168 echo 'Fatal: You must get working getaddrinfo() function.'
12169 echo ' or you can specify "--disable-ipv6"'.
12170 exit 1
12171 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012172else
Martin v. Löwis11437992002-04-12 09:54:03 +000012173
Matthias Kloseb9621712010-04-24 17:59:49 +000012174$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012175
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012176fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012177
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012178for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012179do :
12180 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012181if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012183#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012184_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012185
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012186fi
12187done
12188
Michael W. Hudson54241132001-12-07 15:38:26 +000012189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012190# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12192$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012197/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012198#include <sys/types.h>
12199#include <sys/time.h>
12200#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012201
Martin v. Löwis11437992002-04-12 09:54:03 +000012202int
12203main ()
12204{
12205if ((struct tm *) 0)
12206return 0;
12207 ;
12208 return 0;
12209}
12210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012211if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012212 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12219$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012220if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012221
Matthias Kloseb9621712010-04-24 17:59:49 +000012222$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012223
12224fi
12225
Matthias Kloseb9621712010-04-24 17:59:49 +000012226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12227$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012228if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012230else
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012232/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012233#include <sys/types.h>
12234#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
Martin v. Löwis11437992002-04-12 09:54:03 +000012236int
12237main ()
12238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239struct tm tm;
12240 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012242 ;
12243 return 0;
12244}
12245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012246if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012247 ac_cv_struct_tm=time.h
12248else
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12254$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012255if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012258
12259fi
12260
Matthias Kloseb9621712010-04-24 17:59:49 +000012261ac_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 +000012262#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012263
Matthias Kloseb9621712010-04-24 17:59:49 +000012264"
Victor Stinnere0be4232011-10-25 13:06:09 +020012265if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012266
12267cat >>confdefs.h <<_ACEOF
12268#define HAVE_STRUCT_TM_TM_ZONE 1
12269_ACEOF
12270
12271
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012272fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012273
Martin v. Löwis11437992002-04-12 09:54:03 +000012274if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12275
Matthias Kloseb9621712010-04-24 17:59:49 +000012276$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012277
12278else
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12280"
Victor Stinnere0be4232011-10-25 13:06:09 +020012281if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283else
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285fi
12286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012288#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289_ACEOF
12290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12292$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012293if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295else
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012297/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012298#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299#if !HAVE_DECL_TZNAME
12300extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012302
Martin v. Löwis11437992002-04-12 09:54:03 +000012303int
12304main ()
12305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 ;
12308 return 0;
12309}
12310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012311if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012312 ac_cv_var_tzname=yes
12313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012316rm -f core conftest.err conftest.$ac_objext \
12317 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12320$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012321 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012322
Matthias Kloseb9621712010-04-24 17:59:49 +000012323$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012324
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012325 fi
12326fi
12327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328ac_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 +020012329if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
12331cat >>confdefs.h <<_ACEOF
12332#define HAVE_STRUCT_STAT_ST_RDEV 1
12333_ACEOF
12334
12335
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012336fi
12337
Matthias Kloseb9621712010-04-24 17:59:49 +000012338ac_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 +020012339if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012340
Martin v. Löwis11437992002-04-12 09:54:03 +000012341cat >>confdefs.h <<_ACEOF
12342#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12343_ACEOF
12344
12345
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012346fi
12347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348ac_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 +020012349if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012350
12351cat >>confdefs.h <<_ACEOF
12352#define HAVE_STRUCT_STAT_ST_FLAGS 1
12353_ACEOF
12354
12355
12356fi
12357
Matthias Kloseb9621712010-04-24 17:59:49 +000012358ac_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 +020012359if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012360
12361cat >>confdefs.h <<_ACEOF
12362#define HAVE_STRUCT_STAT_ST_GEN 1
12363_ACEOF
12364
12365
12366fi
12367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368ac_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 +020012369if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012370
12371cat >>confdefs.h <<_ACEOF
12372#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12373_ACEOF
12374
12375
12376fi
12377
Matthias Kloseb9621712010-04-24 17:59:49 +000012378ac_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 +020012379if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012380
Martin v. Löwis11437992002-04-12 09:54:03 +000012381cat >>confdefs.h <<_ACEOF
12382#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12383_ACEOF
12384
12385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012387
12388else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012390 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12392 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012393esac
12394
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012395fi
12396
Michael W. Hudson54241132001-12-07 15:38:26 +000012397
Martin v. Löwis11437992002-04-12 09:54:03 +000012398
Matthias Kloseb9621712010-04-24 17:59:49 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12400$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012401if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403else
Matthias Kloseb159a552010-04-25 21:00:44 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012406/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012407#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012408int
12409main ()
12410{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 ;
12413 return 0;
12414}
12415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012416if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012417 ac_cv_header_time_altzone=yes
12418else
Matthias Kloseb9621712010-04-24 17:59:49 +000012419 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423fi
12424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12426$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012428
Matthias Kloseb9621712010-04-24 17:59:49 +000012429$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012430
12431fi
12432
Guido van Rossumda88dad1995-01-26 00:46:29 +000012433was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12435$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012437/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012438
12439#include <sys/types.h>
12440#include <sys/select.h>
12441#include <sys/time.h>
12442
Martin v. Löwis11437992002-04-12 09:54:03 +000012443int
12444main ()
12445{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012446;
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 ;
12448 return 0;
12449}
12450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012452
12453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012455
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012456 was_it_defined=yes
12457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12461$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462
Matthias Kloseb9621712010-04-24 17:59:49 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12464$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012465if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012467else
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012470#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012471int
12472main ()
12473{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012474struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 ;
12476 return 0;
12477}
12478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012480 ac_cv_struct_addrinfo=yes
12481else
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12485fi
12486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12488$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012489if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012492
12493fi
12494
Matthias Kloseb9621712010-04-24 17:59:49 +000012495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12496$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012497if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012499else
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012501/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012502
12503# include <sys/types.h>
12504# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012505int
12506main ()
12507{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012508struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012514 ac_cv_struct_sockaddr_storage=yes
12515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12519fi
12520
Matthias Kloseb9621712010-04-24 17:59:49 +000012521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12522$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012523if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Matthias Kloseb9621712010-04-24 17:59:49 +000012525$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012526
12527fi
12528
Guido van Rossum627b2d71993-12-24 10:39:16 +000012529# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012530
Matthias Kloseb9621712010-04-24 17:59:49 +000012531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12532$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012533if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012538$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012539int
12540main ()
12541{
12542static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012543test_array [0] = 0;
12544return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012545
12546 ;
12547 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012548}
Martin v. Löwis11437992002-04-12 09:54:03 +000012549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012550if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012551 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012552else
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12558$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012559if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012561
12562fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012563
Matthias Kloseb9621712010-04-24 17:59:49 +000012564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12565$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012566if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012568else
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012570/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012571
Martin v. Löwis11437992002-04-12 09:54:03 +000012572int
12573main ()
12574{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012575
Martin v. Löwis11437992002-04-12 09:54:03 +000012576#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012577 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012578 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012579 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581 char const *const *pcpcc;
12582 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 /* NEC SVR4.0.2 mips cc rejects this. */
12584 struct point {int x, y;};
12585 static struct point const zero = {0,0};
12586 /* AIX XL C 1.02.0.0 rejects this.
12587 It does not let you subtract one const X* pointer from another in
12588 an arm of an if-expression whose if-part is not a constant
12589 expression */
12590 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012592 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593 ++pcpcc;
12594 ppc = (char**) pcpcc;
12595 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012596 { /* SCO 3.2v4 cc rejects this sort of thing. */
12597 char tx;
12598 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012599 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012603 }
12604 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12605 int x[] = {25, 17};
12606 const int *foo = &x[0];
12607 ++foo;
12608 }
12609 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12610 typedef const int *iptr;
12611 iptr p = 0;
12612 ++p;
12613 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012614 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012616 struct s { int j; const int *ap[3]; } bx;
12617 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 }
12619 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12620 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012621 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012623 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012624#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012625
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 ;
12627 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012628}
Martin v. Löwis11437992002-04-12 09:54:03 +000012629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012630if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012631 ac_cv_c_const=yes
12632else
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12638$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012639if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012642
12643fi
12644
Michael W. Hudson54241132001-12-07 15:38:26 +000012645
Guido van Rossumda88dad1995-01-26 00:46:29 +000012646works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12648$as_echo_n "checking for working volatile... " >&6; }
12649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012650/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012651
Martin v. Löwis11437992002-04-12 09:54:03 +000012652int
12653main ()
12654{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ;
12657 return 0;
12658}
12659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012660if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012661 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012662else
Skip Montanaro6dead952003-09-25 14:50:04 +000012663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012665
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012666
Guido van Rossum627b2d71993-12-24 10:39:16 +000012667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12670$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012671
Guido van Rossumda88dad1995-01-26 00:46:29 +000012672works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12674$as_echo_n "checking for working signed char... " >&6; }
12675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012677
Martin v. Löwis11437992002-04-12 09:54:03 +000012678int
12679main ()
12680{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012681signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 ;
12683 return 0;
12684}
12685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012686if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012687 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012688else
Skip Montanaro6dead952003-09-25 14:50:04 +000012689
Matthias Kloseb9621712010-04-24 17:59:49 +000012690$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012691
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012692
Guido van Rossum7f43da71994-08-01 12:15:30 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12696$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012697
Guido van Rossumda88dad1995-01-26 00:46:29 +000012698have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12700$as_echo_n "checking for prototypes... " >&6; }
12701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012702/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012703int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012704int
12705main ()
12706{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012707return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ;
12709 return 0;
12710}
12711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012712if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012713
Matthias Kloseb9621712010-04-24 17:59:49 +000012714$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012715
Matthias Kloseb159a552010-04-25 21:00:44 +000012716 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12720$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012721
Guido van Rossumda88dad1995-01-26 00:46:29 +000012722works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12724$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012726/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012727
12728#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012729int foo(int x, ...) {
12730 va_list va;
12731 va_start(va, x);
12732 va_arg(va, int);
12733 va_arg(va, char *);
12734 va_arg(va, double);
12735 return 0;
12736}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012737
Martin v. Löwis11437992002-04-12 09:54:03 +000012738int
12739main ()
12740{
Guido van Rossum90eea071996-08-30 20:58:57 +000012741return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ;
12743 return 0;
12744}
12745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012746if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012747
12748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012750
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012751 works=yes
12752
Guido van Rossum627b2d71993-12-24 10:39:16 +000012753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12756$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012757
Martin v. Löwisd6320502004-08-12 13:45:08 +000012758# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12760$as_echo_n "checking for socketpair... " >&6; }
12761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012762/* end confdefs.h. */
12763
12764#include <sys/types.h>
12765#include <sys/socket.h>
12766
12767int
12768main ()
12769{
12770void *x=socketpair
12771 ;
12772 return 0;
12773}
12774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012775if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012778
Matthias Kloseb159a552010-04-25 21:00:44 +000012779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012780$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012781else
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12783$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012784
12785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012787
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012788# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12790$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012792/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793#include <sys/types.h>
12794#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012795int
12796main ()
12797{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012798struct sockaddr x;
12799x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ;
12801 return 0;
12802}
12803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012804if ac_fn_c_try_compile "$LINENO"; then :
12805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12806$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012809
12810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12812$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012813
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012816
Guido van Rossumda88dad1995-01-26 00:46:29 +000012817va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12819$as_echo_n "checking whether va_list is an array... " >&6; }
12820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012821/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012822
12823#ifdef HAVE_STDARG_PROTOTYPES
12824#include <stdarg.h>
12825#else
12826#include <varargs.h>
12827#endif
12828
Martin v. Löwis11437992002-04-12 09:54:03 +000012829int
12830main ()
12831{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 ;
12834 return 0;
12835}
12836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012837if ac_fn_c_try_compile "$LINENO"; then :
12838
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012839else
Skip Montanaro6dead952003-09-25 14:50:04 +000012840
Martin v. Löwis11437992002-04-12 09:54:03 +000012841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012843
Guido van Rossumda88dad1995-01-26 00:46:29 +000012844 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012845
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12849$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012850
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012851# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012852
12853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012855if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012858
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12860$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012861 OLD_CFLAGS=$CFLAGS
12862 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012865
12866# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012867
Martin v. Löwis11437992002-04-12 09:54:03 +000012868int
12869main ()
12870{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012871
12872 char *name;
12873 struct hostent *he, *res;
12874 char buffer[2048];
12875 int buflen = 2048;
12876 int h_errnop;
12877
12878 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012879
12880 ;
12881 return 0;
12882}
12883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012887
Martin v. Löwis11437992002-04-12 09:54:03 +000012888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12892$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012894else
Skip Montanaro6dead952003-09-25 14:50:04 +000012895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12897$as_echo "no" >&6; }
12898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12899$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012901/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012902
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012903# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012904
Martin v. Löwis11437992002-04-12 09:54:03 +000012905int
12906main ()
12907{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012908
12909 char *name;
12910 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012911 char buffer[2048];
12912 int buflen = 2048;
12913 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012914
Matthias Kloseb159a552010-04-25 21:00:44 +000012915 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012916
12917 ;
12918 return 0;
12919}
12920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012921if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012924
Martin v. Löwis11437992002-04-12 09:54:03 +000012925
Matthias Kloseb159a552010-04-25 21:00:44 +000012926$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12929$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012931else
Skip Montanaro6dead952003-09-25 14:50:04 +000012932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12934$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12936$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12938/* end confdefs.h. */
12939
12940# include <netdb.h>
12941
12942int
12943main ()
12944{
12945
12946 char *name;
12947 struct hostent *he;
12948 struct hostent_data data;
12949
12950 (void) gethostbyname_r(name, he, &data);
12951
12952 ;
12953 return 0;
12954}
12955_ACEOF
12956if ac_fn_c_try_compile "$LINENO"; then :
12957
12958 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12959
12960
12961$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12962
12963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12964$as_echo "yes" >&6; }
12965
12966else
12967
12968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12969$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012973
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012979 CFLAGS=$OLD_CFLAGS
12980
12981else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 for ac_func in gethostbyname
12984do :
12985 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012986if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012988#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012989_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012990
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012991fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012992done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012993
Michael W. Hudson54241132001-12-07 15:38:26 +000012994
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012995fi
12996
Michael W. Hudson54241132001-12-07 15:38:26 +000012997
12998
12999
13000
13001
13002
Guido van Rossum627b2d71993-12-24 10:39:16 +000013003# checks for system services
13004# (none yet)
13005
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013007ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013008if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013009
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013010else
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13012$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013013if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013015else
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013017LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013021/* Override any GCC internal prototype to avoid an error.
13022 Use char because int might match the return type of a GCC
13023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013024#ifdef __cplusplus
13025extern "C"
13026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013027char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013028int
13029main ()
13030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 ;
13033 return 0;
13034}
13035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013038else
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013041rm -f core conftest.err conftest.$ac_objext \
13042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013043LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13046$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013047if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 cat >>confdefs.h <<_ACEOF
13049#define HAVE_LIBIEEE 1
13050_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013051
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013052 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013053
Guido van Rossum627b2d71993-12-24 10:39:16 +000013054fi
13055
Michael W. Hudson54241132001-12-07 15:38:26 +000013056
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013057fi
13058
Michael W. Hudson54241132001-12-07 15:38:26 +000013059
Guido van Rossum7f253911997-05-09 02:42:48 +000013060# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13062$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013064# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013065if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013066 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013067if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013068then
13069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013071
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13073$as_echo "yes" >&6; }
13074else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13075$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013076fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13079$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013080fi
13081
Guido van Rossum7f253911997-05-09 02:42:48 +000013082
Guido van Rossum7f43da71994-08-01 12:15:30 +000013083# check for --with-libm=...
13084
Guido van Rossum563e7081996-09-10 18:20:48 +000013085case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013086Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013087*) LIBM=-lm
13088esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13090$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013093if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013094 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013095if test "$withval" = no
13096then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13098$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013099elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013100then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13102$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013103else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013104fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013105else
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13107$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013108fi
13109
Guido van Rossum7f43da71994-08-01 12:15:30 +000013110
13111# check for --with-libc=...
13112
Matthias Kloseb9621712010-04-24 17:59:49 +000013113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13114$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013116# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013117if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013118 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013119if test "$withval" = no
13120then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13122$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013123elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013124then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13126$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013127else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013128fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013129else
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13131$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013132fi
13133
Guido van Rossum7f43da71994-08-01 12:15:30 +000013134
Stefan Krah1919b7e2012-03-21 18:25:23 +010013135# **************************************
13136# * Check for gcc x64 inline assembler *
13137# **************************************
13138
13139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13140$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13142/* end confdefs.h. */
13143
13144int
13145main ()
13146{
13147
13148 __asm__ __volatile__ ("movq %rcx, %rax");
13149
13150 ;
13151 return 0;
13152}
13153_ACEOF
13154if ac_fn_c_try_compile "$LINENO"; then :
13155 have_gcc_asm_for_x64=yes
13156else
13157 have_gcc_asm_for_x64=no
13158fi
13159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13161$as_echo "$have_gcc_asm_for_x64" >&6; }
13162if test "$have_gcc_asm_for_x64" = yes
13163then
13164
13165$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13166
13167fi
13168
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013169# **************************************************
13170# * Check for various properties of floating point *
13171# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13174$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013175if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013177else
13178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013180 ac_cv_little_endian_double=no
13181else
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013183/* end confdefs.h. */
13184
13185#include <string.h>
13186int main() {
13187 double x = 9006104071832581.0;
13188 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13189 return 0;
13190 else
13191 return 1;
13192}
13193
13194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013195if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013196 ac_cv_little_endian_double=yes
13197else
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13201 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013202fi
13203
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013204fi
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13207$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013208if test "$ac_cv_little_endian_double" = yes
13209then
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013212
13213fi
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13216$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013217if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013219else
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013222 ac_cv_big_endian_double=no
13223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013225/* end confdefs.h. */
13226
13227#include <string.h>
13228int main() {
13229 double x = 9006104071832581.0;
13230 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13231 return 0;
13232 else
13233 return 1;
13234}
13235
13236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013238 ac_cv_big_endian_double=yes
13239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013244fi
13245
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013246fi
13247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13249$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013250if test "$ac_cv_big_endian_double" = yes
13251then
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013254
13255fi
13256
13257# Some ARM platforms use a mixed-endian representation for doubles.
13258# While Python doesn't currently have full support for these platforms
13259# (see e.g., issue 1762561), we can at least make sure that float <-> string
13260# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13262$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013263if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013265else
13266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013268 ac_cv_mixed_endian_double=no
13269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013271/* end confdefs.h. */
13272
13273#include <string.h>
13274int main() {
13275 double x = 9006104071832581.0;
13276 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13277 return 0;
13278 else
13279 return 1;
13280}
13281
13282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013283if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013284 ac_cv_mixed_endian_double=yes
13285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013290fi
13291
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013292fi
13293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13295$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013296if test "$ac_cv_mixed_endian_double" = yes
13297then
13298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013300
13301fi
13302
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013303# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013304# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013305# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013306# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013307# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013308# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013309
13310# This inline assembler syntax may also work for suncc and icc,
13311# so we try it on all platforms.
13312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13314$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013316/* end confdefs.h. */
13317
13318int
13319main ()
13320{
13321
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013322 unsigned short cw;
13323 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13324 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013325
13326 ;
13327 return 0;
13328}
13329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013330if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013331 have_gcc_asm_for_x87=yes
13332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013334fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13337$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013338if test "$have_gcc_asm_for_x87" = yes
13339then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013342
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13346$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13348/* end confdefs.h. */
13349
13350int
13351main ()
13352{
13353
13354 unsigned int fpcr;
13355 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13356 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13357
13358 ;
13359 return 0;
13360}
13361_ACEOF
13362if ac_fn_c_try_compile "$LINENO"; then :
13363 have_gcc_asm_for_mc68881=yes
13364else
13365 have_gcc_asm_for_mc68881=no
13366fi
13367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13369$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13370if test "$have_gcc_asm_for_mc68881" = yes
13371then
13372
13373$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13374
13375fi
13376
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013377# Detect whether system arithmetic is subject to x87-style double
13378# rounding issues. The result of this test has little meaning on non
13379# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13380# mode is round-to-nearest and double rounding issues are present, and
13381# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13383$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013384# $BASECFLAGS may affect the result
13385ac_save_cc="$CC"
13386CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013387if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013388 ac_cv_x87_double_rounding=no
13389else
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013391/* end confdefs.h. */
13392
13393#include <stdlib.h>
13394#include <math.h>
13395int main() {
13396 volatile double x, y, z;
13397 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13398 x = 0.99999999999999989; /* 1-2**-53 */
13399 y = 1./x;
13400 if (y != 1.)
13401 exit(0);
13402 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13403 x = 1e16;
13404 y = 2.99999;
13405 z = x + y;
13406 if (z != 1e16+4.)
13407 exit(0);
13408 /* both tests show evidence of double rounding */
13409 exit(1);
13410}
13411
13412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013413if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013414 ac_cv_x87_double_rounding=no
13415else
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013420fi
13421
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013422CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13424$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013425if test "$ac_cv_x87_double_rounding" = yes
13426then
13427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013429
13430fi
13431
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013432# ************************************
13433# * Check for mathematical functions *
13434# ************************************
13435
13436LIBS_SAVE=$LIBS
13437LIBS="$LIBS $LIBM"
13438
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013439for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13440do :
13441 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13442ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013443if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013444 cat >>confdefs.h <<_ACEOF
13445#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13446_ACEOF
13447
13448fi
13449done
13450
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013451for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013452do :
13453 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13454ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013455if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013456 cat >>confdefs.h <<_ACEOF
13457#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13458_ACEOF
13459
13460fi
13461done
13462
13463ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13464"
Victor Stinnere0be4232011-10-25 13:06:09 +020013465if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013466 ac_have_decl=1
13467else
13468 ac_have_decl=0
13469fi
13470
13471cat >>confdefs.h <<_ACEOF
13472#define HAVE_DECL_ISINF $ac_have_decl
13473_ACEOF
13474ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13475"
Victor Stinnere0be4232011-10-25 13:06:09 +020013476if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013477 ac_have_decl=1
13478else
13479 ac_have_decl=0
13480fi
13481
13482cat >>confdefs.h <<_ACEOF
13483#define HAVE_DECL_ISNAN $ac_have_decl
13484_ACEOF
13485ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13486"
Victor Stinnere0be4232011-10-25 13:06:09 +020013487if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013488 ac_have_decl=1
13489else
13490 ac_have_decl=0
13491fi
13492
13493cat >>confdefs.h <<_ACEOF
13494#define HAVE_DECL_ISFINITE $ac_have_decl
13495_ACEOF
13496
13497
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013498# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13499# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13501$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013502if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013504else
13505
Matthias Kloseb9621712010-04-24 17:59:49 +000013506if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013507 ac_cv_tanh_preserves_zero_sign=no
13508else
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013510/* end confdefs.h. */
13511
13512#include <math.h>
13513#include <stdlib.h>
13514int main() {
13515 /* return 0 if either negative zeros don't exist
13516 on this platform or if negative zeros exist
13517 and tanh(-0.) == -0. */
13518 if (atan2(0., -1.) == atan2(-0., -1.) ||
13519 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13520 else exit(1);
13521}
13522
13523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013524if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013525 ac_cv_tanh_preserves_zero_sign=yes
13526else
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13530 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013531fi
13532
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013533fi
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13536$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013537if test "$ac_cv_tanh_preserves_zero_sign" = yes
13538then
13539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013541
13542fi
13543
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013544if test "$ac_cv_func_log1p" = yes
13545then
13546 # On some versions of AIX, log1p(-0.) returns 0. instead of
13547 # -0. See issue #9920.
13548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13549$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013550 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013551 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013552else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013553
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013554 if test "$cross_compiling" = yes; then :
13555 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013556else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13558/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013559
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013560 #include <math.h>
13561 #include <stdlib.h>
13562 int main() {
13563 /* Fail if the signs of log1p(-0.) and -0. can be
13564 distinguished. */
13565 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13566 return 0;
13567 else
13568 return 1;
13569 }
13570
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013571_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013572if ac_fn_c_try_run "$LINENO"; then :
13573 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013574else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013575 ac_cv_log1p_drops_zero_sign=yes
13576fi
13577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013579fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013580
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013581fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013582
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13584$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13585fi
13586if test "$ac_cv_log1p_drops_zero_sign" = yes
13587then
13588
13589$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13590
13591fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013592
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013593LIBS=$LIBS_SAVE
13594
Mark Dickinsona614f042009-11-28 12:48:43 +000013595# For multiprocessing module, check that sem_open
13596# actually works. For FreeBSD versions <= 7.2,
13597# the kernel module that provides POSIX semaphores
13598# isn't loaded by default, so an attempt to call
13599# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13601$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013602if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013604else
Matthias Kloseb9621712010-04-24 17:59:49 +000013605 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013606 ac_cv_posix_semaphores_enabled=yes
13607else
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013609/* end confdefs.h. */
13610
13611#include <unistd.h>
13612#include <fcntl.h>
13613#include <stdio.h>
13614#include <semaphore.h>
13615#include <sys/stat.h>
13616
13617int main(void) {
13618 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13619 if (a == SEM_FAILED) {
13620 perror("sem_open");
13621 return 1;
13622 }
13623 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013624 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013625 return 0;
13626}
13627
13628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013629if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013630 ac_cv_posix_semaphores_enabled=yes
13631else
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013636fi
13637
13638
Mark Dickinsona614f042009-11-28 12:48:43 +000013639fi
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13642$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013643if test $ac_cv_posix_semaphores_enabled = no
13644then
13645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013647
13648fi
13649
Mark Dickinson10683072009-04-18 21:18:19 +000013650# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13652$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013653if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013657 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013658else
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013660/* end confdefs.h. */
13661
13662#include <unistd.h>
13663#include <fcntl.h>
13664#include <stdio.h>
13665#include <semaphore.h>
13666#include <sys/stat.h>
13667
13668int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013669 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013670 int count;
13671 int res;
13672 if(a==SEM_FAILED){
13673 perror("sem_open");
13674 return 1;
13675
13676 }
13677 res = sem_getvalue(a, &count);
13678 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013679 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013680 return res==-1 ? 1 : 0;
13681}
13682
Mark Dickinson10683072009-04-18 21:18:19 +000013683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013684if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013685 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013686else
Matthias Kloseb9621712010-04-24 17:59:49 +000013687 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013691fi
13692
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013693
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013694fi
13695
Matthias Kloseb9621712010-04-24 17:59:49 +000013696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13697$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013698if test $ac_cv_broken_sem_getvalue = yes
13699then
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013702
13703fi
13704
Mark Dickinsonbd792642009-03-18 20:06:12 +000013705# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13707$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013708# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013709if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013710 enableval=$enable_big_digits; case $enable_big_digits in
13711yes)
13712 enable_big_digits=30 ;;
13713no)
13714 enable_big_digits=15 ;;
1371515|30)
13716 ;;
13717*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013718 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 +000013719esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13721$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013722
13723cat >>confdefs.h <<_ACEOF
13724#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13725_ACEOF
13726
13727
13728else
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13730$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013731fi
13732
13733
Guido van Rossumef2255b2000-03-10 22:30:29 +000013734# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013735ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013736if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013737
13738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013741 wchar_h="yes"
13742
Guido van Rossumef2255b2000-03-10 22:30:29 +000013743else
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013745
13746fi
13747
Michael W. Hudson54241132001-12-07 15:38:26 +000013748
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013750# determine wchar_t size
13751if test "$wchar_h" = yes
13752then
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13758$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013759if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013761else
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13763"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013764
Martin v. Löwis11437992002-04-12 09:54:03 +000013765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 if test "$ac_cv_type_wchar_t" = yes; then
13767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013769as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013770See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013771 else
13772 ac_cv_sizeof_wchar_t=0
13773 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013775
Martin v. Löwis11437992002-04-12 09:54:03 +000013776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13778$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013779
13780
13781
Martin v. Löwis11437992002-04-12 09:54:03 +000013782cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013783#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013784_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013785
Michael W. Hudson54241132001-12-07 15:38:26 +000013786
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013787fi
13788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13790$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013791have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013793/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013794
13795#include <tcl.h>
13796#if TCL_UTF_MAX != 6
13797# error "NOT UCS4_TCL"
13798#endif
13799int
13800main ()
13801{
13802
13803 ;
13804 return 0;
13805}
13806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013808
13809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013811
13812 have_ucs4_tcl=yes
13813
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13817$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013818
Skip Montanaro6dead952003-09-25 14:50:04 +000013819# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013820if test "$wchar_h" = yes
13821then
13822 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13824$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013825 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013827else
13828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013830 ac_cv_wchar_t_signed=yes
13831else
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013833/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013834
13835 #include <wchar.h>
13836 int main()
13837 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013838 /* Success: exit code 0 */
13839 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013840 }
13841
13842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013843if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013844 ac_cv_wchar_t_signed=yes
13845else
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013850fi
13851
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013852fi
13853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13855$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856fi
13857
Georg Brandl52d168a2008-01-07 18:10:24 +000013858# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013859if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013860 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013861then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013862 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013865
Georg Brandl52d168a2008-01-07 18:10:24 +000013866else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013867 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013868fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13870$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013871
13872# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13874$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013875if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 ac_cv_c_bigendian=unknown
13879 # See if we're dealing with a universal compiler.
13880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13881/* end confdefs.h. */
13882#ifndef __APPLE_CC__
13883 not a universal capable compiler
13884 #endif
13885 typedef int dummy;
13886
Skip Montanaro6dead952003-09-25 14:50:04 +000013887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013888if ac_fn_c_try_compile "$LINENO"; then :
13889
13890 # Check for potential -arch flags. It is not universal unless
13891 # there are at least two -arch flags with different values.
13892 ac_arch=
13893 ac_prev=
13894 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13895 if test -n "$ac_prev"; then
13896 case $ac_word in
13897 i?86 | x86_64 | ppc | ppc64)
13898 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13899 ac_arch=$ac_word
13900 else
13901 ac_cv_c_bigendian=universal
13902 break
13903 fi
13904 ;;
13905 esac
13906 ac_prev=
13907 elif test "x$ac_word" = "x-arch"; then
13908 ac_prev=arch
13909 fi
13910 done
13911fi
13912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13913 if test $ac_cv_c_bigendian = unknown; then
13914 # See if sys/param.h defines the BYTE_ORDER macro.
13915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013916/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013917#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920int
13921main ()
13922{
Matthias Kloseb9621712010-04-24 17:59:49 +000013923#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13924 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13925 && LITTLE_ENDIAN)
13926 bogus endian macros
13927 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013928
13929 ;
13930 return 0;
13931}
13932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013933if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013934 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013936/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013937#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940int
13941main ()
13942{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013943#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 not big endian
13945 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013946
13947 ;
13948 return 0;
13949}
13950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013951if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013952 ac_cv_c_bigendian=yes
13953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013957fi
13958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13959 fi
13960 if test $ac_cv_c_bigendian = unknown; then
13961 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013963/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013964#include <limits.h>
13965
Martin v. Löwis11437992002-04-12 09:54:03 +000013966int
13967main ()
13968{
Matthias Kloseb9621712010-04-24 17:59:49 +000013969#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13970 bogus endian macros
13971 #endif
13972
Martin v. Löwis11437992002-04-12 09:54:03 +000013973 ;
13974 return 0;
13975}
13976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013977if ac_fn_c_try_compile "$LINENO"; then :
13978 # It does; now see whether it defined to _BIG_ENDIAN or not.
13979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13980/* end confdefs.h. */
13981#include <limits.h>
13982
13983int
13984main ()
13985{
13986#ifndef _BIG_ENDIAN
13987 not big endian
13988 #endif
13989
13990 ;
13991 return 0;
13992}
13993_ACEOF
13994if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013996else
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14000fi
14001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14002 fi
14003 if test $ac_cv_c_bigendian = unknown; then
14004 # Compile a test program.
14005 if test "$cross_compiling" = yes; then :
14006 # Try to guess by grepping values from an object file.
14007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008/* end confdefs.h. */
14009short int ascii_mm[] =
14010 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14011 short int ascii_ii[] =
14012 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14013 int use_ascii (int i) {
14014 return ascii_mm[i] + ascii_ii[i];
14015 }
14016 short int ebcdic_ii[] =
14017 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14018 short int ebcdic_mm[] =
14019 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14020 int use_ebcdic (int i) {
14021 return ebcdic_mm[i] + ebcdic_ii[i];
14022 }
14023 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025int
14026main ()
14027{
14028return use_ascii (foo) == use_ebcdic (foo);
14029 ;
14030 return 0;
14031}
14032_ACEOF
14033if ac_fn_c_try_compile "$LINENO"; then :
14034 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14035 ac_cv_c_bigendian=yes
14036 fi
14037 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14038 if test "$ac_cv_c_bigendian" = unknown; then
14039 ac_cv_c_bigendian=no
14040 else
14041 # finding both strings is unlikely to happen, but who knows?
14042 ac_cv_c_bigendian=unknown
14043 fi
14044 fi
14045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014047else
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014049/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014050$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014051int
14052main ()
14053{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 /* Are we little or big endian? From Harbison&Steele. */
14056 union
14057 {
14058 long int l;
14059 char c[sizeof (long int)];
14060 } u;
14061 u.l = 1;
14062 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014063
14064 ;
14065 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014066}
Martin v. Löwis11437992002-04-12 09:54:03 +000014067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014068if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014069 ac_cv_c_bigendian=no
14070else
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14074 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14080$as_echo "$ac_cv_c_bigendian" >&6; }
14081 case $ac_cv_c_bigendian in #(
14082 yes)
14083 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14084;; #(
14085 no)
14086 ;; #(
14087 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014090
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 ;; #(
14092 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014093 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014094 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014096
Michael W. Hudson54241132001-12-07 15:38:26 +000014097
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014098# ABI version string for Python extension modules. This appears between the
14099# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14100# from the following attributes which affect the ABI of this Python build (in
14101# this order):
14102#
14103# * The Python implementation (always 'cpython-' for us)
14104# * The major and minor version numbers
14105# * --with-pydebug (adds a 'd')
14106# * --with-pymalloc (adds a 'm')
14107# * --with-wide-unicode (adds a 'u')
14108#
14109# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014110# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14111# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014112
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14114$as_echo_n "checking ABIFLAGS... " >&6; }
14115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14116$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14118$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014119SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14121$as_echo "$SOABI" >&6; }
14122
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014123
14124case $ac_sys_system in
14125 Linux*|GNU*)
14126 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14127 *)
14128 EXT_SUFFIX=${SHLIB_SUFFIX};;
14129esac
14130
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14132$as_echo_n "checking LDVERSION... " >&6; }
14133LDVERSION='$(VERSION)$(ABIFLAGS)'
14134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14135$as_echo "$LDVERSION" >&6; }
14136
doko@python.org87421192013-01-26 11:39:31 +010014137
14138LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14139
14140
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014141# Check whether right shifting a negative integer extends the sign bit
14142# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14144$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014145if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014147else
Martin v. Löwis11437992002-04-12 09:54:03 +000014148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014150 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014151else
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014153/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014154
14155int main()
14156{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014157 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014158}
14159
Martin v. Löwis11437992002-04-12 09:54:03 +000014160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014161if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014162 ac_cv_rshift_extends_sign=yes
14163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014168fi
14169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170fi
14171
Matthias Kloseb9621712010-04-24 17:59:49 +000014172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14173$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014174if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014175then
Martin v. Löwis11437992002-04-12 09:54:03 +000014176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014178
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014179fi
14180
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014181# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14183$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014184if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014186else
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
Matthias Kloseb9621712010-04-24 17:59:49 +000014188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014189/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014190#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014191int
14192main ()
14193{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014194
14195 FILE *f = fopen("/dev/null", "r");
14196 flockfile(f);
14197 getc_unlocked(f);
14198 funlockfile(f);
14199
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 ;
14201 return 0;
14202}
14203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014204if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014205 ac_cv_have_getc_unlocked=yes
14206else
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 ac_cv_have_getc_unlocked=no
14208fi
14209rm -f core conftest.err conftest.$ac_objext \
14210 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212
Matthias Kloseb9621712010-04-24 17:59:49 +000014213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14214$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014215if test "$ac_cv_have_getc_unlocked" = yes
14216then
Martin v. Löwis11437992002-04-12 09:54:03 +000014217
Matthias Kloseb9621712010-04-24 17:59:49 +000014218$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014219
14220fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014221
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014222# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014223# save the value of LIBS so we don't actually link Python with readline
14224LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014225
Gregory P. Smith18820942008-09-07 06:24:49 +000014226# On some systems we need to link readline to a termcap compatible
14227# library. NOTE: Keep the precedence of listed libraries synchronised
14228# with setup.py.
14229py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14231$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014232for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014233 if test -z "$py_libtermcap"; then
14234 READLINE_LIBS="-lreadline"
14235 else
14236 READLINE_LIBS="-lreadline -l$py_libtermcap"
14237 fi
14238 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014240/* end confdefs.h. */
14241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242/* Override any GCC internal prototype to avoid an error.
14243 Use char because int might match the return type of a GCC
14244 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014245#ifdef __cplusplus
14246extern "C"
14247#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014248char readline ();
14249int
14250main ()
14251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014253 ;
14254 return 0;
14255}
14256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014257if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014258 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014260rm -f core conftest.err conftest.$ac_objext \
14261 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014262 if test $py_cv_lib_readline = yes; then
14263 break
14264 fi
14265done
14266# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14267#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014268if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14270$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014271else
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14273$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014274
Matthias Kloseb9621712010-04-24 17:59:49 +000014275$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014276
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014277fi
14278
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014279# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14281$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014282if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014284else
14285 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014286LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014288/* end confdefs.h. */
14289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290/* Override any GCC internal prototype to avoid an error.
14291 Use char because int might match the return type of a GCC
14292 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014293#ifdef __cplusplus
14294extern "C"
14295#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014296char rl_callback_handler_install ();
14297int
14298main ()
14299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014301 ;
14302 return 0;
14303}
14304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014305if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014306 ac_cv_lib_readline_rl_callback_handler_install=yes
14307else
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014310rm -f core conftest.err conftest.$ac_objext \
14311 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014312LIBS=$ac_check_lib_save_LIBS
14313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14315$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014316if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014317
Matthias Kloseb9621712010-04-24 17:59:49 +000014318$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014319
14320fi
14321
14322
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014323# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014325/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014326#include <readline/readline.h>
14327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014328if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014329 have_readline=yes
14330else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014331 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014332
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014333fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014334rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014335if test $have_readline = yes
14336then
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014338/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014339#include <readline/readline.h>
14340
14341_ACEOF
14342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014344
Matthias Kloseb9621712010-04-24 17:59:49 +000014345$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014346
14347fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014348rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014349
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014351/* end confdefs.h. */
14352#include <readline/readline.h>
14353
14354_ACEOF
14355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014357
Matthias Kloseb9621712010-04-24 17:59:49 +000014358$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014359
14360fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014361rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014362
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014363fi
14364
Martin v. Löwis0daad592001-09-30 21:09:59 +000014365# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14367$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014368if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014370else
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014372LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376/* Override any GCC internal prototype to avoid an error.
14377 Use char because int might match the return type of a GCC
14378 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014379#ifdef __cplusplus
14380extern "C"
14381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014382char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014383int
14384main ()
14385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 ;
14388 return 0;
14389}
14390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014391if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014393else
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014396rm -f core conftest.err conftest.$ac_objext \
14397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014398LIBS=$ac_check_lib_save_LIBS
14399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14401$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014402if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014405
Martin v. Löwis0daad592001-09-30 21:09:59 +000014406fi
14407
Michael W. Hudson54241132001-12-07 15:38:26 +000014408
Thomas Wouters89d996e2007-09-08 17:39:28 +000014409# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14411$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014412if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014414else
14415 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014416LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014418/* end confdefs.h. */
14419
14420/* Override any GCC internal prototype to avoid an error.
14421 Use char because int might match the return type of a GCC
14422 builtin and then its argument prototype would still apply. */
14423#ifdef __cplusplus
14424extern "C"
14425#endif
14426char rl_completion_display_matches_hook ();
14427int
14428main ()
14429{
14430return rl_completion_display_matches_hook ();
14431 ;
14432 return 0;
14433}
14434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014435if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014436 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014440rm -f core conftest.err conftest.$ac_objext \
14441 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014442LIBS=$ac_check_lib_save_LIBS
14443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14445$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014446if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014449
14450fi
14451
14452
Martin v. Löwis0daad592001-09-30 21:09:59 +000014453# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14455$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014456if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014458else
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014460LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464/* Override any GCC internal prototype to avoid an error.
14465 Use char because int might match the return type of a GCC
14466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014467#ifdef __cplusplus
14468extern "C"
14469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014470char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014471int
14472main ()
14473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 ;
14476 return 0;
14477}
14478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014479if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014481else
Matthias Kloseb9621712010-04-24 17:59:49 +000014482 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014484rm -f core conftest.err conftest.$ac_objext \
14485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014486LIBS=$ac_check_lib_save_LIBS
14487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14489$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014490if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014493
Guido van Rossum353ae582001-07-10 16:45:32 +000014494fi
14495
Jack Jansendd19cf82001-12-06 22:36:17 +000014496
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014497# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014499/* end confdefs.h. */
14500#include <readline/readline.h>
14501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014502if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014503 have_readline=yes
14504else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014505 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014506
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014507fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014508rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014509if test $have_readline = yes
14510then
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014512/* end confdefs.h. */
14513#include <readline/readline.h>
14514
14515_ACEOF
14516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014518
Matthias Kloseb9621712010-04-24 17:59:49 +000014519$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014520
14521fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014522rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014523
14524fi
14525
Martin v. Löwis82bca632006-02-10 20:49:30 +000014526# End of readline checks: restore LIBS
14527LIBS=$LIBS_no_readline
14528
Matthias Kloseb9621712010-04-24 17:59:49 +000014529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14530$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014531if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014533else
Martin v. Löwis11437992002-04-12 09:54:03 +000014534
Matthias Kloseb9621712010-04-24 17:59:49 +000014535if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014536 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014537else
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014539/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014540
14541int main()
14542{
14543 int val1 = nice(1);
14544 if (val1 != -1 && val1 == nice(2))
14545 exit(0);
14546 exit(1);
14547}
14548
Martin v. Löwis11437992002-04-12 09:54:03 +000014549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014550if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014551 ac_cv_broken_nice=yes
14552else
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14556 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014557fi
14558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559fi
14560
Matthias Kloseb9621712010-04-24 17:59:49 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14562$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014563if test "$ac_cv_broken_nice" = yes
14564then
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014567
14568fi
14569
Matthias Kloseb9621712010-04-24 17:59:49 +000014570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14571$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014572if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014574else
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014576 ac_cv_broken_poll=no
14577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014579/* end confdefs.h. */
14580
14581#include <poll.h>
14582
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014583int main()
14584{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014585 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014586 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014587
14588 close (42);
14589
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014590 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014591 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014592 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014593 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014594 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014595 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014596 return 1;
14597}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014598
14599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014600if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014601 ac_cv_broken_poll=yes
14602else
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014609fi
14610
Matthias Kloseb9621712010-04-24 17:59:49 +000014611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14612$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014613if test "$ac_cv_broken_poll" = yes
14614then
14615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014617
14618fi
14619
Brett Cannon43802422005-02-10 20:48:03 +000014620# 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 +000014621# (which is not required by ISO C or UNIX spec) and/or if we support
14622# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014623ac_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 +000014624#include <$ac_cv_struct_tm>
14625
Matthias Kloseb9621712010-04-24 17:59:49 +000014626"
Victor Stinnere0be4232011-10-25 13:06:09 +020014627if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014628
14629cat >>confdefs.h <<_ACEOF
14630#define HAVE_STRUCT_TM_TM_ZONE 1
14631_ACEOF
14632
14633
14634fi
14635
14636if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014639
14640else
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14642"
Victor Stinnere0be4232011-10-25 13:06:09 +020014643if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645else
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647fi
14648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014650#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014651_ACEOF
14652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14654$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014655if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014656 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657else
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014659/* end confdefs.h. */
14660#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661#if !HAVE_DECL_TZNAME
14662extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014663#endif
14664
14665int
14666main ()
14667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014669 ;
14670 return 0;
14671}
14672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014673if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014674 ac_cv_var_tzname=yes
14675else
Matthias Kloseb9621712010-04-24 17:59:49 +000014676 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014678rm -f core conftest.err conftest.$ac_objext \
14679 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14682$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014683 if test $ac_cv_var_tzname = yes; then
14684
Matthias Kloseb9621712010-04-24 17:59:49 +000014685$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014686
14687 fi
14688fi
14689
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014690
Martin v. Löwis1d459062005-03-14 21:23:33 +000014691# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14693$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014694if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014696else
14697
Matthias Kloseb9621712010-04-24 17:59:49 +000014698if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014699 ac_cv_working_tzset=no
14700else
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014702/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014703
14704#include <stdlib.h>
14705#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014706#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014707
14708#if HAVE_TZNAME
14709extern char *tzname[];
14710#endif
14711
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014712int main()
14713{
Brett Cannon18367812003-09-19 00:59:16 +000014714 /* Note that we need to ensure that not only does tzset(3)
14715 do 'something' with localtime, but it works as documented
14716 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014717 This includes making sure that tzname is set properly if
14718 tm->tm_zone does not exist since it is the alternative way
14719 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014720
14721 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014722 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014723 */
14724
Martin v. Löwis1d459062005-03-14 21:23:33 +000014725 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014726 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14727
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014728 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014729 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014730 if (localtime(&groundhogday)->tm_hour != 0)
14731 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014732#if HAVE_TZNAME
14733 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14734 if (strcmp(tzname[0], "UTC") ||
14735 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14736 exit(1);
14737#endif
Brett Cannon18367812003-09-19 00:59:16 +000014738
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014739 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014740 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014741 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014742 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014743#if HAVE_TZNAME
14744 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14745 exit(1);
14746#endif
Brett Cannon18367812003-09-19 00:59:16 +000014747
14748 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14749 tzset();
14750 if (localtime(&groundhogday)->tm_hour != 11)
14751 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014752#if HAVE_TZNAME
14753 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14754 exit(1);
14755#endif
14756
14757#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014758 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14759 exit(1);
14760 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14761 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014762#endif
Brett Cannon18367812003-09-19 00:59:16 +000014763
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014764 exit(0);
14765}
14766
14767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014768if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014769 ac_cv_working_tzset=yes
14770else
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014775fi
14776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777fi
14778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14780$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014781if test "$ac_cv_working_tzset" = yes
14782then
14783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014785
14786fi
14787
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014788# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14790$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014791if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014793else
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014795/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014796#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014797int
14798main ()
14799{
14800
14801struct stat st;
14802st.st_mtim.tv_nsec = 1;
14803
14804 ;
14805 return 0;
14806}
14807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014808if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014809 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014810else
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14814fi
14815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14817$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014818if test "$ac_cv_stat_tv_nsec" = yes
14819then
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014822
14823fi
14824
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014825# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14827$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014828if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014830else
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014832/* end confdefs.h. */
14833#include <sys/stat.h>
14834int
14835main ()
14836{
14837
14838struct stat st;
14839st.st_mtimespec.tv_nsec = 1;
14840
14841 ;
14842 return 0;
14843}
14844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014845if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014846 ac_cv_stat_tv_nsec2=yes
14847else
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14851fi
14852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14854$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014855if test "$ac_cv_stat_tv_nsec2" = yes
14856then
14857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014859
14860fi
14861
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014862# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014863ac_save_cppflags="$CPPFLAGS"
14864CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014865
14866for ac_header in curses.h ncurses.h
14867do :
14868 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14869ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14870if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14871 cat >>confdefs.h <<_ACEOF
14872#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14873_ACEOF
14874
14875fi
14876
14877done
14878
14879
14880# On Solaris, term.h requires curses.h
14881for ac_header in term.h
14882do :
14883 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14884#ifdef HAVE_CURSES_H
14885#include <curses.h>
14886#endif
14887
14888"
14889if test "x$ac_cv_header_term_h" = xyes; then :
14890 cat >>confdefs.h <<_ACEOF
14891#define HAVE_TERM_H 1
14892_ACEOF
14893
14894fi
14895
14896done
14897
14898
Jack Jansen666b1e72001-10-31 12:11:48 +000014899# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14901$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014902if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014904else
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014906/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014907#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014908int
14909main ()
14910{
Jack Jansen666b1e72001-10-31 12:11:48 +000014911
14912 int rtn;
14913 rtn = mvwdelch(0,0,0);
14914
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 ;
14916 return 0;
14917}
14918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014919if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014920 ac_cv_mvwdelch_is_expression=yes
14921else
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14925fi
14926
Matthias Kloseb9621712010-04-24 17:59:49 +000014927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14928$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014929
14930if test "$ac_cv_mvwdelch_is_expression" = yes
14931then
Martin v. Löwis11437992002-04-12 09:54:03 +000014932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014934
14935fi
14936
Matthias Kloseb9621712010-04-24 17:59:49 +000014937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14938$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014939if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014941else
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014943/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014944#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014945int
14946main ()
14947{
Jack Jansen666b1e72001-10-31 12:11:48 +000014948
14949 WINDOW *w;
14950 w->_flags = 0;
14951
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 ;
14953 return 0;
14954}
14955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014956if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014957 ac_cv_window_has_flags=yes
14958else
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14962fi
14963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14965$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014966
Jack Jansen666b1e72001-10-31 12:11:48 +000014967
14968if test "$ac_cv_window_has_flags" = yes
14969then
Martin v. Löwis11437992002-04-12 09:54:03 +000014970
Matthias Kloseb9621712010-04-24 17:59:49 +000014971$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014972
14973fi
14974
Matthias Kloseb9621712010-04-24 17:59:49 +000014975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14976$as_echo_n "checking for is_term_resized... " >&6; }
14977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014978/* end confdefs.h. */
14979#include <curses.h>
14980int
14981main ()
14982{
14983void *x=is_term_resized
14984 ;
14985 return 0;
14986}
14987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014991
Matthias Kloseb159a552010-04-25 21:00:44 +000014992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014993$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014994else
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14996$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014997
14998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15000
Matthias Kloseb9621712010-04-24 17:59:49 +000015001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15002$as_echo_n "checking for resize_term... " >&6; }
15003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015004/* end confdefs.h. */
15005#include <curses.h>
15006int
15007main ()
15008{
15009void *x=resize_term
15010 ;
15011 return 0;
15012}
15013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015014if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015015
Matthias Kloseb9621712010-04-24 17:59:49 +000015016$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015017
Matthias Kloseb159a552010-04-25 21:00:44 +000015018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015019$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015020else
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15022$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015023
15024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15026
Matthias Kloseb9621712010-04-24 17:59:49 +000015027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15028$as_echo_n "checking for resizeterm... " >&6; }
15029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015030/* end confdefs.h. */
15031#include <curses.h>
15032int
15033main ()
15034{
15035void *x=resizeterm
15036 ;
15037 return 0;
15038}
15039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015040if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015041
Matthias Kloseb9621712010-04-24 17:59:49 +000015042$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015043
Matthias Kloseb159a552010-04-25 21:00:44 +000015044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015045$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015046else
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15048$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015049
15050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015052# last curses configure check
15053CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15056$as_echo "$as_me: checking for device files" >&6;}
15057
15058if test "x$cross_compiling" = xyes; then
15059 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15061$as_echo_n "checking for /dev/ptmx... " >&6; }
15062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15063$as_echo "not set" >&6; }
15064 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15065 fi
15066 if test "${ac_cv_file__dev_ptc+set}" != set; then
15067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15068$as_echo_n "checking for /dev/ptc... " >&6; }
15069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15070$as_echo "not set" >&6; }
15071 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15072 fi
15073fi
15074
Matthias Kloseb9621712010-04-24 17:59:49 +000015075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15076$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015077if ${ac_cv_file__dev_ptmx+:} false; then :
15078 $as_echo_n "(cached) " >&6
15079else
15080 test "$cross_compiling" = yes &&
15081 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15082if test -r "/dev/ptmx"; then
15083 ac_cv_file__dev_ptmx=yes
15084else
15085 ac_cv_file__dev_ptmx=no
15086fi
15087fi
15088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15089$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15090if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015091
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015092fi
15093
15094if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015095
Matthias Kloseb9621712010-04-24 17:59:49 +000015096$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015097
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15100$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015101if ${ac_cv_file__dev_ptc+:} false; then :
15102 $as_echo_n "(cached) " >&6
15103else
15104 test "$cross_compiling" = yes &&
15105 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15106if test -r "/dev/ptc"; then
15107 ac_cv_file__dev_ptc=yes
15108else
15109 ac_cv_file__dev_ptc=no
15110fi
15111fi
15112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15113$as_echo "$ac_cv_file__dev_ptc" >&6; }
15114if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015115
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015116fi
15117
15118if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015119
Matthias Kloseb9621712010-04-24 17:59:49 +000015120$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015121
Neal Norwitz865400f2003-03-21 01:42:58 +000015122fi
15123
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015124if test "$have_long_long" = yes
15125then
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15127$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015128 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015130else
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015132 ac_cv_have_long_long_format="cross -- assuming no"
15133 if test x$GCC = xyes; then
15134 save_CFLAGS=$CFLAGS
15135 CFLAGS="$CFLAGS -Werror -Wformat"
15136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15137/* end confdefs.h. */
15138
15139 #include <stdio.h>
15140 #include <stddef.h>
15141
15142int
15143main ()
15144{
15145
15146 char *buffer;
15147 sprintf(buffer, "%lld", (long long)123);
15148 sprintf(buffer, "%lld", (long long)-123);
15149 sprintf(buffer, "%llu", (unsigned long long)123);
15150
15151 ;
15152 return 0;
15153}
15154_ACEOF
15155if ac_fn_c_try_compile "$LINENO"; then :
15156 ac_cv_have_long_long_format=yes
15157
15158fi
15159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15160 CFLAGS=$save_CFLAGS
15161 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015162else
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015164/* end confdefs.h. */
15165
15166 #include <stdio.h>
15167 #include <stddef.h>
15168 #include <string.h>
15169
15170 #ifdef HAVE_SYS_TYPES_H
15171 #include <sys/types.h>
15172 #endif
15173
15174 int main()
15175 {
15176 char buffer[256];
15177
15178 if (sprintf(buffer, "%lld", (long long)123) < 0)
15179 return 1;
15180 if (strcmp(buffer, "123"))
15181 return 1;
15182
15183 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15184 return 1;
15185 if (strcmp(buffer, "-123"))
15186 return 1;
15187
15188 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15189 return 1;
15190 if (strcmp(buffer, "123"))
15191 return 1;
15192
15193 return 0;
15194 }
15195
15196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015197if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015198 ac_cv_have_long_long_format=yes
15199else
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15203 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015204fi
15205
15206
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015207fi
15208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15210$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015211fi
15212
Mark Dickinson89d7d412009-12-31 20:50:59 +000015213if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015214then
15215
Matthias Kloseb9621712010-04-24 17:59:49 +000015216$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015217
15218fi
15219
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015220if test $ac_sys_system = Darwin
15221then
15222 LIBS="$LIBS -framework CoreFoundation"
15223fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15226$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015227if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015229else
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015231 ac_cv_have_size_t_format="cross -- assuming yes"
15232
Thomas Wouters477c8d52006-05-27 19:21:47 +000015233else
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015235/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015236
Thomas Wouters477c8d52006-05-27 19:21:47 +000015237#include <stdio.h>
15238#include <stddef.h>
15239#include <string.h>
15240
Christian Heimes2c181612007-12-17 20:04:13 +000015241#ifdef HAVE_SYS_TYPES_H
15242#include <sys/types.h>
15243#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015244
15245#ifdef HAVE_SSIZE_T
15246typedef ssize_t Py_ssize_t;
15247#elif SIZEOF_VOID_P == SIZEOF_LONG
15248typedef long Py_ssize_t;
15249#else
15250typedef int Py_ssize_t;
15251#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015252
Christian Heimes2c181612007-12-17 20:04:13 +000015253int main()
15254{
15255 char buffer[256];
15256
Thomas Wouters477c8d52006-05-27 19:21:47 +000015257 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15258 return 1;
15259
Thomas Wouters89f507f2006-12-13 04:49:30 +000015260 if (strcmp(buffer, "123"))
15261 return 1;
15262
15263 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15264 return 1;
15265
15266 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015267 return 1;
15268
15269 return 0;
15270}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015271
Thomas Wouters477c8d52006-05-27 19:21:47 +000015272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015273if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015274 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015275else
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15279 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015280fi
15281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15284$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015285if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015286
Matthias Kloseb9621712010-04-24 17:59:49 +000015287$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015288
15289fi
15290
Matthias Kloseb9621712010-04-24 17:59:49 +000015291ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015292#ifdef HAVE_SYS_TYPES_H
15293#include <sys/types.h>
15294#endif
15295#ifdef HAVE_SYS_SOCKET_H
15296#include <sys/socket.h>
15297#endif
15298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299"
Victor Stinnere0be4232011-10-25 13:06:09 +020015300if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015301
Martin v. Löwis11437992002-04-12 09:54:03 +000015302else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015303
Matthias Kloseb9621712010-04-24 17:59:49 +000015304$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015305
15306fi
15307
Michael W. Hudson54241132001-12-07 15:38:26 +000015308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15310$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015311if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015313else
Matthias Kloseb9621712010-04-24 17:59:49 +000015314 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015315 ac_cv_broken_mbstowcs=no
15316else
Matthias Kloseb9621712010-04-24 17:59:49 +000015317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015318/* end confdefs.h. */
15319
Stefan Krah19c21392012-11-22 23:47:32 +010015320#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015321#include<stdlib.h>
15322int main() {
15323 size_t len = -1;
15324 const char *str = "text";
15325 len = mbstowcs(NULL, str, 0);
15326 return (len != 4);
15327}
15328
15329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015330if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015331 ac_cv_broken_mbstowcs=no
15332else
Matthias Kloseb9621712010-04-24 17:59:49 +000015333 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15336 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015337fi
15338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015339fi
15340
Matthias Kloseb9621712010-04-24 17:59:49 +000015341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15342$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015343if test "$ac_cv_broken_mbstowcs" = yes
15344then
15345
Matthias Kloseb9621712010-04-24 17:59:49 +000015346$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015347
15348fi
15349
Antoine Pitroub52ec782009-01-25 16:34:23 +000015350# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15352$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015353
15354# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015355if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015356 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015357if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015358then
15359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15363$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015364fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015365if test "$withval" = no
15366then
15367
15368$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15371$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015372fi
15373
Antoine Pitrou042b1282010-08-13 21:15:58 +000015374else
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15376$as_echo "no value specified" >&6; }
15377fi
15378
Antoine Pitroub52ec782009-01-25 16:34:23 +000015379
Matthias Kloseb17289e2012-03-15 19:51:34 +010015380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15381$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15382if ${ac_cv_computed_gotos+:} false; then :
15383 $as_echo_n "(cached) " >&6
15384else
15385 if test "$cross_compiling" = yes; then :
15386 if test "${with_computed_gotos+set}" = set; then
15387 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15388 else
15389 ac_cv_computed_gotos=no
15390 fi
15391else
15392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15393/* end confdefs.h. */
15394
15395int main(int argc, char **argv)
15396{
15397 static void *targets[1] = { &&LABEL1 };
15398 goto LABEL2;
15399LABEL1:
15400 return 0;
15401LABEL2:
15402 goto *targets[0];
15403 return 1;
15404}
15405
15406_ACEOF
15407if ac_fn_c_try_run "$LINENO"; then :
15408 ac_cv_computed_gotos=yes
15409else
15410 ac_cv_computed_gotos=no
15411fi
15412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15413 conftest.$ac_objext conftest.beam conftest.$ac_ext
15414fi
15415
15416fi
15417
15418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15419$as_echo "$ac_cv_computed_gotos" >&6; }
15420case "$ac_cv_computed_gotos" in yes*)
15421
15422$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15423
15424esac
15425
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015426case $ac_sys_system in
15427AIX*)
15428
15429$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15430 ;;
15431esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015432
Michael W. Hudson54241132001-12-07 15:38:26 +000015433
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015434
15435
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015436for h in `(cd $srcdir;echo Python/thread_*.h)`
15437do
15438 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15439done
15440
Michael W. Hudson54241132001-12-07 15:38:26 +000015441
Ned Deily0db50cf2014-07-25 12:41:31 -070015442SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15444$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015445for dir in $SRCDIRS; do
15446 if test ! -d $dir; then
15447 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015448 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015449done
Matthias Kloseb9621712010-04-24 17:59:49 +000015450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15451$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015452
Stefan Krah1919b7e2012-03-21 18:25:23 +010015453# Availability of -O2:
15454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15455$as_echo_n "checking for -O2... " >&6; }
15456saved_cflags="$CFLAGS"
15457CFLAGS="-O2"
15458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15459/* end confdefs.h. */
15460
15461int
15462main ()
15463{
15464
15465
15466 ;
15467 return 0;
15468}
15469_ACEOF
15470if ac_fn_c_try_compile "$LINENO"; then :
15471 have_O2=yes
15472else
15473 have_O2=no
15474fi
15475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15477$as_echo "$have_O2" >&6; }
15478CFLAGS="$saved_cflags"
15479
15480# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15481# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15483$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15484saved_cflags="$CFLAGS"
15485CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15486if test "$have_O2" = no; then
15487 CFLAGS=""
15488fi
15489if test "$cross_compiling" = yes; then :
15490 have_glibc_memmove_bug=undefined
15491else
15492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15493/* end confdefs.h. */
15494
15495#include <stdio.h>
15496#include <stdlib.h>
15497#include <string.h>
15498void foo(void *p, void *q) { memmove(p, q, 19); }
15499int main() {
15500 char a[32] = "123456789000000000";
15501 foo(&a[9], a);
15502 if (strcmp(a, "123456789123456789000000000") != 0)
15503 return 1;
15504 foo(a, &a[9]);
15505 if (strcmp(a, "123456789000000000") != 0)
15506 return 1;
15507 return 0;
15508}
15509
15510_ACEOF
15511if ac_fn_c_try_run "$LINENO"; then :
15512 have_glibc_memmove_bug=no
15513else
15514 have_glibc_memmove_bug=yes
15515fi
15516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15517 conftest.$ac_objext conftest.beam conftest.$ac_ext
15518fi
15519
15520CFLAGS="$saved_cflags"
15521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15522$as_echo "$have_glibc_memmove_bug" >&6; }
15523if test "$have_glibc_memmove_bug" = yes; then
15524
15525$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15526
15527fi
15528
15529if test "$have_gcc_asm_for_x87" = yes; then
15530 # Some versions of gcc miscompile inline asm:
15531 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15532 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15533 case $CC in
15534 *gcc*)
15535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15536$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15537 saved_cflags="$CFLAGS"
15538 CFLAGS="-O2"
15539 if test "$cross_compiling" = yes; then :
15540 have_ipa_pure_const_bug=undefined
15541else
15542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15543/* end confdefs.h. */
15544
15545 __attribute__((noinline)) int
15546 foo(int *p) {
15547 int r;
15548 asm ( "movl \$6, (%1)\n\t"
15549 "xorl %0, %0\n\t"
15550 : "=r" (r) : "r" (p) : "memory"
15551 );
15552 return r;
15553 }
15554 int main() {
15555 int p = 8;
15556 if ((foo(&p) ? : p) != 6)
15557 return 1;
15558 return 0;
15559 }
15560
15561_ACEOF
15562if ac_fn_c_try_run "$LINENO"; then :
15563 have_ipa_pure_const_bug=no
15564else
15565 have_ipa_pure_const_bug=yes
15566fi
15567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15568 conftest.$ac_objext conftest.beam conftest.$ac_ext
15569fi
15570
15571 CFLAGS="$saved_cflags"
15572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15573$as_echo "$have_ipa_pure_const_bug" >&6; }
15574 if test "$have_ipa_pure_const_bug" = yes; then
15575
15576$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15577
15578 fi
15579 ;;
15580 esac
15581fi
15582
Ned Deily322f5ba2013-11-21 23:01:59 -080015583# ensurepip option
15584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15585$as_echo_n "checking for ensurepip... " >&6; }
15586
15587# Check whether --with-ensurepip was given.
15588if test "${with_ensurepip+set}" = set; then :
15589 withval=$with_ensurepip;
15590else
15591 with_ensurepip=upgrade
15592fi
15593
15594case $with_ensurepip in #(
15595 yes|upgrade) :
15596 ENSUREPIP=upgrade ;; #(
15597 install) :
15598 ENSUREPIP=install ;; #(
15599 no) :
15600 ENSUREPIP=no ;; #(
15601 *) :
15602 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15603esac
15604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15605$as_echo "$ENSUREPIP" >&6; }
15606
15607
Guido van Rossum627b2d71993-12-24 10:39:16 +000015608# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015609ac_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 +000015610
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015611ac_config_files="$ac_config_files Modules/ld_so_aix"
15612
Martin v. Löwis11437992002-04-12 09:54:03 +000015613cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015614# This file is a shell script that caches the results of configure
15615# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015616# scripts and configure runs, see configure's option --config-cache.
15617# It is not useful on other systems. If it contains results you don't
15618# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015619#
Martin v. Löwis11437992002-04-12 09:54:03 +000015620# config.status only pays attention to the cache file if you give it
15621# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015622#
Skip Montanaro6dead952003-09-25 14:50:04 +000015623# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015624# loading this file, other *unset* `ac_cv_foo' will be assigned the
15625# following values.
15626
15627_ACEOF
15628
Guido van Rossumf78abae1997-01-21 22:02:36 +000015629# The following way of writing the cache mishandles newlines in values,
15630# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015631# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015632# Ultrix sh set writes to stderr and can't be redirected directly,
15633# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015634(
15635 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15636 eval ac_val=\$$ac_var
15637 case $ac_val in #(
15638 *${as_nl}*)
15639 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015640 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15641$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642 esac
15643 case $ac_var in #(
15644 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15646 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647 esac ;;
15648 esac
15649 done
15650
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15653 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 # `set' does not quote correctly, so add quotes: double-quote
15655 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015657 "s/'/'\\\\''/g;
15658 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015659 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 *)
15661 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015662 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664 esac |
15665 sort
15666) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015668 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015670 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015671 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15672 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15674 :end' >>confcache
15675if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15676 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015677 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15679$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015680 if test ! -f "$cache_file" || test -h "$cache_file"; then
15681 cat confcache >"$cache_file"
15682 else
15683 case $cache_file in #(
15684 */* | ?:*)
15685 mv -f confcache "$cache_file"$$ &&
15686 mv -f "$cache_file"$$ "$cache_file" ;; #(
15687 *)
15688 mv -f confcache "$cache_file" ;;
15689 esac
15690 fi
15691 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015692 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15694$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015695 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015696fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015697rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015698
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015699test "x$prefix" = xNONE && prefix=$ac_default_prefix
15700# Let make expand exec_prefix.
15701test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015702
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015703DEFS=-DHAVE_CONFIG_H
15704
Skip Montanaro6dead952003-09-25 14:50:04 +000015705ac_libobjs=
15706ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015707U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015708for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15709 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015711 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15713 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015714 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15715 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015716done
15717LIBOBJS=$ac_libobjs
15718
15719LTLIBOBJS=$ac_ltlibobjs
15720
15721
Martin v. Löwis11437992002-04-12 09:54:03 +000015722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723
Victor Stinnere0be4232011-10-25 13:06:09 +020015724: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015725ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015726ac_clean_files_save=$ac_clean_files
15727ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015728{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15729$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15730as_write_fail=0
15731cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015732#! $SHELL
15733# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015734# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015735# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015736# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015737
Martin v. Löwis11437992002-04-12 09:54:03 +000015738debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015739ac_cs_recheck=false
15740ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015741
Matthias Kloseb9621712010-04-24 17:59:49 +000015742SHELL=\${CONFIG_SHELL-$SHELL}
15743export SHELL
15744_ASEOF
15745cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15746## -------------------- ##
15747## M4sh Initialization. ##
15748## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750# Be more Bourne compatible
15751DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015752if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 emulate sh
15754 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015755 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015756 # is contrary to our usage. Disable this feature.
15757 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015759else
Matthias Kloseb9621712010-04-24 17:59:49 +000015760 case `(set -o) 2>/dev/null` in #(
15761 *posix*) :
15762 set -o posix ;; #(
15763 *) :
15764 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015766fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015767
15768
Matthias Kloseb9621712010-04-24 17:59:49 +000015769as_nl='
15770'
15771export as_nl
15772# Printing a long string crashes Solaris 7 /usr/bin/printf.
15773as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15774as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15775as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15776# Prefer a ksh shell builtin over an external printf program on Solaris,
15777# but without wasting forks for bash or zsh.
15778if test -z "$BASH_VERSION$ZSH_VERSION" \
15779 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15780 as_echo='print -r --'
15781 as_echo_n='print -rn --'
15782elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15783 as_echo='printf %s\n'
15784 as_echo_n='printf %s'
15785else
15786 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15787 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15788 as_echo_n='/usr/ucb/echo -n'
15789 else
15790 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15791 as_echo_n_body='eval
15792 arg=$1;
15793 case $arg in #(
15794 *"$as_nl"*)
15795 expr "X$arg" : "X\\(.*\\)$as_nl";
15796 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15797 esac;
15798 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15799 '
15800 export as_echo_n_body
15801 as_echo_n='sh -c $as_echo_n_body as_echo'
15802 fi
15803 export as_echo_body
15804 as_echo='sh -c $as_echo_body as_echo'
15805fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015806
15807# The user is always right.
15808if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 PATH_SEPARATOR=:
15810 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15811 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15812 PATH_SEPARATOR=';'
15813 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816
15817# IFS
15818# We need space, tab and new line, in precisely that order. Quoting is
15819# there to prevent editors from complaining about space-tab.
15820# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15821# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822IFS=" "" $as_nl"
15823
15824# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015825as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015826case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827 *[\\/]* ) as_myself=$0 ;;
15828 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015829for as_dir in $PATH
15830do
15831 IFS=$as_save_IFS
15832 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15834 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837 ;;
15838esac
15839# We did not find ourselves, most probably we were run as `sh COMMAND'
15840# in which case we are not to be found in the path.
15841if test "x$as_myself" = x; then
15842 as_myself=$0
15843fi
15844if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15846 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847fi
15848
Matthias Kloseb9621712010-04-24 17:59:49 +000015849# Unset variables that we do not need and which cause bugs (e.g. in
15850# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15851# suppresses any "Segmentation fault" message there. '((' could
15852# trigger a bug in pdksh 5.2.14.
15853for as_var in BASH_ENV ENV MAIL MAILPATH
15854do eval test x\${$as_var+set} = xset \
15855 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856done
15857PS1='$ '
15858PS2='> '
15859PS4='+ '
15860
15861# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015862LC_ALL=C
15863export LC_ALL
15864LANGUAGE=C
15865export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866
Matthias Kloseb9621712010-04-24 17:59:49 +000015867# CDPATH.
15868(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15869
15870
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015871# as_fn_error STATUS ERROR [LINENO LOG_FD]
15872# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015873# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15874# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015875# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015876as_fn_error ()
15877{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015878 as_status=$1; test $as_status -eq 0 && as_status=1
15879 if test "$4"; then
15880 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15881 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015883 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015884 as_fn_exit $as_status
15885} # as_fn_error
15886
15887
15888# as_fn_set_status STATUS
15889# -----------------------
15890# Set $? to STATUS, without forking.
15891as_fn_set_status ()
15892{
15893 return $1
15894} # as_fn_set_status
15895
15896# as_fn_exit STATUS
15897# -----------------
15898# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15899as_fn_exit ()
15900{
15901 set +e
15902 as_fn_set_status $1
15903 exit $1
15904} # as_fn_exit
15905
15906# as_fn_unset VAR
15907# ---------------
15908# Portably unset VAR.
15909as_fn_unset ()
15910{
15911 { eval $1=; unset $1;}
15912}
15913as_unset=as_fn_unset
15914# as_fn_append VAR VALUE
15915# ----------------------
15916# Append the text in VALUE to the end of the definition contained in VAR. Take
15917# advantage of any shell optimizations that allow amortized linear growth over
15918# repeated appends, instead of the typical quadratic growth present in naive
15919# implementations.
15920if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15921 eval 'as_fn_append ()
15922 {
15923 eval $1+=\$2
15924 }'
15925else
15926 as_fn_append ()
15927 {
15928 eval $1=\$$1\$2
15929 }
15930fi # as_fn_append
15931
15932# as_fn_arith ARG...
15933# ------------------
15934# Perform arithmetic evaluation on the ARGs, and store the result in the
15935# global $as_val. Take advantage of shells that can avoid forks. The arguments
15936# must be portable across $(()) and expr.
15937if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15938 eval 'as_fn_arith ()
15939 {
15940 as_val=$(( $* ))
15941 }'
15942else
15943 as_fn_arith ()
15944 {
15945 as_val=`expr "$@" || test $? -eq 1`
15946 }
15947fi # as_fn_arith
15948
15949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015950if expr a : '\(a\)' >/dev/null 2>&1 &&
15951 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15952 as_expr=expr
15953else
15954 as_expr=false
15955fi
15956
15957if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15958 as_basename=basename
15959else
15960 as_basename=false
15961fi
15962
Matthias Kloseb9621712010-04-24 17:59:49 +000015963if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15964 as_dirname=dirname
15965else
15966 as_dirname=false
15967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969as_me=`$as_basename -- "$0" ||
15970$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15971 X"$0" : 'X\(//\)$' \| \
15972 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015973$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974 sed '/^.*\/\([^/][^/]*\)\/*$/{
15975 s//\1/
15976 q
15977 }
15978 /^X\/\(\/\/\)$/{
15979 s//\1/
15980 q
15981 }
15982 /^X\/\(\/\).*/{
15983 s//\1/
15984 q
15985 }
15986 s/.*/./; q'`
15987
Matthias Kloseb9621712010-04-24 17:59:49 +000015988# Avoid depending upon Character Ranges.
15989as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15990as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15991as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15992as_cr_digits='0123456789'
15993as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994
15995ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015996case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015998 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016000 xy) ECHO_C='\c';;
16001 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16002 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016003 esac;;
16004*)
16005 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016007
Martin v. Löwis11437992002-04-12 09:54:03 +000016008rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016009if test -d conf$$.dir; then
16010 rm -f conf$$.dir/conf$$.file
16011else
16012 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016013 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016015if (echo >conf$$.file) 2>/dev/null; then
16016 if ln -s conf$$.file conf$$ 2>/dev/null; then
16017 as_ln_s='ln -s'
16018 # ... but there are two gotchas:
16019 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16020 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016021 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016022 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016023 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016024 elif ln conf$$.file conf$$ 2>/dev/null; then
16025 as_ln_s=ln
16026 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016027 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016028 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016029else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016030 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16033rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016034
Matthias Kloseb9621712010-04-24 17:59:49 +000016035
16036# as_fn_mkdir_p
16037# -------------
16038# Create "$as_dir" as a directory, including parents if necessary.
16039as_fn_mkdir_p ()
16040{
16041
16042 case $as_dir in #(
16043 -*) as_dir=./$as_dir;;
16044 esac
16045 test -d "$as_dir" || eval $as_mkdir_p || {
16046 as_dirs=
16047 while :; do
16048 case $as_dir in #(
16049 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16050 *) as_qdir=$as_dir;;
16051 esac
16052 as_dirs="'$as_qdir' $as_dirs"
16053 as_dir=`$as_dirname -- "$as_dir" ||
16054$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16055 X"$as_dir" : 'X\(//\)[^/]' \| \
16056 X"$as_dir" : 'X\(//\)$' \| \
16057 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16058$as_echo X"$as_dir" |
16059 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16060 s//\1/
16061 q
16062 }
16063 /^X\(\/\/\)[^/].*/{
16064 s//\1/
16065 q
16066 }
16067 /^X\(\/\/\)$/{
16068 s//\1/
16069 q
16070 }
16071 /^X\(\/\).*/{
16072 s//\1/
16073 q
16074 }
16075 s/.*/./; q'`
16076 test -d "$as_dir" && break
16077 done
16078 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016079 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016080
16081
16082} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016083if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016084 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016085else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016086 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016087 as_mkdir_p=false
16088fi
16089
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016090
16091# as_fn_executable_p FILE
16092# -----------------------
16093# Test if FILE is an executable regular file.
16094as_fn_executable_p ()
16095{
16096 test -f "$1" && test -x "$1"
16097} # as_fn_executable_p
16098as_test_x='test -x'
16099as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016100
16101# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016102as_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 +000016103
16104# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016105as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016106
16107
Martin v. Löwis11437992002-04-12 09:54:03 +000016108exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016109## ----------------------------------- ##
16110## Main body of $CONFIG_STATUS script. ##
16111## ----------------------------------- ##
16112_ASEOF
16113test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16116# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016117# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016118# values after options handling.
16119ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016120This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016121generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016122
16123 CONFIG_FILES = $CONFIG_FILES
16124 CONFIG_HEADERS = $CONFIG_HEADERS
16125 CONFIG_LINKS = $CONFIG_LINKS
16126 CONFIG_COMMANDS = $CONFIG_COMMANDS
16127 $ $0 $@
16128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129on `(hostname || uname -n) 2>/dev/null | sed 1q`
16130"
16131
Martin v. Löwis11437992002-04-12 09:54:03 +000016132_ACEOF
16133
Matthias Kloseb9621712010-04-24 17:59:49 +000016134case $ac_config_files in *"
16135"*) set x $ac_config_files; shift; ac_config_files=$*;;
16136esac
16137
16138case $ac_config_headers in *"
16139"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16140esac
16141
16142
16143cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016144# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016145config_files="$ac_config_files"
16146config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016148_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016149
Matthias Kloseb9621712010-04-24 17:59:49 +000016150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016151ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016152\`$as_me' instantiates files and other configuration actions
16153from templates according to the current configuration. Unless the files
16154and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016155
Matthias Kloseb9621712010-04-24 17:59:49 +000016156Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016157
16158 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016159 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016160 --config print configuration, then exit
16161 -q, --quiet, --silent
16162 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 -d, --debug don't remove temporary files
16164 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016165 --file=FILE[:TEMPLATE]
16166 instantiate the configuration file FILE
16167 --header=FILE[:TEMPLATE]
16168 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016169
16170Configuration files:
16171$config_files
16172
16173Configuration headers:
16174$config_headers
16175
Matthias Kloseb9621712010-04-24 17:59:49 +000016176Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16180ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016181ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016182python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016183configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016184 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016185
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016186Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016187This config.status script is free software; the Free Software Foundation
16188gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016189
16190ac_pwd='$ac_pwd'
16191srcdir='$srcdir'
16192INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016193MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016194test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016195_ACEOF
16196
Matthias Kloseb9621712010-04-24 17:59:49 +000016197cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16198# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016199ac_need_defaults=:
16200while test $# != 0
16201do
16202 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016203 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16205 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016206 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016207 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016208 --*=)
16209 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16210 ac_optarg=
16211 ac_shift=:
16212 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016214 ac_option=$1
16215 ac_optarg=$2
16216 ac_shift=shift
16217 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 esac
16219
Skip Montanaro6dead952003-09-25 14:50:04 +000016220 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016221 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016222 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16223 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016225 $as_echo "$ac_cs_version"; exit ;;
16226 --config | --confi | --conf | --con | --co | --c )
16227 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 debug=: ;;
16230 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016231 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016232 case $ac_optarg in
16233 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016234 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016235 esac
16236 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 ac_need_defaults=false;;
16238 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016239 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016240 case $ac_optarg in
16241 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16242 esac
16243 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016245 --he | --h)
16246 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016247 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016248Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016250 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016251 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16252 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16253 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016254
16255 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016256 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016257Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016258
Matthias Kloseb9621712010-04-24 17:59:49 +000016259 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016260 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016261
16262 esac
16263 shift
16264done
16265
Skip Montanaro6dead952003-09-25 14:50:04 +000016266ac_configure_extra_args=
16267
16268if $ac_cs_silent; then
16269 exec 6>/dev/null
16270 ac_configure_extra_args="$ac_configure_extra_args --silent"
16271fi
16272
16273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016274cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016275if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016276 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016277 shift
16278 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16279 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016281 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016282fi
16283
Martin v. Löwis11437992002-04-12 09:54:03 +000016284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016285cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016286exec 5>>config.log
16287{
16288 echo
16289 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16290## Running $as_me. ##
16291_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016292 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016296cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016298
Matthias Kloseb9621712010-04-24 17:59:49 +000016299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300
16301# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016302for ac_config_target in $ac_config_targets
16303do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 case $ac_config_target in
16305 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16306 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16307 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016308 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16309 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16311 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016312 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016313 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016314 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315
Victor Stinnere0be4232011-10-25 13:06:09 +020016316 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 esac
16318done
16319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016320
Martin v. Löwis11437992002-04-12 09:54:03 +000016321# If the user did not use the arguments to specify the items to instantiate,
16322# then the envvar interface is used. Set only those that are not.
16323# We use the long form for the default assignment because of an extremely
16324# bizarre bug on SunOS 4.1.3.
16325if $ac_need_defaults; then
16326 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16327 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16328fi
16329
Skip Montanaro6dead952003-09-25 14:50:04 +000016330# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016331# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016332# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333# Hook for its removal unless debugging.
16334# Note that there is a small window in which the directory will not be cleaned:
16335# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016336$debug ||
16337{
Victor Stinnere0be4232011-10-25 13:06:09 +020016338 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016340 : "${ac_tmp:=$tmp}"
16341 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016343 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016344}
Martin v. Löwis11437992002-04-12 09:54:03 +000016345# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016346
Martin v. Löwis11437992002-04-12 09:54:03 +000016347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016348 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016349 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016350} ||
16351{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016352 tmp=./conf$$-$RANDOM
16353 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016354} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016355ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016356
Matthias Kloseb9621712010-04-24 17:59:49 +000016357# Set up the scripts for CONFIG_FILES section.
16358# No need to generate them if there are no CONFIG_FILES.
16359# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016361
Matthias Kloseb9621712010-04-24 17:59:49 +000016362
16363ac_cr=`echo X | tr X '\015'`
16364# On cygwin, bash can eat \r inside `` if the user requested igncr.
16365# But we know of no other shell where ac_cr would be empty at this
16366# point, so we can use a bashism as a fallback.
16367if test "x$ac_cr" = x; then
16368 eval ac_cr=\$\'\\r\'
16369fi
16370ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16371if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016372 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016373else
16374 ac_cs_awk_cr=$ac_cr
16375fi
16376
Victor Stinnere0be4232011-10-25 13:06:09 +020016377echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016378_ACEOF
16379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016380
Matthias Kloseb9621712010-04-24 17:59:49 +000016381{
16382 echo "cat >conf$$subs.awk <<_ACEOF" &&
16383 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16384 echo "_ACEOF"
16385} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016386 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16387ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388ac_delim='%!_!# '
16389for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016390 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016391 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016392
Matthias Kloseb9621712010-04-24 17:59:49 +000016393 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16394 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395 break
16396 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016397 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016398 else
16399 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016400 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401done
Matthias Kloseb9621712010-04-24 17:59:49 +000016402rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016403
Matthias Kloseb9621712010-04-24 17:59:49 +000016404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016405cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016407sed -n '
16408h
16409s/^/S["/; s/!.*/"]=/
16410p
16411g
16412s/^[^!]*!//
16413:repl
16414t repl
16415s/'"$ac_delim"'$//
16416t delim
16417:nl
16418h
16419s/\(.\{148\}\)..*/\1/
16420t more1
16421s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16422p
16423n
16424b repl
16425:more1
16426s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16427p
16428g
16429s/.\{148\}//
16430t nl
16431:delim
16432h
16433s/\(.\{148\}\)..*/\1/
16434t more2
16435s/["\\]/\\&/g; s/^/"/; s/$/"/
16436p
16437b
16438:more2
16439s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16440p
16441g
16442s/.\{148\}//
16443t delim
16444' <conf$$subs.awk | sed '
16445/^[^""]/{
16446 N
16447 s/\n//
16448}
16449' >>$CONFIG_STATUS || ac_write_fail=1
16450rm -f conf$$subs.awk
16451cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16452_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016453cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016454 for (key in S) S_is_set[key] = 1
16455 FS = ""
16456
16457}
16458{
16459 line = $ 0
16460 nfields = split(line, field, "@")
16461 substed = 0
16462 len = length(field[1])
16463 for (i = 2; i < nfields; i++) {
16464 key = field[i]
16465 keylen = length(key)
16466 if (S_is_set[key]) {
16467 value = S[key]
16468 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16469 len += length(value) + length(field[++i])
16470 substed = 1
16471 } else
16472 len += 1 + keylen
16473 }
16474
16475 print line
16476}
16477
16478_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016480cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16481if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16482 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16483else
16484 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016485fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016486 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016487_ACEOF
16488
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016489# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16490# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016491# trailing colons and then remove the whole line if VPATH becomes empty
16492# (actually we leave an empty line to preserve line numbers).
16493if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016494 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16495h
16496s///
16497s/^/:/
16498s/[ ]*$/:/
16499s/:\$(srcdir):/:/g
16500s/:\${srcdir}:/:/g
16501s/:@srcdir@:/:/g
16502s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016503s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016504x
16505s/\(=[ ]*\).*/\1/
16506G
16507s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508s/^[^=]*=[ ]*$//
16509}'
16510fi
16511
Matthias Kloseb9621712010-04-24 17:59:49 +000016512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016513fi # test -n "$CONFIG_FILES"
16514
Matthias Kloseb9621712010-04-24 17:59:49 +000016515# Set up the scripts for CONFIG_HEADERS section.
16516# No need to generate them if there are no CONFIG_HEADERS.
16517# This happens for instance with `./config.status Makefile'.
16518if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016519cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016520BEGIN {
16521_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522
Matthias Kloseb9621712010-04-24 17:59:49 +000016523# Transform confdefs.h into an awk script `defines.awk', embedded as
16524# here-document in config.status, that substitutes the proper values into
16525# config.h.in to produce config.h.
16526
16527# Create a delimiter string that does not exist in confdefs.h, to ease
16528# handling of long lines.
16529ac_delim='%!_!# '
16530for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016531 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16532 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016533 break
16534 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016535 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016536 else
16537 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16538 fi
16539done
16540
16541# For the awk script, D is an array of macro values keyed by name,
16542# likewise P contains macro parameters if any. Preserve backslash
16543# newline sequences.
16544
16545ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16546sed -n '
16547s/.\{148\}/&'"$ac_delim"'/g
16548t rset
16549:rset
16550s/^[ ]*#[ ]*define[ ][ ]*/ /
16551t def
16552d
16553:def
16554s/\\$//
16555t bsnl
16556s/["\\]/\\&/g
16557s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16558D["\1"]=" \3"/p
16559s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16560d
16561:bsnl
16562s/["\\]/\\&/g
16563s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16564D["\1"]=" \3\\\\\\n"\\/p
16565t cont
16566s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16567t cont
16568d
16569:cont
16570n
16571s/.\{148\}/&'"$ac_delim"'/g
16572t clear
16573:clear
16574s/\\$//
16575t bsnlc
16576s/["\\]/\\&/g; s/^/"/; s/$/"/p
16577d
16578:bsnlc
16579s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16580b cont
16581' <confdefs.h | sed '
16582s/'"$ac_delim"'/"\\\
16583"/g' >>$CONFIG_STATUS || ac_write_fail=1
16584
16585cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16586 for (key in D) D_is_set[key] = 1
16587 FS = ""
16588}
16589/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16590 line = \$ 0
16591 split(line, arg, " ")
16592 if (arg[1] == "#") {
16593 defundef = arg[2]
16594 mac1 = arg[3]
16595 } else {
16596 defundef = substr(arg[1], 2)
16597 mac1 = arg[2]
16598 }
16599 split(mac1, mac2, "(") #)
16600 macro = mac2[1]
16601 prefix = substr(line, 1, index(line, defundef) - 1)
16602 if (D_is_set[macro]) {
16603 # Preserve the white space surrounding the "#".
16604 print prefix "define", macro P[macro] D[macro]
16605 next
16606 } else {
16607 # Replace #undef with comments. This is necessary, for example,
16608 # in the case of _POSIX_SOURCE, which is predefined and required
16609 # on some systems where configure will not decide to define it.
16610 if (defundef == "undef") {
16611 print "/*", prefix defundef, macro, "*/"
16612 next
16613 }
16614 }
16615}
16616{ print }
16617_ACAWK
16618_ACEOF
16619cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016620 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016621fi # test -n "$CONFIG_HEADERS"
16622
16623
16624eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16625shift
16626for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627do
16628 case $ac_tag in
16629 :[FHLC]) ac_mode=$ac_tag; continue;;
16630 esac
16631 case $ac_mode$ac_tag in
16632 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016633 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634 :[FH]-) ac_tag=-:-;;
16635 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16636 esac
16637 ac_save_IFS=$IFS
16638 IFS=:
16639 set x $ac_tag
16640 IFS=$ac_save_IFS
16641 shift
16642 ac_file=$1
16643 shift
16644
16645 case $ac_mode in
16646 :L) ac_source=$1;;
16647 :[FH])
16648 ac_file_inputs=
16649 for ac_f
16650 do
16651 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016652 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016653 *) # Look for the file first in the build tree, then in the source tree
16654 # (if the path is not absolute). The absolute path cannot be DOS-style,
16655 # because $ac_f cannot contain `:'.
16656 test -f "$ac_f" ||
16657 case $ac_f in
16658 [\\/$]*) false;;
16659 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16660 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016661 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016663 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16664 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665 done
16666
16667 # Let's still pretend it is `configure' which instantiates (i.e., don't
16668 # use $as_me), people would be surprised to read:
16669 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016670 configure_input='Generated from '`
16671 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16672 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016673 if test x"$ac_file" != x-; then
16674 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16676$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016678 # Neutralize special characters interpreted by sed in replacement strings.
16679 case $configure_input in #(
16680 *\&* | *\|* | *\\* )
16681 ac_sed_conf_input=`$as_echo "$configure_input" |
16682 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16683 *) ac_sed_conf_input=$configure_input;;
16684 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016685
16686 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016687 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16688 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689 esac
16690 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016691 esac
16692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016694$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016695 X"$ac_file" : 'X\(//\)[^/]' \| \
16696 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016697 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016698$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016699 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16700 s//\1/
16701 q
16702 }
16703 /^X\(\/\/\)[^/].*/{
16704 s//\1/
16705 q
16706 }
16707 /^X\(\/\/\)$/{
16708 s//\1/
16709 q
16710 }
16711 /^X\(\/\).*/{
16712 s//\1/
16713 q
16714 }
16715 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016716 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016717 ac_builddir=.
16718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719case "$ac_dir" in
16720.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16721*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016722 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016724 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725 case $ac_top_builddir_sub in
16726 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16727 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16728 esac ;;
16729esac
16730ac_abs_top_builddir=$ac_pwd
16731ac_abs_builddir=$ac_pwd$ac_dir_suffix
16732# for backward compatibility:
16733ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016734
16735case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016737 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738 ac_top_srcdir=$ac_top_builddir_sub
16739 ac_abs_top_srcdir=$ac_pwd ;;
16740 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016742 ac_top_srcdir=$srcdir
16743 ac_abs_top_srcdir=$srcdir ;;
16744 *) # Relative name.
16745 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16746 ac_top_srcdir=$ac_top_build_prefix$srcdir
16747 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016748esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016749ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016750
Martin v. Löwis11437992002-04-12 09:54:03 +000016751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752 case $ac_mode in
16753 :F)
16754 #
16755 # CONFIG_FILE
16756 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016757
16758 case $INSTALL in
16759 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016760 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016761 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016762 ac_MKDIR_P=$MKDIR_P
16763 case $MKDIR_P in
16764 [\\/$]* | ?:[\\/]* ) ;;
16765 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16766 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016767_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768
Matthias Kloseb9621712010-04-24 17:59:49 +000016769cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770# If the template does not know about datarootdir, expand it.
16771# FIXME: This hack should be removed a few years after 2.60.
16772ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016773ac_sed_dataroot='
16774/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016775 p
16776 q
16777}
16778/@datadir@/p
16779/@docdir@/p
16780/@infodir@/p
16781/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016782/@mandir@/p'
16783case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016784*datarootdir*) ac_datarootdir_seen=yes;;
16785*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16787$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016789cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790 ac_datarootdir_hack='
16791 s&@datadir@&$datadir&g
16792 s&@docdir@&$docdir&g
16793 s&@infodir@&$infodir&g
16794 s&@localedir@&$localedir&g
16795 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016796 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016797esac
16798_ACEOF
16799
16800# Neutralize VPATH when `$srcdir' = `.'.
16801# Shell code in configure.ac might set extrasub.
16802# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016803cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16804ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016805$extrasub
16806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016807cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016808:t
16809/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016810s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016811s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016812s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016813s&@srcdir@&$ac_srcdir&;t t
16814s&@abs_srcdir@&$ac_abs_srcdir&;t t
16815s&@top_srcdir@&$ac_top_srcdir&;t t
16816s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16817s&@builddir@&$ac_builddir&;t t
16818s&@abs_builddir@&$ac_abs_builddir&;t t
16819s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16820s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016821s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016822$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016823"
Victor Stinnere0be4232011-10-25 13:06:09 +020016824eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16825 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016828 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16829 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16830 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016832which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016833$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016834which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016835
Victor Stinnere0be4232011-10-25 13:06:09 +020016836 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016838 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16839 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016840 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016841 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842 ;;
16843 :H)
16844 #
16845 # CONFIG_HEADER
16846 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016847 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016848 {
16849 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016850 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16851 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016852 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016853 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016854 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16855$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016857 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016858 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016859 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016860 fi
16861 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016862 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016863 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016864 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016865 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016866 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868
16869 esac
16870
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016871
16872 case $ac_file$ac_mode in
16873 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16874
16875 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876done # for ac_tag
16877
Guido van Rossum627b2d71993-12-24 10:39:16 +000016878
Matthias Kloseb9621712010-04-24 17:59:49 +000016879as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016880_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016881ac_clean_files=$ac_clean_files_save
16882
Matthias Kloseb9621712010-04-24 17:59:49 +000016883test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016884 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016885
Martin v. Löwis11437992002-04-12 09:54:03 +000016886
16887# configure is writing to config.log, and then calls config.status.
16888# config.status does its own redirection, appending to config.log.
16889# Unfortunately, on DOS this fails, as config.log is still kept open
16890# by configure, so config.status won't be able to write to it; its
16891# output is simply discarded. So we exec the FD to /dev/null,
16892# effectively closing config.log, so it can be properly (re)opened and
16893# appended to by config.status. When coming back to configure, we
16894# need to make the FD available again.
16895if test "$no_create" != yes; then
16896 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016897 ac_config_status_args=
16898 test "$silent" = yes &&
16899 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016900 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016901 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016902 exec 5>>config.log
16903 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16904 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016905 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016906fi
16907if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16909$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016910fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016911
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016912
Christian Heimes75ed8902013-11-20 01:11:18 +010016913echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016914if test ! -f Modules/Setup
16915then
16916 cp $srcdir/Modules/Setup.dist Modules/Setup
16917fi
16918
Christian Heimes75ed8902013-11-20 01:11:18 +010016919echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016920if test ! -f Modules/Setup.local
16921then
16922 echo "# Edit this file for local setup changes" >Modules/Setup.local
16923fi
16924
Christian Heimes75ed8902013-11-20 01:11:18 +010016925echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016926$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16927 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016928 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016929mv config.c Modules